blob: 1a2f2242e31b2465a0c26d64ae5ea996a1df5bce [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,
Tero Kristoed733612012-09-03 11:50:52 -0600116 .idlest_reg_id = 1,
117 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700118 },
Tero Kristoed733612012-09-03 11:50:52 -0600119 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600120};
121
Jon Hunterc7dad45f2012-09-23 17:28:28 -0600122/*
123 * 'debugss' class
124 * debug and emulation sub system
125 */
126
127static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = {
128 .name = "debugss",
129};
130
131/* debugss */
132static struct omap_hwmod omap3xxx_debugss_hwmod = {
133 .name = "debugss",
134 .class = &omap3xxx_debugss_hwmod_class,
135 .clkdm_name = "emu_clkdm",
136 .main_clk = "emu_src_ck",
137 .flags = HWMOD_NO_IDLEST,
138};
139
Paul Walmsley844a3b62012-04-19 04:04:33 -0600140/* timer class */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600141static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = {
142 .rev_offs = 0x0000,
143 .sysc_offs = 0x0010,
144 .syss_offs = 0x0014,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500145 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
146 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
Jon Hunterf3a13e72012-08-28 12:55:27 -0500147 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
148 SYSS_HAS_RESET_STATUS),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600149 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
150 .sysc_fields = &omap_hwmod_sysc_type1,
151};
152
153static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
154 .name = "timer",
155 .sysc = &omap3xxx_timer_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600156};
157
158/* secure timers dev attribute */
159static struct omap_timer_capability_dev_attr capability_secure_dev_attr = {
Jon Hunter139486f2012-06-05 12:34:53 -0500160 .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600161};
162
163/* always-on timers dev attribute */
164static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
165 .timer_capability = OMAP_TIMER_ALWON,
166};
167
168/* pwm timers dev attribute */
169static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
170 .timer_capability = OMAP_TIMER_HAS_PWM,
171};
172
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600173/* timers with DSP interrupt dev attribute */
174static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
175 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
176};
177
178/* pwm timers with DSP interrupt dev attribute */
179static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = {
180 .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM,
181};
182
Paul Walmsley844a3b62012-04-19 04:04:33 -0600183/* timer1 */
184static struct omap_hwmod omap3xxx_timer1_hwmod = {
185 .name = "timer1",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600186 .main_clk = "gpt1_fck",
187 .prcm = {
188 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600189 .module_offs = WKUP_MOD,
190 .idlest_reg_id = 1,
191 .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT,
192 },
193 },
194 .dev_attr = &capability_alwon_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500195 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500196 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600197};
198
199/* timer2 */
200static struct omap_hwmod omap3xxx_timer2_hwmod = {
201 .name = "timer2",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600202 .main_clk = "gpt2_fck",
203 .prcm = {
204 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600205 .module_offs = OMAP3430_PER_MOD,
206 .idlest_reg_id = 1,
207 .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT,
208 },
209 },
Jon Hunter725a8fe2012-08-28 12:49:39 -0500210 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500211 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600212};
213
214/* timer3 */
215static struct omap_hwmod omap3xxx_timer3_hwmod = {
216 .name = "timer3",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600217 .main_clk = "gpt3_fck",
218 .prcm = {
219 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600220 .module_offs = OMAP3430_PER_MOD,
221 .idlest_reg_id = 1,
222 .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT,
223 },
224 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600225 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500226 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600227};
228
229/* timer4 */
230static struct omap_hwmod omap3xxx_timer4_hwmod = {
231 .name = "timer4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600232 .main_clk = "gpt4_fck",
233 .prcm = {
234 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600235 .module_offs = OMAP3430_PER_MOD,
236 .idlest_reg_id = 1,
237 .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT,
238 },
239 },
Paul Walmsley844a3b62012-04-19 04:04:33 -0600240 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500241 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600242};
243
244/* timer5 */
245static struct omap_hwmod omap3xxx_timer5_hwmod = {
246 .name = "timer5",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600247 .main_clk = "gpt5_fck",
248 .prcm = {
249 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600250 .module_offs = OMAP3430_PER_MOD,
251 .idlest_reg_id = 1,
252 .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT,
253 },
254 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600255 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600256 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500257 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600258};
259
260/* timer6 */
261static struct omap_hwmod omap3xxx_timer6_hwmod = {
262 .name = "timer6",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600263 .main_clk = "gpt6_fck",
264 .prcm = {
265 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600266 .module_offs = OMAP3430_PER_MOD,
267 .idlest_reg_id = 1,
268 .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT,
269 },
270 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600271 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600272 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500273 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600274};
275
276/* timer7 */
277static struct omap_hwmod omap3xxx_timer7_hwmod = {
278 .name = "timer7",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600279 .main_clk = "gpt7_fck",
280 .prcm = {
281 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600282 .module_offs = OMAP3430_PER_MOD,
283 .idlest_reg_id = 1,
284 .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT,
285 },
286 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600287 .dev_attr = &capability_dsp_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600288 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500289 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600290};
291
292/* timer8 */
293static struct omap_hwmod omap3xxx_timer8_hwmod = {
294 .name = "timer8",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600295 .main_clk = "gpt8_fck",
296 .prcm = {
297 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600298 .module_offs = OMAP3430_PER_MOD,
299 .idlest_reg_id = 1,
300 .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT,
301 },
302 },
Jon Hunter5c3e4ec2012-09-23 17:28:27 -0600303 .dev_attr = &capability_dsp_pwm_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/* timer9 */
309static struct omap_hwmod omap3xxx_timer9_hwmod = {
310 .name = "timer9",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600311 .main_clk = "gpt9_fck",
312 .prcm = {
313 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600314 .module_offs = OMAP3430_PER_MOD,
315 .idlest_reg_id = 1,
316 .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT,
317 },
318 },
319 .dev_attr = &capability_pwm_dev_attr,
320 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500321 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600322};
323
324/* timer10 */
325static struct omap_hwmod omap3xxx_timer10_hwmod = {
326 .name = "timer10",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600327 .main_clk = "gpt10_fck",
328 .prcm = {
329 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600330 .module_offs = CORE_MOD,
331 .idlest_reg_id = 1,
332 .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT,
333 },
334 },
335 .dev_attr = &capability_pwm_dev_attr,
Jon Hunter725a8fe2012-08-28 12:49:39 -0500336 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500337 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600338};
339
340/* timer11 */
341static struct omap_hwmod omap3xxx_timer11_hwmod = {
342 .name = "timer11",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600343 .main_clk = "gpt11_fck",
344 .prcm = {
345 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600346 .module_offs = CORE_MOD,
347 .idlest_reg_id = 1,
348 .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT,
349 },
350 },
351 .dev_attr = &capability_pwm_dev_attr,
352 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500353 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600354};
355
356/* timer12 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600357
358static struct omap_hwmod omap3xxx_timer12_hwmod = {
359 .name = "timer12",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600360 .main_clk = "gpt12_fck",
361 .prcm = {
362 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600363 .module_offs = WKUP_MOD,
364 .idlest_reg_id = 1,
365 .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT,
366 },
367 },
368 .dev_attr = &capability_secure_dev_attr,
369 .class = &omap3xxx_timer_hwmod_class,
Jon Hunter10759e82012-07-11 13:00:13 -0500370 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600371};
372
373/*
374 * 'wd_timer' class
375 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
376 * overflow condition
377 */
378
379static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
380 .rev_offs = 0x0000,
381 .sysc_offs = 0x0010,
382 .syss_offs = 0x0014,
383 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
384 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
385 SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
386 SYSS_HAS_RESET_STATUS),
387 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
388 .sysc_fields = &omap_hwmod_sysc_type1,
389};
390
391/* I2C common */
392static struct omap_hwmod_class_sysconfig i2c_sysc = {
393 .rev_offs = 0x00,
394 .sysc_offs = 0x20,
395 .syss_offs = 0x10,
396 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
397 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
398 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
399 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600400 .sysc_fields = &omap_hwmod_sysc_type1,
401};
402
403static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
404 .name = "wd_timer",
405 .sysc = &omap3xxx_wd_timer_sysc,
Kevin Hilman414e4122012-05-08 11:34:30 -0600406 .pre_shutdown = &omap2_wd_timer_disable,
407 .reset = &omap2_wd_timer_reset,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600408};
409
410static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
411 .name = "wd_timer2",
412 .class = &omap3xxx_wd_timer_hwmod_class,
413 .main_clk = "wdt2_fck",
414 .prcm = {
415 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600416 .module_offs = WKUP_MOD,
417 .idlest_reg_id = 1,
418 .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
419 },
420 },
421 /*
422 * XXX: Use software supervised mode, HW supervised smartidle seems to
423 * block CORE power domain idle transitions. Maybe a HW bug in wdt2?
424 */
425 .flags = HWMOD_SWSUP_SIDLE,
426};
427
428/* UART1 */
429static struct omap_hwmod omap3xxx_uart1_hwmod = {
430 .name = "uart1",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600431 .main_clk = "uart1_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700432 .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600433 .prcm = {
434 .omap2 = {
435 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600436 .idlest_reg_id = 1,
437 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
438 },
439 },
440 .class = &omap2_uart_class,
441};
442
443/* UART2 */
444static struct omap_hwmod omap3xxx_uart2_hwmod = {
445 .name = "uart2",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600446 .main_clk = "uart2_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700447 .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600448 .prcm = {
449 .omap2 = {
450 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600451 .idlest_reg_id = 1,
452 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
453 },
454 },
455 .class = &omap2_uart_class,
456};
457
458/* UART3 */
459static struct omap_hwmod omap3xxx_uart3_hwmod = {
460 .name = "uart3",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600461 .main_clk = "uart3_fck",
Rajendra Nayak7dedd342013-07-28 23:01:48 -0600462 .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700463 HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600464 .prcm = {
465 .omap2 = {
466 .module_offs = OMAP3430_PER_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600467 .idlest_reg_id = 1,
468 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
469 },
470 },
471 .class = &omap2_uart_class,
472};
473
474/* UART4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600475
Paul Walmsley844a3b62012-04-19 04:04:33 -0600476
477static struct omap_hwmod omap36xx_uart4_hwmod = {
478 .name = "uart4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600479 .main_clk = "uart4_fck",
Tony Lindgrena2fc3662014-09-18 08:58:49 -0700480 .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600481 .prcm = {
482 .omap2 = {
483 .module_offs = OMAP3430_PER_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600484 .idlest_reg_id = 1,
485 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
486 },
487 },
488 .class = &omap2_uart_class,
489};
490
Paul Walmsley844a3b62012-04-19 04:04:33 -0600491
Paul Walmsley844a3b62012-04-19 04:04:33 -0600492
Paul Walmsley82ee6202012-06-27 14:53:46 -0600493/*
494 * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or
495 * uart2_fck being enabled. So we add uart1_fck as an optional clock,
496 * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really
497 * should not be needed. The functional clock structure of the AM35xx
498 * UART4 is extremely unclear and opaque; it is unclear what the role
499 * of uart1/2_fck is for the UART4. Any clarification from either
500 * empirical testing or the AM3505/3517 hardware designers would be
501 * most welcome.
502 */
503static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = {
504 { .role = "softreset_uart1_fck", .clk = "uart1_fck" },
505};
506
Paul Walmsley844a3b62012-04-19 04:04:33 -0600507static struct omap_hwmod am35xx_uart4_hwmod = {
508 .name = "uart4",
Paul Walmsley844a3b62012-04-19 04:04:33 -0600509 .main_clk = "uart4_fck",
510 .prcm = {
511 .omap2 = {
512 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600513 .idlest_reg_id = 1,
Paul Walmsleybf765232012-06-27 14:53:46 -0600514 .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600515 },
516 },
Paul Walmsley82ee6202012-06-27 14:53:46 -0600517 .opt_clks = am35xx_uart4_opt_clks,
518 .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks),
519 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600520 .class = &omap2_uart_class,
521};
522
523static struct omap_hwmod_class i2c_class = {
524 .name = "i2c",
525 .sysc = &i2c_sysc,
526 .rev = OMAP_I2C_IP_VERSION_1,
527 .reset = &omap_i2c_reset,
528};
529
Paul Walmsley844a3b62012-04-19 04:04:33 -0600530/* dss */
531static struct omap_hwmod_opt_clk dss_opt_clks[] = {
532 /*
533 * The DSS HW needs all DSS clocks enabled during reset. The dss_core
534 * driver does not use these clocks.
535 */
536 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
537 { .role = "tv_clk", .clk = "dss_tv_fck" },
538 /* required only on OMAP3430 */
539 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
540};
541
542static struct omap_hwmod omap3430es1_dss_core_hwmod = {
543 .name = "dss_core",
544 .class = &omap2_dss_hwmod_class,
545 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600546 .prcm = {
547 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600548 .module_offs = OMAP3430_DSS_MOD,
549 .idlest_reg_id = 1,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600550 },
551 },
552 .opt_clks = dss_opt_clks,
553 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
554 .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
555};
556
557static struct omap_hwmod omap3xxx_dss_core_hwmod = {
558 .name = "dss_core",
559 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
560 .class = &omap2_dss_hwmod_class,
561 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600562 .prcm = {
563 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600564 .module_offs = OMAP3430_DSS_MOD,
565 .idlest_reg_id = 1,
566 .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600567 },
568 },
569 .opt_clks = dss_opt_clks,
570 .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
571};
572
573/*
574 * 'dispc' class
575 * display controller
576 */
577
578static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = {
579 .rev_offs = 0x0000,
580 .sysc_offs = 0x0010,
581 .syss_offs = 0x0014,
582 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
583 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
584 SYSC_HAS_ENAWAKEUP),
585 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
586 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
587 .sysc_fields = &omap_hwmod_sysc_type1,
588};
589
590static struct omap_hwmod_class omap3_dispc_hwmod_class = {
591 .name = "dispc",
592 .sysc = &omap3_dispc_sysc,
593};
594
595static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
596 .name = "dss_dispc",
597 .class = &omap3_dispc_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600598 .main_clk = "dss1_alwon_fck",
599 .prcm = {
600 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600601 .module_offs = OMAP3430_DSS_MOD,
602 },
603 },
604 .flags = HWMOD_NO_IDLEST,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -0700605 .dev_attr = &omap2_3_dss_dispc_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600606};
607
608/*
609 * 'dsi' class
610 * display serial interface controller
611 */
612
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200613static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = {
614 .rev_offs = 0x0000,
615 .sysc_offs = 0x0010,
616 .syss_offs = 0x0014,
617 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
618 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
619 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
620 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
621 .sysc_fields = &omap_hwmod_sysc_type1,
622};
623
Paul Walmsley844a3b62012-04-19 04:04:33 -0600624static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
625 .name = "dsi",
Sebastian Reichelb46211d2016-06-24 03:59:33 +0200626 .sysc = &omap3xxx_dsi_sysc,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600627};
628
Paul Walmsley844a3b62012-04-19 04:04:33 -0600629/* dss_dsi1 */
630static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
631 { .role = "sys_clk", .clk = "dss2_alwon_fck" },
632};
633
634static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
635 .name = "dss_dsi1",
636 .class = &omap3xxx_dsi_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600637 .main_clk = "dss1_alwon_fck",
638 .prcm = {
639 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600640 .module_offs = OMAP3430_DSS_MOD,
641 },
642 },
643 .opt_clks = dss_dsi1_opt_clks,
644 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
645 .flags = HWMOD_NO_IDLEST,
646};
647
648static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
649 { .role = "ick", .clk = "dss_ick" },
650};
651
652static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
653 .name = "dss_rfbi",
654 .class = &omap2_rfbi_hwmod_class,
655 .main_clk = "dss1_alwon_fck",
656 .prcm = {
657 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600658 .module_offs = OMAP3430_DSS_MOD,
659 },
660 },
661 .opt_clks = dss_rfbi_opt_clks,
662 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
663 .flags = HWMOD_NO_IDLEST,
664};
665
666static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = {
667 /* required only on OMAP3430 */
668 { .role = "tv_dac_clk", .clk = "dss_96m_fck" },
669};
670
671static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
672 .name = "dss_venc",
673 .class = &omap2_venc_hwmod_class,
674 .main_clk = "dss_tv_fck",
675 .prcm = {
676 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600677 .module_offs = OMAP3430_DSS_MOD,
678 },
679 },
680 .opt_clks = dss_venc_opt_clks,
681 .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks),
682 .flags = HWMOD_NO_IDLEST,
683};
684
685/* I2C1 */
686static struct omap_i2c_dev_attr i2c1_dev_attr = {
687 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530688 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600689};
690
691static struct omap_hwmod omap3xxx_i2c1_hwmod = {
692 .name = "i2c1",
693 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600694 .main_clk = "i2c1_fck",
695 .prcm = {
696 .omap2 = {
697 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600698 .idlest_reg_id = 1,
699 .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
700 },
701 },
702 .class = &i2c_class,
703 .dev_attr = &i2c1_dev_attr,
704};
705
706/* I2C2 */
707static struct omap_i2c_dev_attr i2c2_dev_attr = {
708 .fifo_depth = 8, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530709 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600710};
711
712static struct omap_hwmod omap3xxx_i2c2_hwmod = {
713 .name = "i2c2",
714 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600715 .main_clk = "i2c2_fck",
716 .prcm = {
717 .omap2 = {
718 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600719 .idlest_reg_id = 1,
720 .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
721 },
722 },
723 .class = &i2c_class,
724 .dev_attr = &i2c2_dev_attr,
725};
726
727/* I2C3 */
728static struct omap_i2c_dev_attr i2c3_dev_attr = {
729 .fifo_depth = 64, /* bytes */
Shubhrajyoti D972deb42012-11-26 15:25:11 +0530730 .flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600731};
732
Paul Walmsley844a3b62012-04-19 04:04:33 -0600733
Paul Walmsley844a3b62012-04-19 04:04:33 -0600734
735static struct omap_hwmod omap3xxx_i2c3_hwmod = {
736 .name = "i2c3",
737 .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600738 .main_clk = "i2c3_fck",
739 .prcm = {
740 .omap2 = {
741 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600742 .idlest_reg_id = 1,
743 .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
744 },
745 },
746 .class = &i2c_class,
747 .dev_attr = &i2c3_dev_attr,
748};
749
750/*
751 * 'gpio' class
752 * general purpose io module
753 */
754
755static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
756 .rev_offs = 0x0000,
757 .sysc_offs = 0x0010,
758 .syss_offs = 0x0014,
759 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
760 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
761 SYSS_HAS_RESET_STATUS),
762 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
763 .sysc_fields = &omap_hwmod_sysc_type1,
764};
765
766static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
767 .name = "gpio",
768 .sysc = &omap3xxx_gpio_sysc,
769 .rev = 1,
770};
771
772/* gpio_dev_attr */
773static struct omap_gpio_dev_attr gpio_dev_attr = {
774 .bank_width = 32,
775 .dbck_flag = true,
776};
777
778/* gpio1 */
779static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
780 { .role = "dbclk", .clk = "gpio1_dbck", },
781};
782
783static struct omap_hwmod omap3xxx_gpio1_hwmod = {
784 .name = "gpio1",
785 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600786 .main_clk = "gpio1_ick",
787 .opt_clks = gpio1_opt_clks,
788 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
789 .prcm = {
790 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600791 .module_offs = WKUP_MOD,
792 .idlest_reg_id = 1,
793 .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
794 },
795 },
796 .class = &omap3xxx_gpio_hwmod_class,
797 .dev_attr = &gpio_dev_attr,
798};
799
800/* gpio2 */
801static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
802 { .role = "dbclk", .clk = "gpio2_dbck", },
803};
804
805static struct omap_hwmod omap3xxx_gpio2_hwmod = {
806 .name = "gpio2",
807 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600808 .main_clk = "gpio2_ick",
809 .opt_clks = gpio2_opt_clks,
810 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
811 .prcm = {
812 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600813 .module_offs = OMAP3430_PER_MOD,
814 .idlest_reg_id = 1,
815 .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
816 },
817 },
818 .class = &omap3xxx_gpio_hwmod_class,
819 .dev_attr = &gpio_dev_attr,
820};
821
822/* gpio3 */
823static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
824 { .role = "dbclk", .clk = "gpio3_dbck", },
825};
826
827static struct omap_hwmod omap3xxx_gpio3_hwmod = {
828 .name = "gpio3",
829 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600830 .main_clk = "gpio3_ick",
831 .opt_clks = gpio3_opt_clks,
832 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
833 .prcm = {
834 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600835 .module_offs = OMAP3430_PER_MOD,
836 .idlest_reg_id = 1,
837 .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
838 },
839 },
840 .class = &omap3xxx_gpio_hwmod_class,
841 .dev_attr = &gpio_dev_attr,
842};
843
844/* gpio4 */
845static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
846 { .role = "dbclk", .clk = "gpio4_dbck", },
847};
848
849static struct omap_hwmod omap3xxx_gpio4_hwmod = {
850 .name = "gpio4",
851 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600852 .main_clk = "gpio4_ick",
853 .opt_clks = gpio4_opt_clks,
854 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
855 .prcm = {
856 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600857 .module_offs = OMAP3430_PER_MOD,
858 .idlest_reg_id = 1,
859 .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
860 },
861 },
862 .class = &omap3xxx_gpio_hwmod_class,
863 .dev_attr = &gpio_dev_attr,
864};
865
866/* gpio5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600867
868static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
869 { .role = "dbclk", .clk = "gpio5_dbck", },
870};
871
872static struct omap_hwmod omap3xxx_gpio5_hwmod = {
873 .name = "gpio5",
874 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600875 .main_clk = "gpio5_ick",
876 .opt_clks = gpio5_opt_clks,
877 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
878 .prcm = {
879 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600880 .module_offs = OMAP3430_PER_MOD,
881 .idlest_reg_id = 1,
882 .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
883 },
884 },
885 .class = &omap3xxx_gpio_hwmod_class,
886 .dev_attr = &gpio_dev_attr,
887};
888
889/* gpio6 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600890
891static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
892 { .role = "dbclk", .clk = "gpio6_dbck", },
893};
894
895static struct omap_hwmod omap3xxx_gpio6_hwmod = {
896 .name = "gpio6",
897 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600898 .main_clk = "gpio6_ick",
899 .opt_clks = gpio6_opt_clks,
900 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
901 .prcm = {
902 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600903 .module_offs = OMAP3430_PER_MOD,
904 .idlest_reg_id = 1,
905 .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
906 },
907 },
908 .class = &omap3xxx_gpio_hwmod_class,
909 .dev_attr = &gpio_dev_attr,
910};
911
912/* dma attributes */
913static struct omap_dma_dev_attr dma_dev_attr = {
914 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
915 IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
916 .lch_count = 32,
917};
918
919static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
920 .rev_offs = 0x0000,
921 .sysc_offs = 0x002c,
922 .syss_offs = 0x0028,
923 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
924 SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
925 SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
926 SYSS_HAS_RESET_STATUS),
927 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
928 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
929 .sysc_fields = &omap_hwmod_sysc_type1,
930};
931
932static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
933 .name = "dma",
934 .sysc = &omap3xxx_dma_sysc,
935};
936
937/* dma_system */
938static struct omap_hwmod omap3xxx_dma_system_hwmod = {
939 .name = "dma",
940 .class = &omap3xxx_dma_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600941 .main_clk = "core_l3_ick",
942 .prcm = {
943 .omap2 = {
944 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600945 .idlest_reg_id = 1,
946 .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
947 },
948 },
949 .dev_attr = &dma_dev_attr,
950 .flags = HWMOD_NO_IDLEST,
951};
952
953/*
954 * 'mcbsp' class
955 * multi channel buffered serial port controller
956 */
957
958static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = {
959 .sysc_offs = 0x008c,
960 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP |
961 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
962 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
963 .sysc_fields = &omap_hwmod_sysc_type1,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600964};
965
966static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = {
967 .name = "mcbsp",
968 .sysc = &omap3xxx_mcbsp_sysc,
969 .rev = MCBSP_CONFIG_TYPE3,
970};
971
Peter Ujfalusi70391542012-06-18 16:18:43 -0600972/* McBSP functional clock mapping */
973static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = {
974 { .role = "pad_fck", .clk = "mcbsp_clks" },
975 { .role = "prcm_fck", .clk = "core_96m_fck" },
976};
977
978static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = {
979 { .role = "pad_fck", .clk = "mcbsp_clks" },
980 { .role = "prcm_fck", .clk = "per_96m_fck" },
981};
982
Paul Walmsley844a3b62012-04-19 04:04:33 -0600983/* mcbsp1 */
Paul Walmsley844a3b62012-04-19 04:04:33 -0600984
985static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
986 .name = "mcbsp1",
987 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -0600988 .main_clk = "mcbsp1_fck",
989 .prcm = {
990 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -0600991 .module_offs = CORE_MOD,
992 .idlest_reg_id = 1,
993 .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT,
994 },
995 },
Peter Ujfalusi70391542012-06-18 16:18:43 -0600996 .opt_clks = mcbsp15_opt_clks,
997 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -0600998};
999
1000/* mcbsp2 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001001
1002static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
1003 .sidetone = "mcbsp2_sidetone",
1004};
1005
1006static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
1007 .name = "mcbsp2",
1008 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001009 .main_clk = "mcbsp2_fck",
1010 .prcm = {
1011 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001012 .module_offs = OMAP3430_PER_MOD,
1013 .idlest_reg_id = 1,
1014 .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT,
1015 },
1016 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001017 .opt_clks = mcbsp234_opt_clks,
1018 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001019 .dev_attr = &omap34xx_mcbsp2_dev_attr,
1020};
1021
1022/* mcbsp3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001023
1024static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
1025 .sidetone = "mcbsp3_sidetone",
1026};
1027
1028static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
1029 .name = "mcbsp3",
1030 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001031 .main_clk = "mcbsp3_fck",
1032 .prcm = {
1033 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001034 .module_offs = OMAP3430_PER_MOD,
1035 .idlest_reg_id = 1,
1036 .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT,
1037 },
1038 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001039 .opt_clks = mcbsp234_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001041 .dev_attr = &omap34xx_mcbsp3_dev_attr,
1042};
1043
1044/* mcbsp4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001045
Paul Walmsley844a3b62012-04-19 04:04:33 -06001046
1047static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
1048 .name = "mcbsp4",
1049 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001050 .main_clk = "mcbsp4_fck",
1051 .prcm = {
1052 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001053 .module_offs = OMAP3430_PER_MOD,
1054 .idlest_reg_id = 1,
1055 .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT,
1056 },
1057 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001058 .opt_clks = mcbsp234_opt_clks,
1059 .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001060};
1061
1062/* mcbsp5 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001063
Paul Walmsley844a3b62012-04-19 04:04:33 -06001064
1065static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
1066 .name = "mcbsp5",
1067 .class = &omap3xxx_mcbsp_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001068 .main_clk = "mcbsp5_fck",
1069 .prcm = {
1070 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001071 .module_offs = CORE_MOD,
1072 .idlest_reg_id = 1,
1073 .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT,
1074 },
1075 },
Peter Ujfalusi70391542012-06-18 16:18:43 -06001076 .opt_clks = mcbsp15_opt_clks,
1077 .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001078};
1079
1080/* 'mcbsp sidetone' class */
1081static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = {
1082 .sysc_offs = 0x0010,
1083 .sysc_flags = SYSC_HAS_AUTOIDLE,
1084 .sysc_fields = &omap_hwmod_sysc_type1,
1085};
1086
1087static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
1088 .name = "mcbsp_sidetone",
1089 .sysc = &omap3xxx_mcbsp_sidetone_sysc,
1090};
1091
1092/* mcbsp2_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001093
1094static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
1095 .name = "mcbsp2_sidetone",
1096 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001097 .main_clk = "mcbsp2_ick",
1098 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001099};
1100
1101/* mcbsp3_sidetone */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001102
1103static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
1104 .name = "mcbsp3_sidetone",
1105 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
Peter Ujfalusi3b80c9b2016-05-30 11:23:45 +03001106 .main_clk = "mcbsp3_ick",
1107 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001108};
1109
1110/* SR common */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001111static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = {
1112 .sysc_offs = 0x24,
1113 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001114 .sysc_fields = &omap34xx_sr_sysc_fields,
1115};
1116
1117static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = {
1118 .name = "smartreflex",
1119 .sysc = &omap34xx_sr_sysc,
1120 .rev = 1,
1121};
1122
Paul Walmsley844a3b62012-04-19 04:04:33 -06001123static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = {
1124 .sysc_offs = 0x38,
1125 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1126 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
1127 SYSC_NO_CACHE),
1128 .sysc_fields = &omap36xx_sr_sysc_fields,
1129};
1130
1131static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = {
1132 .name = "smartreflex",
1133 .sysc = &omap36xx_sr_sysc,
1134 .rev = 2,
1135};
1136
1137/* SR1 */
1138static struct omap_smartreflex_dev_attr sr1_dev_attr = {
1139 .sensor_voltdm_name = "mpu_iva",
1140};
1141
Paul Walmsley844a3b62012-04-19 04:04:33 -06001142
1143static struct omap_hwmod omap34xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301144 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001145 .class = &omap34xx_smartreflex_hwmod_class,
1146 .main_clk = "sr1_fck",
1147 .prcm = {
1148 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001149 .module_offs = WKUP_MOD,
1150 .idlest_reg_id = 1,
1151 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1152 },
1153 },
1154 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001155 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1156};
1157
1158static struct omap_hwmod omap36xx_sr1_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301159 .name = "smartreflex_mpu_iva",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001160 .class = &omap36xx_smartreflex_hwmod_class,
1161 .main_clk = "sr1_fck",
1162 .prcm = {
1163 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001164 .module_offs = WKUP_MOD,
1165 .idlest_reg_id = 1,
1166 .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
1167 },
1168 },
1169 .dev_attr = &sr1_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001170};
1171
1172/* SR2 */
1173static struct omap_smartreflex_dev_attr sr2_dev_attr = {
1174 .sensor_voltdm_name = "core",
1175};
1176
Paul Walmsley844a3b62012-04-19 04:04:33 -06001177
1178static struct omap_hwmod omap34xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301179 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001180 .class = &omap34xx_smartreflex_hwmod_class,
1181 .main_clk = "sr2_fck",
1182 .prcm = {
1183 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001184 .module_offs = WKUP_MOD,
1185 .idlest_reg_id = 1,
1186 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1187 },
1188 },
1189 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001190 .flags = HWMOD_SET_DEFAULT_CLOCKACT,
1191};
1192
1193static struct omap_hwmod omap36xx_sr2_hwmod = {
Jean Pihet1fcd3062012-04-24 10:47:14 +05301194 .name = "smartreflex_core",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001195 .class = &omap36xx_smartreflex_hwmod_class,
1196 .main_clk = "sr2_fck",
1197 .prcm = {
1198 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001199 .module_offs = WKUP_MOD,
1200 .idlest_reg_id = 1,
1201 .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
1202 },
1203 },
1204 .dev_attr = &sr2_dev_attr,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001205};
1206
1207/*
1208 * 'mailbox' class
1209 * mailbox module allowing communication between the on-chip processors
1210 * using a queued mailbox-interrupt mechanism.
1211 */
1212
1213static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = {
1214 .rev_offs = 0x000,
1215 .sysc_offs = 0x010,
1216 .syss_offs = 0x014,
1217 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1218 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1219 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1220 .sysc_fields = &omap_hwmod_sysc_type1,
1221};
1222
1223static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
1224 .name = "mailbox",
1225 .sysc = &omap3xxx_mailbox_sysc,
1226};
1227
Paul Walmsley844a3b62012-04-19 04:04:33 -06001228static struct omap_hwmod omap3xxx_mailbox_hwmod = {
1229 .name = "mailbox",
1230 .class = &omap3xxx_mailbox_hwmod_class,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001231 .main_clk = "mailboxes_ick",
1232 .prcm = {
1233 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001234 .module_offs = CORE_MOD,
1235 .idlest_reg_id = 1,
1236 .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT,
1237 },
1238 },
1239};
1240
1241/*
1242 * 'mcspi' class
1243 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1244 * bus
1245 */
1246
1247static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = {
1248 .rev_offs = 0x0000,
1249 .sysc_offs = 0x0010,
1250 .syss_offs = 0x0014,
1251 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1252 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1253 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1254 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1255 .sysc_fields = &omap_hwmod_sysc_type1,
1256};
1257
1258static struct omap_hwmod_class omap34xx_mcspi_class = {
1259 .name = "mcspi",
1260 .sysc = &omap34xx_mcspi_sysc,
1261 .rev = OMAP3_MCSPI_REV,
1262};
1263
1264/* mcspi1 */
1265static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1266 .num_chipselect = 4,
1267};
1268
1269static struct omap_hwmod omap34xx_mcspi1 = {
1270 .name = "mcspi1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001271 .main_clk = "mcspi1_fck",
1272 .prcm = {
1273 .omap2 = {
1274 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001275 .idlest_reg_id = 1,
1276 .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT,
1277 },
1278 },
1279 .class = &omap34xx_mcspi_class,
1280 .dev_attr = &omap_mcspi1_dev_attr,
1281};
1282
1283/* mcspi2 */
1284static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1285 .num_chipselect = 2,
1286};
1287
1288static struct omap_hwmod omap34xx_mcspi2 = {
1289 .name = "mcspi2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001290 .main_clk = "mcspi2_fck",
1291 .prcm = {
1292 .omap2 = {
1293 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001294 .idlest_reg_id = 1,
1295 .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT,
1296 },
1297 },
1298 .class = &omap34xx_mcspi_class,
1299 .dev_attr = &omap_mcspi2_dev_attr,
1300};
1301
1302/* mcspi3 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001303
Paul Walmsley844a3b62012-04-19 04:04:33 -06001304
1305static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
1306 .num_chipselect = 2,
1307};
1308
1309static struct omap_hwmod omap34xx_mcspi3 = {
1310 .name = "mcspi3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001311 .main_clk = "mcspi3_fck",
1312 .prcm = {
1313 .omap2 = {
1314 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001315 .idlest_reg_id = 1,
1316 .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT,
1317 },
1318 },
1319 .class = &omap34xx_mcspi_class,
1320 .dev_attr = &omap_mcspi3_dev_attr,
1321};
1322
1323/* mcspi4 */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001324
Paul Walmsley844a3b62012-04-19 04:04:33 -06001325
1326static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
1327 .num_chipselect = 1,
1328};
1329
1330static struct omap_hwmod omap34xx_mcspi4 = {
1331 .name = "mcspi4",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001332 .main_clk = "mcspi4_fck",
1333 .prcm = {
1334 .omap2 = {
1335 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001336 .idlest_reg_id = 1,
1337 .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT,
1338 },
1339 },
1340 .class = &omap34xx_mcspi_class,
1341 .dev_attr = &omap_mcspi4_dev_attr,
1342};
1343
1344/* usbhsotg */
1345static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = {
1346 .rev_offs = 0x0400,
1347 .sysc_offs = 0x0404,
1348 .syss_offs = 0x0408,
1349 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
1350 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1351 SYSC_HAS_AUTOIDLE),
1352 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1353 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1354 .sysc_fields = &omap_hwmod_sysc_type1,
1355};
1356
1357static struct omap_hwmod_class usbotg_class = {
1358 .name = "usbotg",
1359 .sysc = &omap3xxx_usbhsotg_sysc,
1360};
1361
1362/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001363
1364static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
1365 .name = "usb_otg_hs",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001366 .main_clk = "hsotgusb_ick",
1367 .prcm = {
1368 .omap2 = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001369 .module_offs = CORE_MOD,
1370 .idlest_reg_id = 1,
1371 .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001372 },
1373 },
1374 .class = &usbotg_class,
1375
1376 /*
1377 * Erratum ID: i479 idle_req / idle_ack mechanism potentially
1378 * broken when autoidle is enabled
1379 * workaround is to disable the autoidle bit at module level.
Grazvydas Ignotas092bc082013-03-11 21:49:00 +02001380 *
1381 * Enabling the device in any other MIDLEMODE setting but force-idle
1382 * causes core_pwrdm not enter idle states at least on OMAP3630.
1383 * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
1384 * signal when MIDLEMODE is set to force-idle.
Paul Walmsley844a3b62012-04-19 04:04:33 -06001385 */
Tony Lindgren6a08b112014-09-18 08:58:28 -07001386 .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
1387 HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001388};
1389
1390/* usb_otg_hs */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001391
1392static struct omap_hwmod_class am35xx_usbotg_class = {
1393 .name = "am35xx_usbotg",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001394};
1395
1396static struct omap_hwmod am35xx_usbhsotg_hwmod = {
1397 .name = "am35x_otg_hs",
Paul Walmsley89ea2582012-06-27 14:53:46 -06001398 .main_clk = "hsotgusb_fck",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001399 .class = &am35xx_usbotg_class,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001400 .flags = HWMOD_NO_IDLEST,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001401};
1402
1403/* MMC/SD/SDIO common */
1404static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = {
1405 .rev_offs = 0x1fc,
1406 .sysc_offs = 0x10,
1407 .syss_offs = 0x14,
1408 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1409 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1410 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1411 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1412 .sysc_fields = &omap_hwmod_sysc_type1,
1413};
1414
1415static struct omap_hwmod_class omap34xx_mmc_class = {
1416 .name = "mmc",
1417 .sysc = &omap34xx_mmc_sysc,
1418};
1419
1420/* MMC/SD/SDIO1 */
1421
Paul Walmsley844a3b62012-04-19 04:04:33 -06001422
Paul Walmsley844a3b62012-04-19 04:04:33 -06001423
1424static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
1425 { .role = "dbck", .clk = "omap_32k_fck", },
1426};
1427
Andreas Fenkart551434382014-11-08 15:33:09 +01001428static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001429 .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
1430};
1431
1432/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart551434382014-11-08 15:33:09 +01001433static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001434 .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT |
1435 OMAP_HSMMC_BROKEN_MULTIBLOCK_READ),
1436};
1437
1438static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = {
1439 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001440 .opt_clks = omap34xx_mmc1_opt_clks,
1441 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1442 .main_clk = "mmchs1_fck",
1443 .prcm = {
1444 .omap2 = {
1445 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001446 .idlest_reg_id = 1,
1447 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1448 },
1449 },
1450 .dev_attr = &mmc1_pre_es3_dev_attr,
1451 .class = &omap34xx_mmc_class,
1452};
1453
1454static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = {
1455 .name = "mmc1",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001456 .opt_clks = omap34xx_mmc1_opt_clks,
1457 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
1458 .main_clk = "mmchs1_fck",
1459 .prcm = {
1460 .omap2 = {
1461 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001462 .idlest_reg_id = 1,
1463 .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT,
1464 },
1465 },
1466 .dev_attr = &mmc1_dev_attr,
1467 .class = &omap34xx_mmc_class,
1468};
1469
1470/* MMC/SD/SDIO2 */
1471
Paul Walmsley844a3b62012-04-19 04:04:33 -06001472
Paul Walmsley844a3b62012-04-19 04:04:33 -06001473
1474static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
1475 { .role = "dbck", .clk = "omap_32k_fck", },
1476};
1477
1478/* See 35xx errata 2.1.1.128 in SPRZ278F */
Andreas Fenkart551434382014-11-08 15:33:09 +01001479static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = {
Paul Walmsley844a3b62012-04-19 04:04:33 -06001480 .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ,
1481};
1482
1483static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = {
1484 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001485 .opt_clks = omap34xx_mmc2_opt_clks,
1486 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1487 .main_clk = "mmchs2_fck",
1488 .prcm = {
1489 .omap2 = {
1490 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001491 .idlest_reg_id = 1,
1492 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1493 },
1494 },
1495 .dev_attr = &mmc2_pre_es3_dev_attr,
1496 .class = &omap34xx_mmc_class,
1497};
1498
1499static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = {
1500 .name = "mmc2",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001501 .opt_clks = omap34xx_mmc2_opt_clks,
1502 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
1503 .main_clk = "mmchs2_fck",
1504 .prcm = {
1505 .omap2 = {
1506 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001507 .idlest_reg_id = 1,
1508 .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT,
1509 },
1510 },
1511 .class = &omap34xx_mmc_class,
1512};
1513
1514/* MMC/SD/SDIO3 */
1515
Paul Walmsley844a3b62012-04-19 04:04:33 -06001516
Paul Walmsley844a3b62012-04-19 04:04:33 -06001517
1518static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
1519 { .role = "dbck", .clk = "omap_32k_fck", },
1520};
1521
1522static struct omap_hwmod omap3xxx_mmc3_hwmod = {
1523 .name = "mmc3",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001524 .opt_clks = omap34xx_mmc3_opt_clks,
1525 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
1526 .main_clk = "mmchs3_fck",
1527 .prcm = {
1528 .omap2 = {
Tony Lindgrena7cb4672017-12-14 08:23:33 -08001529 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001530 .idlest_reg_id = 1,
1531 .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT,
1532 },
1533 },
1534 .class = &omap34xx_mmc_class,
1535};
1536
1537/*
1538 * 'usb_host_hs' class
1539 * high-speed multi-port usb host controller
1540 */
1541
1542static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = {
1543 .rev_offs = 0x0000,
1544 .sysc_offs = 0x0010,
1545 .syss_offs = 0x0014,
1546 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1547 SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP |
Roger Quadros7f4d3642013-12-08 18:39:02 -07001548 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1549 SYSS_HAS_RESET_STATUS),
Paul Walmsley844a3b62012-04-19 04:04:33 -06001550 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1551 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1552 .sysc_fields = &omap_hwmod_sysc_type1,
1553};
1554
1555static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = {
1556 .name = "usb_host_hs",
1557 .sysc = &omap3xxx_usb_host_hs_sysc,
1558};
1559
Paul Walmsley844a3b62012-04-19 04:04:33 -06001560
1561static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
1562 .name = "usb_host_hs",
1563 .class = &omap3xxx_usb_host_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001564 .clkdm_name = "usbhost_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001565 .main_clk = "usbhost_48m_fck",
1566 .prcm = {
1567 .omap2 = {
1568 .module_offs = OMAP3430ES2_USBHOST_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001569 .idlest_reg_id = 1,
1570 .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001571 },
1572 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06001573
1574 /*
1575 * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
1576 * id: i660
1577 *
1578 * Description:
1579 * In the following configuration :
1580 * - USBHOST module is set to smart-idle mode
1581 * - PRCM asserts idle_req to the USBHOST module ( This typically
1582 * happens when the system is going to a low power mode : all ports
1583 * have been suspended, the master part of the USBHOST module has
1584 * entered the standby state, and SW has cut the functional clocks)
1585 * - an USBHOST interrupt occurs before the module is able to answer
1586 * idle_ack, typically a remote wakeup IRQ.
1587 * Then the USB HOST module will enter a deadlock situation where it
1588 * is no more accessible nor functional.
1589 *
1590 * Workaround:
1591 * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE
1592 */
1593
1594 /*
1595 * Errata: USB host EHCI may stall when entering smart-standby mode
1596 * Id: i571
1597 *
1598 * Description:
1599 * When the USBHOST module is set to smart-standby mode, and when it is
1600 * ready to enter the standby state (i.e. all ports are suspended and
1601 * all attached devices are in suspend mode), then it can wrongly assert
1602 * the Mstandby signal too early while there are still some residual OCP
1603 * transactions ongoing. If this condition occurs, the internal state
1604 * machine may go to an undefined state and the USB link may be stuck
1605 * upon the next resume.
1606 *
1607 * Workaround:
1608 * Don't use smart standby; use only force standby,
1609 * hence HWMOD_SWSUP_MSTANDBY
1610 */
1611
Roger Quadros7f4d3642013-12-08 18:39:02 -07001612 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001613};
1614
1615/*
1616 * 'usb_tll_hs' class
1617 * usb_tll_hs module is the adapter on the usb_host_hs ports
1618 */
1619static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = {
1620 .rev_offs = 0x0000,
1621 .sysc_offs = 0x0010,
1622 .syss_offs = 0x0014,
1623 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1624 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1625 SYSC_HAS_AUTOIDLE),
1626 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1627 .sysc_fields = &omap_hwmod_sysc_type1,
1628};
1629
1630static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = {
1631 .name = "usb_tll_hs",
1632 .sysc = &omap3xxx_usb_tll_hs_sysc,
1633};
1634
Paul Walmsley844a3b62012-04-19 04:04:33 -06001635
1636static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1637 .name = "usb_tll_hs",
1638 .class = &omap3xxx_usb_tll_hs_hwmod_class,
Roger Quadrosc6c56692014-04-10 10:18:17 +03001639 .clkdm_name = "core_l4_clkdm",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001640 .main_clk = "usbtll_fck",
1641 .prcm = {
1642 .omap2 = {
1643 .module_offs = CORE_MOD,
Paul Walmsley844a3b62012-04-19 04:04:33 -06001644 .idlest_reg_id = 3,
1645 .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT,
1646 },
1647 },
1648};
1649
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001650static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1651 .name = "hdq1w",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001652 .main_clk = "hdq_fck",
1653 .prcm = {
1654 .omap2 = {
1655 .module_offs = CORE_MOD,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06001656 .idlest_reg_id = 1,
1657 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1658 },
1659 },
1660 .class = &omap2_hdq1w_class,
1661};
1662
Tero Kristo8f993a02012-09-23 17:28:21 -06001663/* SAD2D */
1664static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = {
1665 { .name = "rst_modem_pwron_sw", .rst_shift = 0 },
1666 { .name = "rst_modem_sw", .rst_shift = 1 },
1667};
1668
1669static struct omap_hwmod_class omap3xxx_sad2d_class = {
1670 .name = "sad2d",
1671};
1672
1673static struct omap_hwmod omap3xxx_sad2d_hwmod = {
1674 .name = "sad2d",
1675 .rst_lines = omap3xxx_sad2d_resets,
1676 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets),
1677 .main_clk = "sad2d_ick",
1678 .prcm = {
1679 .omap2 = {
1680 .module_offs = CORE_MOD,
Tero Kristo8f993a02012-09-23 17:28:21 -06001681 .idlest_reg_id = 1,
1682 .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT,
1683 },
1684 },
1685 .class = &omap3xxx_sad2d_class,
1686};
1687
Paul Walmsley844a3b62012-04-19 04:04:33 -06001688/*
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001689 * '32K sync counter' class
1690 * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock
1691 */
1692static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = {
1693 .rev_offs = 0x0000,
1694 .sysc_offs = 0x0004,
1695 .sysc_flags = SYSC_HAS_SIDLEMODE,
1696 .idlemodes = (SIDLE_FORCE | SIDLE_NO),
1697 .sysc_fields = &omap_hwmod_sysc_type1,
1698};
1699
1700static struct omap_hwmod_class omap3xxx_counter_hwmod_class = {
1701 .name = "counter",
1702 .sysc = &omap3xxx_counter_sysc,
1703};
1704
1705static struct omap_hwmod omap3xxx_counter_32k_hwmod = {
1706 .name = "counter_32k",
1707 .class = &omap3xxx_counter_hwmod_class,
1708 .clkdm_name = "wkup_clkdm",
1709 .flags = HWMOD_SWSUP_SIDLE,
1710 .main_clk = "wkup_32k_fck",
1711 .prcm = {
1712 .omap2 = {
1713 .module_offs = WKUP_MOD,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06001714 .idlest_reg_id = 1,
1715 .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT,
1716 },
1717 },
1718};
1719
Paul Walmsley844a3b62012-04-19 04:04:33 -06001720/*
Afzal Mohammed49484a62012-09-23 17:28:24 -06001721 * 'gpmc' class
1722 * general purpose memory controller
1723 */
1724
1725static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = {
1726 .rev_offs = 0x0000,
1727 .sysc_offs = 0x0010,
1728 .syss_offs = 0x0014,
1729 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
1730 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
1731 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1732 .sysc_fields = &omap_hwmod_sysc_type1,
1733};
1734
1735static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = {
1736 .name = "gpmc",
1737 .sysc = &omap3xxx_gpmc_sysc,
1738};
1739
Afzal Mohammed49484a62012-09-23 17:28:24 -06001740static struct omap_hwmod omap3xxx_gpmc_hwmod = {
1741 .name = "gpmc",
1742 .class = &omap3xxx_gpmc_hwmod_class,
1743 .clkdm_name = "core_l3_clkdm",
Afzal Mohammed49484a62012-09-23 17:28:24 -06001744 .main_clk = "gpmc_fck",
Tony Lindgren63aa9452015-06-01 19:22:10 -06001745 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
1746 .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
Afzal Mohammed49484a62012-09-23 17:28:24 -06001747};
1748
1749/*
Paul Walmsley844a3b62012-04-19 04:04:33 -06001750 * interfaces
1751 */
Charulatha Vdc48e5f2011-02-24 15:16:49 +05301752
Paul Walmsley73591542010-02-22 22:09:32 -07001753/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001754static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
1755 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001756 .slave = &omap3xxx_l4_core_hwmod,
1757 .user = OCP_USER_MPU | OCP_USER_SDMA,
1758};
1759
1760/* L3 -> L4_PER interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001761static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
1762 .master = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001763 .slave = &omap3xxx_l4_per_hwmod,
1764 .user = OCP_USER_MPU | OCP_USER_SDMA,
1765};
1766
sricharan4bb194d2011-02-08 22:13:37 +05301767
Paul Walmsley73591542010-02-22 22:09:32 -07001768/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -06001769static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
sricharan4bb194d2011-02-08 22:13:37 +05301770 .master = &omap3xxx_mpu_hwmod,
1771 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley73591542010-02-22 22:09:32 -07001772 .user = OCP_USER_MPU,
1773};
1774
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001775
1776/* l3 -> debugss */
1777static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
1778 .master = &omap3xxx_l3_main_hwmod,
1779 .slave = &omap3xxx_debugss_hwmod,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06001780 .user = OCP_USER_MPU,
1781};
1782
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001783/* DSS -> l3 */
Paul Walmsleyd69dc642012-04-19 04:03:52 -06001784static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = {
1785 .master = &omap3430es1_dss_core_hwmod,
1786 .slave = &omap3xxx_l3_main_hwmod,
1787 .user = OCP_USER_MPU | OCP_USER_SDMA,
1788};
1789
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001790static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = {
1791 .master = &omap3xxx_dss_core_hwmod,
1792 .slave = &omap3xxx_l3_main_hwmod,
1793 .fw = {
1794 .omap2 = {
1795 .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS,
1796 .flags = OMAP_FIREWALL_L3,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001797 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00001798 },
1799 .user = OCP_USER_MPU | OCP_USER_SDMA,
1800};
1801
Hema HK870ea2b2011-02-17 12:07:18 +05301802/* l3_core -> usbhsotg interface */
1803static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = {
1804 .master = &omap3xxx_usbhsotg_hwmod,
1805 .slave = &omap3xxx_l3_main_hwmod,
1806 .clk = "core_l3_ick",
1807 .user = OCP_USER_MPU,
1808};
Paul Walmsley73591542010-02-22 22:09:32 -07001809
Hema HK273ff8c2011-02-17 12:07:19 +05301810/* l3_core -> am35xx_usbhsotg interface */
1811static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = {
1812 .master = &am35xx_usbhsotg_hwmod,
1813 .slave = &omap3xxx_l3_main_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06001814 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05301815 .user = OCP_USER_MPU,
1816};
Paul Walmsley89ea2582012-06-27 14:53:46 -06001817
Tero Kristo8f993a02012-09-23 17:28:21 -06001818/* l3_core -> sad2d interface */
1819static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = {
1820 .master = &omap3xxx_sad2d_hwmod,
1821 .slave = &omap3xxx_l3_main_hwmod,
1822 .clk = "core_l3_ick",
1823 .user = OCP_USER_MPU,
1824};
1825
Paul Walmsley73591542010-02-22 22:09:32 -07001826/* L4_CORE -> L4_WKUP interface */
1827static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
1828 .master = &omap3xxx_l4_core_hwmod,
1829 .slave = &omap3xxx_l4_wkup_hwmod,
1830 .user = OCP_USER_MPU | OCP_USER_SDMA,
1831};
1832
Paul Walmsleyb1636052011-03-01 13:12:56 -08001833/* L4 CORE -> MMC1 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001834static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001835 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001836 .slave = &omap3xxx_pre_es3_mmc1_hwmod,
1837 .clk = "mmchs1_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001838 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001839 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001840};
1841
1842static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = {
1843 .master = &omap3xxx_l4_core_hwmod,
1844 .slave = &omap3xxx_es3plus_mmc1_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001845 .clk = "mmchs1_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001846 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001847 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001848};
1849
1850/* L4 CORE -> MMC2 interface */
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001851static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = {
Paul Walmsleyb1636052011-03-01 13:12:56 -08001852 .master = &omap3xxx_l4_core_hwmod,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001853 .slave = &omap3xxx_pre_es3_mmc2_hwmod,
1854 .clk = "mmchs2_ick",
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001855 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001856 .flags = OMAP_FIREWALL_L4,
Paul Walmsley4a9efb62012-04-19 04:03:51 -06001857};
1858
1859static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = {
1860 .master = &omap3xxx_l4_core_hwmod,
1861 .slave = &omap3xxx_es3plus_mmc2_hwmod,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001862 .clk = "mmchs2_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001863 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001864 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001865};
1866
1867/* L4 CORE -> MMC3 interface */
Paul Walmsleyb1636052011-03-01 13:12:56 -08001868
1869static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
1870 .master = &omap3xxx_l4_core_hwmod,
1871 .slave = &omap3xxx_mmc3_hwmod,
1872 .clk = "mmchs3_ick",
Paul Walmsleyb1636052011-03-01 13:12:56 -08001873 .user = OCP_USER_MPU | OCP_USER_SDMA,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001874 .flags = OMAP_FIREWALL_L4,
Paul Walmsleyb1636052011-03-01 13:12:56 -08001875};
1876
Kevin Hilman046465b2010-09-27 20:19:30 +05301877/* L4 CORE -> UART1 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05301878
1879static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
1880 .master = &omap3xxx_l4_core_hwmod,
1881 .slave = &omap3xxx_uart1_hwmod,
1882 .clk = "uart1_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05301883 .user = OCP_USER_MPU | OCP_USER_SDMA,
1884};
1885
1886/* L4 CORE -> UART2 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05301887
1888static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
1889 .master = &omap3xxx_l4_core_hwmod,
1890 .slave = &omap3xxx_uart2_hwmod,
1891 .clk = "uart2_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05301892 .user = OCP_USER_MPU | OCP_USER_SDMA,
1893};
1894
1895/* L4 PER -> UART3 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05301896
1897static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
1898 .master = &omap3xxx_l4_per_hwmod,
1899 .slave = &omap3xxx_uart3_hwmod,
1900 .clk = "uart3_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05301901 .user = OCP_USER_MPU | OCP_USER_SDMA,
1902};
1903
1904/* L4 PER -> UART4 interface */
Kevin Hilman046465b2010-09-27 20:19:30 +05301905
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001906static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
Kevin Hilman046465b2010-09-27 20:19:30 +05301907 .master = &omap3xxx_l4_per_hwmod,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001908 .slave = &omap36xx_uart4_hwmod,
Kevin Hilman046465b2010-09-27 20:19:30 +05301909 .clk = "uart4_ick",
Kevin Hilman046465b2010-09-27 20:19:30 +05301910 .user = OCP_USER_MPU | OCP_USER_SDMA,
1911};
1912
Kyle Manna4bf90f62011-10-18 13:47:41 -05001913/* AM35xx: L4 CORE -> UART4 interface */
Kyle Manna4bf90f62011-10-18 13:47:41 -05001914
1915static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001916 .master = &omap3xxx_l4_core_hwmod,
1917 .slave = &am35xx_uart4_hwmod,
1918 .clk = "uart4_ick",
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06001919 .user = OCP_USER_MPU | OCP_USER_SDMA,
Kyle Manna4bf90f62011-10-18 13:47:41 -05001920};
1921
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301922/* L4 CORE -> I2C1 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301923static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
1924 .master = &omap3xxx_l4_core_hwmod,
1925 .slave = &omap3xxx_i2c1_hwmod,
1926 .clk = "i2c1_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301927 .fw = {
1928 .omap2 = {
1929 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
1930 .l4_prot_group = 7,
1931 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001932 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301933 },
1934 .user = OCP_USER_MPU | OCP_USER_SDMA,
1935};
1936
1937/* L4 CORE -> I2C2 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301938static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
1939 .master = &omap3xxx_l4_core_hwmod,
1940 .slave = &omap3xxx_i2c2_hwmod,
1941 .clk = "i2c2_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301942 .fw = {
1943 .omap2 = {
1944 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
1945 .l4_prot_group = 7,
1946 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001947 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301948 },
1949 .user = OCP_USER_MPU | OCP_USER_SDMA,
1950};
1951
1952/* L4 CORE -> I2C3 interface */
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301953
1954static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
1955 .master = &omap3xxx_l4_core_hwmod,
1956 .slave = &omap3xxx_i2c3_hwmod,
1957 .clk = "i2c3_ick",
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301958 .fw = {
1959 .omap2 = {
1960 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
1961 .l4_prot_group = 7,
1962 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07001963 },
Rajendra Nayak4fe20e92010-09-21 19:37:13 +05301964 },
1965 .user = OCP_USER_MPU | OCP_USER_SDMA,
1966};
1967
Thara Gopinathd3442722010-05-29 22:02:24 +05301968/* L4 CORE -> SR1 interface */
Paul Walmsley844a3b62012-04-19 04:04:33 -06001969static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05301970 .master = &omap3xxx_l4_core_hwmod,
1971 .slave = &omap34xx_sr1_hwmod,
1972 .clk = "sr_l4_ick",
Thara Gopinathd3442722010-05-29 22:02:24 +05301973 .user = OCP_USER_MPU,
1974};
1975
Paul Walmsley844a3b62012-04-19 04:04:33 -06001976static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
1977 .master = &omap3xxx_l4_core_hwmod,
1978 .slave = &omap36xx_sr1_hwmod,
1979 .clk = "sr_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001980 .user = OCP_USER_MPU,
1981};
1982
Tony Lindgren9cffb1a2017-10-10 14:27:33 -07001983/* L4 CORE -> SR2 interface */
Thara Gopinathd3442722010-05-29 22:02:24 +05301984
Paul Walmsley844a3b62012-04-19 04:04:33 -06001985static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
Thara Gopinathd3442722010-05-29 22:02:24 +05301986 .master = &omap3xxx_l4_core_hwmod,
1987 .slave = &omap34xx_sr2_hwmod,
1988 .clk = "sr_l4_ick",
Thara Gopinathd3442722010-05-29 22:02:24 +05301989 .user = OCP_USER_MPU,
1990};
1991
Paul Walmsley844a3b62012-04-19 04:04:33 -06001992static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
1993 .master = &omap3xxx_l4_core_hwmod,
1994 .slave = &omap36xx_sr2_hwmod,
1995 .clk = "sr_l4_ick",
Paul Walmsley844a3b62012-04-19 04:04:33 -06001996 .user = OCP_USER_MPU,
1997};
Hema HK870ea2b2011-02-17 12:07:18 +05301998
Hema HK870ea2b2011-02-17 12:07:18 +05301999
2000/* l4_core -> usbhsotg */
2001static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
2002 .master = &omap3xxx_l4_core_hwmod,
2003 .slave = &omap3xxx_usbhsotg_hwmod,
2004 .clk = "l4_ick",
Hema HK870ea2b2011-02-17 12:07:18 +05302005 .user = OCP_USER_MPU,
2006};
2007
Hema HK273ff8c2011-02-17 12:07:19 +05302008
2009/* l4_core -> usbhsotg */
2010static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
2011 .master = &omap3xxx_l4_core_hwmod,
2012 .slave = &am35xx_usbhsotg_hwmod,
Paul Walmsley89ea2582012-06-27 14:53:46 -06002013 .clk = "hsotgusb_ick",
Hema HK273ff8c2011-02-17 12:07:19 +05302014 .user = OCP_USER_MPU,
2015};
2016
Paul Walmsley43085702012-04-19 04:03:53 -06002017/* L4_WKUP -> L4_SEC interface */
2018static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = {
2019 .master = &omap3xxx_l4_wkup_hwmod,
2020 .slave = &omap3xxx_l4_sec_hwmod,
2021 .user = OCP_USER_MPU | OCP_USER_SDMA,
2022};
2023
Kevin Hilman540064b2010-07-26 16:34:32 -06002024/* IVA2 <- L3 interface */
2025static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
2026 .master = &omap3xxx_l3_main_hwmod,
2027 .slave = &omap3xxx_iva_hwmod,
Paul Walmsley064931a2012-04-19 04:04:35 -06002028 .clk = "core_l3_ick",
Kevin Hilman540064b2010-07-26 16:34:32 -06002029 .user = OCP_USER_MPU | OCP_USER_SDMA,
2030};
2031
Thara Gopinathce722d22011-02-23 00:14:05 -07002032
2033/* l4_wkup -> timer1 */
2034static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
2035 .master = &omap3xxx_l4_wkup_hwmod,
2036 .slave = &omap3xxx_timer1_hwmod,
2037 .clk = "gpt1_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002038 .user = OCP_USER_MPU | OCP_USER_SDMA,
2039};
2040
Thara Gopinathce722d22011-02-23 00:14:05 -07002041
2042/* l4_per -> timer2 */
2043static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
2044 .master = &omap3xxx_l4_per_hwmod,
2045 .slave = &omap3xxx_timer2_hwmod,
2046 .clk = "gpt2_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002047 .user = OCP_USER_MPU | OCP_USER_SDMA,
2048};
2049
Thara Gopinathce722d22011-02-23 00:14:05 -07002050
2051/* l4_per -> timer3 */
2052static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
2053 .master = &omap3xxx_l4_per_hwmod,
2054 .slave = &omap3xxx_timer3_hwmod,
2055 .clk = "gpt3_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002056 .user = OCP_USER_MPU | OCP_USER_SDMA,
2057};
2058
Thara Gopinathce722d22011-02-23 00:14:05 -07002059
2060/* l4_per -> timer4 */
2061static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
2062 .master = &omap3xxx_l4_per_hwmod,
2063 .slave = &omap3xxx_timer4_hwmod,
2064 .clk = "gpt4_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002065 .user = OCP_USER_MPU | OCP_USER_SDMA,
2066};
2067
Thara Gopinathce722d22011-02-23 00:14:05 -07002068
2069/* l4_per -> timer5 */
2070static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
2071 .master = &omap3xxx_l4_per_hwmod,
2072 .slave = &omap3xxx_timer5_hwmod,
2073 .clk = "gpt5_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002074 .user = OCP_USER_MPU | OCP_USER_SDMA,
2075};
2076
Thara Gopinathce722d22011-02-23 00:14:05 -07002077
2078/* l4_per -> timer6 */
2079static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
2080 .master = &omap3xxx_l4_per_hwmod,
2081 .slave = &omap3xxx_timer6_hwmod,
2082 .clk = "gpt6_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002083 .user = OCP_USER_MPU | OCP_USER_SDMA,
2084};
2085
Thara Gopinathce722d22011-02-23 00:14:05 -07002086
2087/* l4_per -> timer7 */
2088static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
2089 .master = &omap3xxx_l4_per_hwmod,
2090 .slave = &omap3xxx_timer7_hwmod,
2091 .clk = "gpt7_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002092 .user = OCP_USER_MPU | OCP_USER_SDMA,
2093};
2094
Thara Gopinathce722d22011-02-23 00:14:05 -07002095
2096/* l4_per -> timer8 */
2097static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
2098 .master = &omap3xxx_l4_per_hwmod,
2099 .slave = &omap3xxx_timer8_hwmod,
2100 .clk = "gpt8_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002101 .user = OCP_USER_MPU | OCP_USER_SDMA,
2102};
2103
Thara Gopinathce722d22011-02-23 00:14:05 -07002104
2105/* l4_per -> timer9 */
2106static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
2107 .master = &omap3xxx_l4_per_hwmod,
2108 .slave = &omap3xxx_timer9_hwmod,
2109 .clk = "gpt9_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002110 .user = OCP_USER_MPU | OCP_USER_SDMA,
2111};
2112
Thara Gopinathce722d22011-02-23 00:14:05 -07002113/* l4_core -> timer10 */
2114static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
2115 .master = &omap3xxx_l4_core_hwmod,
2116 .slave = &omap3xxx_timer10_hwmod,
2117 .clk = "gpt10_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002118 .user = OCP_USER_MPU | OCP_USER_SDMA,
2119};
2120
Thara Gopinathce722d22011-02-23 00:14:05 -07002121/* l4_core -> timer11 */
2122static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
2123 .master = &omap3xxx_l4_core_hwmod,
2124 .slave = &omap3xxx_timer11_hwmod,
2125 .clk = "gpt11_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002126 .user = OCP_USER_MPU | OCP_USER_SDMA,
2127};
2128
Thara Gopinathce722d22011-02-23 00:14:05 -07002129
2130/* l4_core -> timer12 */
Paul Walmsley43085702012-04-19 04:03:53 -06002131static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = {
2132 .master = &omap3xxx_l4_sec_hwmod,
Thara Gopinathce722d22011-02-23 00:14:05 -07002133 .slave = &omap3xxx_timer12_hwmod,
2134 .clk = "gpt12_ick",
Thara Gopinathce722d22011-02-23 00:14:05 -07002135 .user = OCP_USER_MPU | OCP_USER_SDMA,
2136};
2137
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302138/* l4_wkup -> wd_timer2 */
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302139
2140static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
2141 .master = &omap3xxx_l4_wkup_hwmod,
2142 .slave = &omap3xxx_wd_timer2_hwmod,
2143 .clk = "wdt2_ick",
Varadarajan, Charulatha6b667f82010-09-23 20:02:38 +05302144 .user = OCP_USER_MPU | OCP_USER_SDMA,
2145};
2146
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002147/* l4_core -> dss */
2148static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
2149 .master = &omap3xxx_l4_core_hwmod,
2150 .slave = &omap3430es1_dss_core_hwmod,
2151 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002152 .fw = {
2153 .omap2 = {
2154 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
2155 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2156 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002157 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002158 },
2159 .user = OCP_USER_MPU | OCP_USER_SDMA,
2160};
2161
2162static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
2163 .master = &omap3xxx_l4_core_hwmod,
2164 .slave = &omap3xxx_dss_core_hwmod,
2165 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002166 .fw = {
2167 .omap2 = {
2168 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
2169 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2170 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002171 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002172 },
2173 .user = OCP_USER_MPU | OCP_USER_SDMA,
2174};
2175
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002176/* l4_core -> dss_dispc */
2177static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
2178 .master = &omap3xxx_l4_core_hwmod,
2179 .slave = &omap3xxx_dss_dispc_hwmod,
2180 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002181 .fw = {
2182 .omap2 = {
2183 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
2184 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2185 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002186 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002187 },
2188 .user = OCP_USER_MPU | OCP_USER_SDMA,
2189};
2190
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002191/* l4_core -> dss_dsi1 */
2192static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
2193 .master = &omap3xxx_l4_core_hwmod,
2194 .slave = &omap3xxx_dss_dsi1_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002195 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002196 .fw = {
2197 .omap2 = {
2198 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
2199 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2200 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002201 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002202 },
2203 .user = OCP_USER_MPU | OCP_USER_SDMA,
2204};
2205
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002206/* l4_core -> dss_rfbi */
2207static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
2208 .master = &omap3xxx_l4_core_hwmod,
2209 .slave = &omap3xxx_dss_rfbi_hwmod,
2210 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002211 .fw = {
2212 .omap2 = {
2213 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
2214 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP ,
2215 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002216 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002217 },
2218 .user = OCP_USER_MPU | OCP_USER_SDMA,
2219};
2220
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002221/* l4_core -> dss_venc */
2222static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
2223 .master = &omap3xxx_l4_core_hwmod,
2224 .slave = &omap3xxx_dss_venc_hwmod,
Tomi Valkeinen6c3d7e32011-11-08 03:16:10 -07002225 .clk = "dss_ick",
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002226 .fw = {
2227 .omap2 = {
2228 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
2229 .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP,
2230 .flags = OMAP_FIREWALL_L4,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002231 },
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002232 },
Paul Walmsley844a3b62012-04-19 04:04:33 -06002233 .flags = OCPIF_SWSUP_IDLE,
Senthilvadivu Guruswamye04d9e12011-01-24 06:21:51 +00002234 .user = OCP_USER_MPU | OCP_USER_SDMA,
2235};
2236
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002237/* l4_wkup -> gpio1 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002238
2239static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2240 .master = &omap3xxx_l4_wkup_hwmod,
2241 .slave = &omap3xxx_gpio1_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002242 .user = OCP_USER_MPU | OCP_USER_SDMA,
2243};
2244
2245/* l4_per -> gpio2 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002246
2247static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2248 .master = &omap3xxx_l4_per_hwmod,
2249 .slave = &omap3xxx_gpio2_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002250 .user = OCP_USER_MPU | OCP_USER_SDMA,
2251};
2252
2253/* l4_per -> gpio3 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002254
2255static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2256 .master = &omap3xxx_l4_per_hwmod,
2257 .slave = &omap3xxx_gpio3_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002258 .user = OCP_USER_MPU | OCP_USER_SDMA,
2259};
2260
Paul Walmsley54864742012-09-23 17:28:23 -06002261/*
2262 * 'mmu' class
2263 * The memory management unit performs virtual to physical address translation
2264 * for its requestors.
2265 */
2266
2267static struct omap_hwmod_class_sysconfig mmu_sysc = {
2268 .rev_offs = 0x000,
2269 .sysc_offs = 0x010,
2270 .syss_offs = 0x014,
2271 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2272 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
2273 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2274 .sysc_fields = &omap_hwmod_sysc_type1,
2275};
2276
2277static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = {
2278 .name = "mmu",
2279 .sysc = &mmu_sysc,
2280};
2281
2282/* mmu isp */
Paul Walmsley54864742012-09-23 17:28:23 -06002283static struct omap_hwmod omap3xxx_mmu_isp_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002284
2285/* l4_core -> mmu isp */
2286static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = {
2287 .master = &omap3xxx_l4_core_hwmod,
2288 .slave = &omap3xxx_mmu_isp_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002289 .user = OCP_USER_MPU | OCP_USER_SDMA,
2290};
2291
2292static struct omap_hwmod omap3xxx_mmu_isp_hwmod = {
2293 .name = "mmu_isp",
2294 .class = &omap3xxx_mmu_hwmod_class,
Paul Walmsley54864742012-09-23 17:28:23 -06002295 .main_clk = "cam_ick",
Paul Walmsley54864742012-09-23 17:28:23 -06002296 .flags = HWMOD_NO_IDLEST,
2297};
2298
Paul Walmsley54864742012-09-23 17:28:23 -06002299/* mmu iva */
2300
Paul Walmsley54864742012-09-23 17:28:23 -06002301static struct omap_hwmod omap3xxx_mmu_iva_hwmod;
Paul Walmsley54864742012-09-23 17:28:23 -06002302
2303static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = {
2304 { .name = "mmu", .rst_shift = 1, .st_shift = 9 },
2305};
2306
Paul Walmsley54864742012-09-23 17:28:23 -06002307/* l3_main -> iva mmu */
2308static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = {
2309 .master = &omap3xxx_l3_main_hwmod,
2310 .slave = &omap3xxx_mmu_iva_hwmod,
Paul Walmsley54864742012-09-23 17:28:23 -06002311 .user = OCP_USER_MPU | OCP_USER_SDMA,
2312};
2313
2314static struct omap_hwmod omap3xxx_mmu_iva_hwmod = {
2315 .name = "mmu_iva",
2316 .class = &omap3xxx_mmu_hwmod_class,
Suman Anna200a2742014-03-05 18:24:11 -06002317 .clkdm_name = "iva2_clkdm",
Paul Walmsley54864742012-09-23 17:28:23 -06002318 .rst_lines = omap3xxx_mmu_iva_resets,
2319 .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets),
2320 .main_clk = "iva2_ck",
2321 .prcm = {
2322 .omap2 = {
2323 .module_offs = OMAP3430_IVA2_MOD,
Suman Anna200a2742014-03-05 18:24:11 -06002324 .idlest_reg_id = 1,
2325 .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
Paul Walmsley54864742012-09-23 17:28:23 -06002326 },
2327 },
Paul Walmsley54864742012-09-23 17:28:23 -06002328 .flags = HWMOD_NO_IDLEST,
2329};
2330
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002331/* l4_per -> gpio4 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002332
2333static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2334 .master = &omap3xxx_l4_per_hwmod,
2335 .slave = &omap3xxx_gpio4_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002336 .user = OCP_USER_MPU | OCP_USER_SDMA,
2337};
2338
2339/* l4_per -> gpio5 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002340
2341static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2342 .master = &omap3xxx_l4_per_hwmod,
2343 .slave = &omap3xxx_gpio5_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002344 .user = OCP_USER_MPU | OCP_USER_SDMA,
2345};
2346
2347/* l4_per -> gpio6 */
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002348
2349static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2350 .master = &omap3xxx_l4_per_hwmod,
2351 .slave = &omap3xxx_gpio6_hwmod,
Varadarajan, Charulatha70034d32010-12-07 16:26:57 -08002352 .user = OCP_USER_MPU | OCP_USER_SDMA,
2353};
2354
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002355/* dma_system -> L3 */
2356static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
2357 .master = &omap3xxx_dma_system_hwmod,
2358 .slave = &omap3xxx_l3_main_hwmod,
2359 .clk = "core_l3_ick",
2360 .user = OCP_USER_MPU | OCP_USER_SDMA,
2361};
2362
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002363/* l4_cfg -> dma_system */
2364static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2365 .master = &omap3xxx_l4_core_hwmod,
2366 .slave = &omap3xxx_dma_system_hwmod,
2367 .clk = "core_l4_ick",
G, Manjunath Kondaiah01438ab2010-12-20 18:27:19 -08002368 .user = OCP_USER_MPU | OCP_USER_SDMA,
2369};
2370
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302371
2372/* l4_core -> mcbsp1 */
2373static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2374 .master = &omap3xxx_l4_core_hwmod,
2375 .slave = &omap3xxx_mcbsp1_hwmod,
2376 .clk = "mcbsp1_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302377 .user = OCP_USER_MPU | OCP_USER_SDMA,
2378};
2379
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302380
2381/* l4_per -> mcbsp2 */
2382static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2383 .master = &omap3xxx_l4_per_hwmod,
2384 .slave = &omap3xxx_mcbsp2_hwmod,
2385 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302386 .user = OCP_USER_MPU | OCP_USER_SDMA,
2387};
2388
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302389
2390/* l4_per -> mcbsp3 */
2391static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2392 .master = &omap3xxx_l4_per_hwmod,
2393 .slave = &omap3xxx_mcbsp3_hwmod,
2394 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302395 .user = OCP_USER_MPU | OCP_USER_SDMA,
2396};
2397
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302398
2399/* l4_per -> mcbsp4 */
2400static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2401 .master = &omap3xxx_l4_per_hwmod,
2402 .slave = &omap3xxx_mcbsp4_hwmod,
2403 .clk = "mcbsp4_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302404 .user = OCP_USER_MPU | OCP_USER_SDMA,
2405};
2406
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302407
2408/* l4_core -> mcbsp5 */
2409static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2410 .master = &omap3xxx_l4_core_hwmod,
2411 .slave = &omap3xxx_mcbsp5_hwmod,
2412 .clk = "mcbsp5_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302413 .user = OCP_USER_MPU | OCP_USER_SDMA,
2414};
2415
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302416
2417/* l4_per -> mcbsp2_sidetone */
2418static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2419 .master = &omap3xxx_l4_per_hwmod,
2420 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2421 .clk = "mcbsp2_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302422 .user = OCP_USER_MPU,
2423};
2424
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302425
2426/* l4_per -> mcbsp3_sidetone */
2427static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2428 .master = &omap3xxx_l4_per_hwmod,
2429 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2430 .clk = "mcbsp3_ick",
Charulatha Vdc48e5f2011-02-24 15:16:49 +05302431 .user = OCP_USER_MPU,
2432};
2433
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002434/* l4_core -> mailbox */
2435static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
2436 .master = &omap3xxx_l4_core_hwmod,
2437 .slave = &omap3xxx_mailbox_hwmod,
Felipe Contreras0f9dfdd2011-02-24 12:51:32 -08002438 .user = OCP_USER_MPU | OCP_USER_SDMA,
2439};
2440
Charulatha V0f616a42011-02-17 09:53:10 -08002441/* l4 core -> mcspi1 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002442static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
2443 .master = &omap3xxx_l4_core_hwmod,
2444 .slave = &omap34xx_mcspi1,
2445 .clk = "mcspi1_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002446 .user = OCP_USER_MPU | OCP_USER_SDMA,
2447};
2448
2449/* l4 core -> mcspi2 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002450static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
2451 .master = &omap3xxx_l4_core_hwmod,
2452 .slave = &omap34xx_mcspi2,
2453 .clk = "mcspi2_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002454 .user = OCP_USER_MPU | OCP_USER_SDMA,
2455};
2456
2457/* l4 core -> mcspi3 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002458static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
2459 .master = &omap3xxx_l4_core_hwmod,
2460 .slave = &omap34xx_mcspi3,
2461 .clk = "mcspi3_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002462 .user = OCP_USER_MPU | OCP_USER_SDMA,
2463};
2464
2465/* l4 core -> mcspi4 interface */
Charulatha V0f616a42011-02-17 09:53:10 -08002466
2467static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
2468 .master = &omap3xxx_l4_core_hwmod,
2469 .slave = &omap34xx_mcspi4,
2470 .clk = "mcspi4_ick",
Charulatha V0f616a42011-02-17 09:53:10 -08002471 .user = OCP_USER_MPU | OCP_USER_SDMA,
2472};
2473
Keshava Munegowdade231382011-12-15 23:14:44 -07002474static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = {
2475 .master = &omap3xxx_usb_host_hs_hwmod,
2476 .slave = &omap3xxx_l3_main_hwmod,
2477 .clk = "core_l3_ick",
2478 .user = OCP_USER_MPU,
2479};
2480
Keshava Munegowdade231382011-12-15 23:14:44 -07002481
2482static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = {
2483 .master = &omap3xxx_l4_core_hwmod,
2484 .slave = &omap3xxx_usb_host_hs_hwmod,
2485 .clk = "usbhost_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002486 .user = OCP_USER_MPU | OCP_USER_SDMA,
2487};
2488
Keshava Munegowdade231382011-12-15 23:14:44 -07002489
2490static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
2491 .master = &omap3xxx_l4_core_hwmod,
2492 .slave = &omap3xxx_usb_tll_hs_hwmod,
2493 .clk = "usbtll_ick",
Keshava Munegowdade231382011-12-15 23:14:44 -07002494 .user = OCP_USER_MPU | OCP_USER_SDMA,
2495};
2496
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002497/* l4_core -> hdq1w interface */
2498static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
2499 .master = &omap3xxx_l4_core_hwmod,
2500 .slave = &omap3xxx_hdq1w_hwmod,
2501 .clk = "hdq_ick",
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002502 .user = OCP_USER_MPU | OCP_USER_SDMA,
2503 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
2504};
2505
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002506/* l4_wkup -> 32ksync_counter */
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002507
Afzal Mohammed49484a62012-09-23 17:28:24 -06002508
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002509static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = {
2510 .master = &omap3xxx_l4_wkup_hwmod,
2511 .slave = &omap3xxx_counter_32k_hwmod,
2512 .clk = "omap_32ksync_ick",
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002513 .user = OCP_USER_MPU | OCP_USER_SDMA,
2514};
2515
Mark A. Greer31ba8802012-06-27 14:59:57 -06002516/* am35xx has Davinci MDIO & EMAC */
2517static struct omap_hwmod_class am35xx_mdio_class = {
2518 .name = "davinci_mdio",
2519};
2520
2521static struct omap_hwmod am35xx_mdio_hwmod = {
2522 .name = "davinci_mdio",
2523 .class = &am35xx_mdio_class,
2524 .flags = HWMOD_NO_IDLEST,
2525};
2526
2527/*
2528 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2529 * but this will probably require some additional hwmod core support,
2530 * so is left as a future to-do item.
2531 */
2532static struct omap_hwmod_ocp_if am35xx_mdio__l3 = {
2533 .master = &am35xx_mdio_hwmod,
2534 .slave = &omap3xxx_l3_main_hwmod,
2535 .clk = "emac_fck",
2536 .user = OCP_USER_MPU,
2537};
2538
Mark A. Greer31ba8802012-06-27 14:59:57 -06002539/* l4_core -> davinci mdio */
2540/*
2541 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2542 * but this will probably require some additional hwmod core support,
2543 * so is left as a future to-do item.
2544 */
2545static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = {
2546 .master = &omap3xxx_l4_core_hwmod,
2547 .slave = &am35xx_mdio_hwmod,
2548 .clk = "emac_fck",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002549 .user = OCP_USER_MPU,
2550};
2551
Mark A. Greer31ba8802012-06-27 14:59:57 -06002552static struct omap_hwmod_class am35xx_emac_class = {
2553 .name = "davinci_emac",
2554};
2555
2556static struct omap_hwmod am35xx_emac_hwmod = {
2557 .name = "davinci_emac",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002558 .class = &am35xx_emac_class,
Paul Walmsley814a18a2013-02-06 13:48:56 -07002559 /*
2560 * According to Mark Greer, the MPU will not return from WFI
2561 * when the EMAC signals an interrupt.
2562 * http://www.spinics.net/lists/arm-kernel/msg174734.html
2563 */
2564 .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI),
Mark A. Greer31ba8802012-06-27 14:59:57 -06002565};
2566
2567/* l3_core -> davinci emac interface */
2568/*
2569 * XXX Should be connected to an IPSS hwmod, not the L3 directly;
2570 * but this will probably require some additional hwmod core support,
2571 * so is left as a future to-do item.
2572 */
2573static struct omap_hwmod_ocp_if am35xx_emac__l3 = {
2574 .master = &am35xx_emac_hwmod,
2575 .slave = &omap3xxx_l3_main_hwmod,
2576 .clk = "emac_ick",
2577 .user = OCP_USER_MPU,
2578};
2579
Mark A. Greer31ba8802012-06-27 14:59:57 -06002580/* l4_core -> davinci emac */
2581/*
2582 * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly;
2583 * but this will probably require some additional hwmod core support,
2584 * so is left as a future to-do item.
2585 */
2586static struct omap_hwmod_ocp_if am35xx_l4_core__emac = {
2587 .master = &omap3xxx_l4_core_hwmod,
2588 .slave = &am35xx_emac_hwmod,
2589 .clk = "emac_ick",
Mark A. Greer31ba8802012-06-27 14:59:57 -06002590 .user = OCP_USER_MPU,
2591};
2592
Afzal Mohammed49484a62012-09-23 17:28:24 -06002593static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = {
2594 .master = &omap3xxx_l3_main_hwmod,
2595 .slave = &omap3xxx_gpmc_hwmod,
2596 .clk = "core_l3_ick",
Afzal Mohammed49484a62012-09-23 17:28:24 -06002597 .user = OCP_USER_MPU | OCP_USER_SDMA,
2598};
2599
Mark A. Greer26f88e62013-03-18 10:06:32 -06002600/* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */
Mark A. Greer26f88e62013-03-18 10:06:32 -06002601static struct omap_hwmod_class_sysconfig omap3_sham_sysc = {
2602 .rev_offs = 0x5c,
2603 .sysc_offs = 0x60,
2604 .syss_offs = 0x64,
2605 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2606 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2607 .sysc_fields = &omap3_sham_sysc_fields,
2608};
2609
2610static struct omap_hwmod_class omap3xxx_sham_class = {
2611 .name = "sham",
2612 .sysc = &omap3_sham_sysc,
2613};
2614
Mark A. Greer26f88e62013-03-18 10:06:32 -06002615
Mark A. Greer26f88e62013-03-18 10:06:32 -06002616
2617static struct omap_hwmod omap3xxx_sham_hwmod = {
2618 .name = "sham",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002619 .main_clk = "sha12_ick",
2620 .prcm = {
2621 .omap2 = {
2622 .module_offs = CORE_MOD,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002623 .idlest_reg_id = 1,
2624 .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT,
2625 },
2626 },
2627 .class = &omap3xxx_sham_class,
2628};
2629
Mark A. Greer26f88e62013-03-18 10:06:32 -06002630
2631static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = {
2632 .master = &omap3xxx_l4_core_hwmod,
2633 .slave = &omap3xxx_sham_hwmod,
2634 .clk = "sha12_ick",
Mark A. Greer26f88e62013-03-18 10:06:32 -06002635 .user = OCP_USER_MPU | OCP_USER_SDMA,
2636};
2637
Mark A. Greer14ae5562012-12-21 09:28:10 -07002638/* l4_core -> AES */
Mark A. Greer14ae5562012-12-21 09:28:10 -07002639static struct omap_hwmod_class_sysconfig omap3_aes_sysc = {
2640 .rev_offs = 0x44,
2641 .sysc_offs = 0x48,
2642 .syss_offs = 0x4c,
2643 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
2644 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2645 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2646 .sysc_fields = &omap3xxx_aes_sysc_fields,
2647};
2648
2649static struct omap_hwmod_class omap3xxx_aes_class = {
2650 .name = "aes",
2651 .sysc = &omap3_aes_sysc,
2652};
2653
Mark A. Greer14ae5562012-12-21 09:28:10 -07002654
2655static struct omap_hwmod omap3xxx_aes_hwmod = {
2656 .name = "aes",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002657 .main_clk = "aes2_ick",
2658 .prcm = {
2659 .omap2 = {
2660 .module_offs = CORE_MOD,
Mark A. Greer14ae5562012-12-21 09:28:10 -07002661 .idlest_reg_id = 1,
2662 .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT,
2663 },
2664 },
2665 .class = &omap3xxx_aes_class,
2666};
2667
Mark A. Greer14ae5562012-12-21 09:28:10 -07002668
2669static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = {
2670 .master = &omap3xxx_l4_core_hwmod,
2671 .slave = &omap3xxx_aes_hwmod,
2672 .clk = "aes2_ick",
Mark A. Greer14ae5562012-12-21 09:28:10 -07002673 .user = OCP_USER_MPU | OCP_USER_SDMA,
2674};
2675
Sebastian Reichel398917c2013-10-08 23:46:49 -06002676/*
2677 * 'ssi' class
2678 * synchronous serial interface (multichannel and full-duplex serial if)
2679 */
2680
2681static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
2682 .rev_offs = 0x0000,
2683 .sysc_offs = 0x0010,
2684 .syss_offs = 0x0014,
Tony Lindgrendc94fab2014-05-21 12:31:35 -07002685 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE |
2686 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2687 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
Sebastian Reichel398917c2013-10-08 23:46:49 -06002688 .sysc_fields = &omap_hwmod_sysc_type1,
2689};
2690
Sebastian Reichel77112072016-01-17 16:49:05 +01002691static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002692 .name = "ssi",
2693 .sysc = &omap34xx_ssi_sysc,
2694};
2695
Sebastian Reichel77112072016-01-17 16:49:05 +01002696static struct omap_hwmod omap3xxx_ssi_hwmod = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002697 .name = "ssi",
Sebastian Reichel77112072016-01-17 16:49:05 +01002698 .class = &omap3xxx_ssi_hwmod_class,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002699 .clkdm_name = "core_l4_clkdm",
2700 .main_clk = "ssi_ssr_fck",
2701 .prcm = {
2702 .omap2 = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002703 .module_offs = CORE_MOD,
2704 .idlest_reg_id = 1,
2705 .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT,
2706 },
2707 },
2708};
2709
2710/* L4 CORE -> SSI */
Sebastian Reichel77112072016-01-17 16:49:05 +01002711static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
Sebastian Reichel398917c2013-10-08 23:46:49 -06002712 .master = &omap3xxx_l4_core_hwmod,
Sebastian Reichel77112072016-01-17 16:49:05 +01002713 .slave = &omap3xxx_ssi_hwmod,
Sebastian Reichel398917c2013-10-08 23:46:49 -06002714 .clk = "ssi_ick",
2715 .user = OCP_USER_MPU | OCP_USER_SDMA,
2716};
2717
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002718static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
2719 &omap3xxx_l3_main__l4_core,
2720 &omap3xxx_l3_main__l4_per,
2721 &omap3xxx_mpu__l3_main,
Jon Hunterc7dad45f2012-09-23 17:28:28 -06002722 &omap3xxx_l3_main__l4_debugss,
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002723 &omap3xxx_l4_core__l4_wkup,
2724 &omap3xxx_l4_core__mmc3,
2725 &omap3_l4_core__uart1,
2726 &omap3_l4_core__uart2,
2727 &omap3_l4_per__uart3,
2728 &omap3_l4_core__i2c1,
2729 &omap3_l4_core__i2c2,
2730 &omap3_l4_core__i2c3,
2731 &omap3xxx_l4_wkup__l4_sec,
2732 &omap3xxx_l4_wkup__timer1,
2733 &omap3xxx_l4_per__timer2,
2734 &omap3xxx_l4_per__timer3,
2735 &omap3xxx_l4_per__timer4,
2736 &omap3xxx_l4_per__timer5,
2737 &omap3xxx_l4_per__timer6,
2738 &omap3xxx_l4_per__timer7,
2739 &omap3xxx_l4_per__timer8,
2740 &omap3xxx_l4_per__timer9,
2741 &omap3xxx_l4_core__timer10,
2742 &omap3xxx_l4_core__timer11,
2743 &omap3xxx_l4_wkup__wd_timer2,
2744 &omap3xxx_l4_wkup__gpio1,
2745 &omap3xxx_l4_per__gpio2,
2746 &omap3xxx_l4_per__gpio3,
2747 &omap3xxx_l4_per__gpio4,
2748 &omap3xxx_l4_per__gpio5,
2749 &omap3xxx_l4_per__gpio6,
2750 &omap3xxx_dma_system__l3,
2751 &omap3xxx_l4_core__dma_system,
2752 &omap3xxx_l4_core__mcbsp1,
2753 &omap3xxx_l4_per__mcbsp2,
2754 &omap3xxx_l4_per__mcbsp3,
2755 &omap3xxx_l4_per__mcbsp4,
2756 &omap3xxx_l4_core__mcbsp5,
2757 &omap3xxx_l4_per__mcbsp2_sidetone,
2758 &omap3xxx_l4_per__mcbsp3_sidetone,
2759 &omap34xx_l4_core__mcspi1,
2760 &omap34xx_l4_core__mcspi2,
2761 &omap34xx_l4_core__mcspi3,
2762 &omap34xx_l4_core__mcspi4,
Vaibhav Hiremathc8d82ff2012-05-08 11:34:30 -06002763 &omap3xxx_l4_wkup__counter_32k,
Afzal Mohammed49484a62012-09-23 17:28:24 -06002764 &omap3xxx_l3_main__gpmc,
Paul Walmsley73591542010-02-22 22:09:32 -07002765 NULL,
2766};
2767
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002768/* GP-only hwmod links */
Mark A. Greer26f88e62013-03-18 10:06:32 -06002769static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002770 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002771 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002772};
2773
2774static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = {
2775 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002776 NULL,
Mark A. Greer26f88e62013-03-18 10:06:32 -06002777};
2778
2779static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = {
2780 &omap3xxx_l4_sec__timer12,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002781 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002782};
2783
2784/* crypto hwmod links */
2785static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = {
2786 &omap3xxx_l4_core__sham,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002787 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002788};
2789
2790static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = {
2791 &omap3xxx_l4_core__aes,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002792 NULL,
Pali Rohára55a7442015-02-26 14:49:52 +01002793};
2794
2795static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = {
2796 &omap3xxx_l4_core__sham,
2797 NULL
2798};
2799
2800static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = {
2801 &omap3xxx_l4_core__aes,
2802 NULL
2803};
2804
2805/*
2806 * Apparently the SHA/MD5 and AES accelerator IP blocks are
2807 * only present on some AM35xx chips, and no one knows which
2808 * ones. See
2809 * http://www.spinics.net/lists/arm-kernel/msg215466.html So
2810 * if you need these IP blocks on an AM35xx, try uncommenting
2811 * the following lines.
2812 */
2813static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer26f88e62013-03-18 10:06:32 -06002814 /* &omap3xxx_l4_core__sham, */
Pali Rohára55a7442015-02-26 14:49:52 +01002815 NULL
2816};
2817
2818static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = {
Mark A. Greer14ae5562012-12-21 09:28:10 -07002819 /* &omap3xxx_l4_core__aes, */
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002820 NULL,
Aaro Koskinen91a36bd2011-12-15 22:38:37 -07002821};
2822
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002823/* 3430ES1-only hwmod links */
2824static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = {
2825 &omap3430es1_dss__l3,
2826 &omap3430es1_l4_core__dss,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002827 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002828};
2829
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002830/* 3430ES2+-only hwmod links */
2831static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = {
2832 &omap3xxx_dss__l3,
2833 &omap3xxx_l4_core__dss,
2834 &omap3xxx_usbhsotg__l3,
2835 &omap3xxx_l4_core__usbhsotg,
2836 &omap3xxx_usb_host_hs__l3_main_2,
2837 &omap3xxx_l4_core__usb_host_hs,
2838 &omap3xxx_l4_core__usb_tll_hs,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002839 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002840};
2841
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002842/* <= 3430ES3-only hwmod links */
2843static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = {
2844 &omap3xxx_l4_core__pre_es3_mmc1,
2845 &omap3xxx_l4_core__pre_es3_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002846 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002847};
2848
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002849/* 3430ES3+-only hwmod links */
2850static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = {
2851 &omap3xxx_l4_core__es3plus_mmc1,
2852 &omap3xxx_l4_core__es3plus_mmc2,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002853 NULL,
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07002854};
2855
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002856/* 34xx-only hwmod links (all ES revisions) */
2857static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
2858 &omap3xxx_l3__iva,
2859 &omap34xx_l4_core__sr1,
2860 &omap34xx_l4_core__sr2,
2861 &omap3xxx_l4_core__mailbox,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002862 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06002863 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06002864 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06002865 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01002866 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002867 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002868};
2869
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002870/* 36xx-only hwmod links (all ES revisions) */
2871static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
2872 &omap3xxx_l3__iva,
2873 &omap36xx_l4_per__uart4,
2874 &omap3xxx_dss__l3,
2875 &omap3xxx_l4_core__dss,
2876 &omap36xx_l4_core__sr1,
2877 &omap36xx_l4_core__sr2,
2878 &omap3xxx_usbhsotg__l3,
2879 &omap3xxx_l4_core__usbhsotg,
2880 &omap3xxx_l4_core__mailbox,
2881 &omap3xxx_usb_host_hs__l3_main_2,
2882 &omap3xxx_l4_core__usb_host_hs,
2883 &omap3xxx_l4_core__usb_tll_hs,
2884 &omap3xxx_l4_core__es3plus_mmc1,
2885 &omap3xxx_l4_core__es3plus_mmc2,
Paul Walmsley45a4bb02012-05-08 11:34:28 -06002886 &omap3xxx_l4_core__hdq1w,
Tero Kristo8f993a02012-09-23 17:28:21 -06002887 &omap3xxx_sad2d__l3,
Paul Walmsley54864742012-09-23 17:28:23 -06002888 &omap3xxx_l4_core__mmu_isp,
Paul Walmsley54864742012-09-23 17:28:23 -06002889 &omap3xxx_l3_main__mmu_iva,
Sebastian Reichel77112072016-01-17 16:49:05 +01002890 &omap3xxx_l4_core__ssi,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002891 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002892};
2893
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002894static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = {
2895 &omap3xxx_dss__l3,
2896 &omap3xxx_l4_core__dss,
2897 &am35xx_usbhsotg__l3,
2898 &am35xx_l4_core__usbhsotg,
2899 &am35xx_l4_core__uart4,
2900 &omap3xxx_usb_host_hs__l3_main_2,
2901 &omap3xxx_l4_core__usb_host_hs,
2902 &omap3xxx_l4_core__usb_tll_hs,
2903 &omap3xxx_l4_core__es3plus_mmc1,
2904 &omap3xxx_l4_core__es3plus_mmc2,
Raphael Assenatb1a923d2012-09-17 10:56:14 -04002905 &omap3xxx_l4_core__hdq1w,
Mark A. Greer31ba8802012-06-27 14:59:57 -06002906 &am35xx_mdio__l3,
2907 &am35xx_l4_core__mdio,
2908 &am35xx_emac__l3,
2909 &am35xx_l4_core__emac,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002910 NULL,
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002911};
2912
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002913static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
2914 &omap3xxx_l4_core__dss_dispc,
2915 &omap3xxx_l4_core__dss_dsi1,
2916 &omap3xxx_l4_core__dss_rfbi,
2917 &omap3xxx_l4_core__dss_venc,
Tony Lindgrend9d9cec2016-10-21 03:02:12 -07002918 NULL,
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01002919};
2920
Pali Rohára55a7442015-02-26 14:49:52 +01002921/**
2922 * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible?
2923 * @bus: struct device_node * for the top-level OMAP DT data
2924 * @dev_name: device name used in the DT file
2925 *
2926 * Determine whether a "secure" IP block @dev_name is usable by Linux.
2927 * There doesn't appear to be a 100% reliable way to determine this,
2928 * so we rely on heuristics. If @bus is null, meaning there's no DT
2929 * data, then we only assume the IP block is accessible if the OMAP is
2930 * fused as a 'general-purpose' SoC. If however DT data is present,
2931 * test to see if the IP block is described in the DT data and set to
2932 * 'status = "okay"'. If so then we assume the ODM has configured the
2933 * OMAP firewalls to allow access to the IP block.
2934 *
2935 * Return: 0 if device named @dev_name is not likely to be accessible,
2936 * or 1 if it is likely to be accessible.
2937 */
Guenter Roeck10e57782017-03-04 07:02:10 -08002938static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
2939 const char *dev_name)
Pali Rohára55a7442015-02-26 14:49:52 +01002940{
Guenter Roeck10e57782017-03-04 07:02:10 -08002941 struct device_node *node;
2942 bool available;
2943
Pali Rohára55a7442015-02-26 14:49:52 +01002944 if (!bus)
Guenter Roeck10e57782017-03-04 07:02:10 -08002945 return omap_type() == OMAP2_DEVICE_TYPE_GP;
Pali Rohára55a7442015-02-26 14:49:52 +01002946
Guenter Roeck10e57782017-03-04 07:02:10 -08002947 node = of_get_child_by_name(bus, dev_name);
2948 available = of_device_is_available(node);
2949 of_node_put(node);
Pali Rohára55a7442015-02-26 14:49:52 +01002950
Guenter Roeck10e57782017-03-04 07:02:10 -08002951 return available;
Pali Rohára55a7442015-02-26 14:49:52 +01002952}
2953
Paul Walmsley73591542010-02-22 22:09:32 -07002954int __init omap3xxx_hwmod_init(void)
2955{
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002956 int r;
Pali Rohára55a7442015-02-26 14:49:52 +01002957 struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL;
2958 struct omap_hwmod_ocp_if **h_aes = NULL;
Markus Elfringd9ecbef2017-10-20 16:37:07 +02002959 struct device_node *bus;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002960 unsigned int rev;
2961
Kevin Hilman9ebfd282012-06-18 12:12:23 -06002962 omap_hwmod_init();
2963
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002964 /* Register hwmod links common to all OMAP3 */
2965 r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs);
Paul Walmsleyace90212011-10-06 14:39:28 -06002966 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002967 return r;
2968
2969 rev = omap_rev();
2970
2971 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002972 * Register hwmod links common to individual OMAP3 families, all
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002973 * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx)
2974 * All possible revisions should be included in this conditional.
2975 */
2976 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
2977 rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 ||
2978 rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002979 h = omap34xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06002980 h_gp = omap34xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01002981 h_sham = omap34xx_sham_hwmod_ocp_ifs;
2982 h_aes = omap34xx_aes_hwmod_ocp_ifs;
Kevin Hilman68a88b92012-04-30 16:37:10 -07002983 } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002984 h = am35xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06002985 h_gp = am35xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01002986 h_sham = am35xx_sham_hwmod_ocp_ifs;
2987 h_aes = am35xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002988 } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 ||
2989 rev == OMAP3630_REV_ES1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002990 h = omap36xx_hwmod_ocp_ifs;
Mark A. Greer26f88e62013-03-18 10:06:32 -06002991 h_gp = omap36xx_gp_hwmod_ocp_ifs;
Pali Rohára55a7442015-02-26 14:49:52 +01002992 h_sham = omap36xx_sham_hwmod_ocp_ifs;
2993 h_aes = omap36xx_aes_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002994 } else {
2995 WARN(1, "OMAP3 hwmod family init: unknown chip type\n");
2996 return -EINVAL;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02002997 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06002998
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06002999 r = omap_hwmod_register_links(h);
Paul Walmsleyace90212011-10-06 14:39:28 -06003000 if (r < 0)
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003001 return r;
3002
Mark A. Greer26f88e62013-03-18 10:06:32 -06003003 /* Register GP-only hwmod links. */
3004 if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) {
3005 r = omap_hwmod_register_links(h_gp);
3006 if (r < 0)
3007 return r;
3008 }
3009
Pali Rohára55a7442015-02-26 14:49:52 +01003010 /*
3011 * Register crypto hwmod links only if they are not disabled in DT.
3012 * If DT information is missing, enable them only for GP devices.
3013 */
3014
Tony Lindgren1aa8f0c2017-05-31 15:51:37 -07003015 bus = of_find_node_by_name(NULL, "ocp");
Pali Rohára55a7442015-02-26 14:49:52 +01003016
3017 if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
3018 r = omap_hwmod_register_links(h_sham);
Markus Elfringf33aadd2017-10-20 16:30:23 +02003019 if (r < 0)
3020 goto put_node;
Pali Rohára55a7442015-02-26 14:49:52 +01003021 }
3022
3023 if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
3024 r = omap_hwmod_register_links(h_aes);
Markus Elfringf33aadd2017-10-20 16:30:23 +02003025 if (r < 0)
3026 goto put_node;
Pali Rohára55a7442015-02-26 14:49:52 +01003027 }
Guenter Roeckb92675d2017-03-04 07:02:11 -08003028 of_node_put(bus);
Mark A. Greer26f88e62013-03-18 10:06:32 -06003029
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003030 /*
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003031 * Register hwmod links specific to certain ES levels of a
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003032 * particular family of silicon (e.g., 34xx ES1.0)
3033 */
3034 h = NULL;
3035 if (rev == OMAP3430_REV_ES1_0) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003036 h = omap3430es1_hwmod_ocp_ifs;
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003037 } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 ||
3038 rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3039 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003040 h = omap3430es2plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003041 }
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003042
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003043 if (h) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003044 r = omap_hwmod_register_links(h);
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003045 if (r < 0)
3046 return r;
3047 }
3048
3049 h = NULL;
3050 if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 ||
3051 rev == OMAP3430_REV_ES2_1) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003052 h = omap3430_pre_es3_hwmod_ocp_ifs;
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003053 } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 ||
3054 rev == OMAP3430_REV_ES3_1_2) {
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003055 h = omap3430_es3plus_hwmod_ocp_ifs;
Peter Senna Tschudinc09fcc432012-09-18 18:36:11 +02003056 }
Paul Walmsleya52e2ab2011-12-15 23:30:44 -07003057
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003058 if (h)
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003059 r = omap_hwmod_register_links(h);
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003060 if (r < 0)
3061 return r;
3062
3063 /*
3064 * DSS code presumes that dss_core hwmod is handled first,
3065 * _before_ any other DSS related hwmods so register common
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003066 * DSS hwmod links last to ensure that dss_core is already
3067 * registered. Otherwise some change things may happen, for
3068 * ex. if dispc is handled before dss_core and DSS is enabled
3069 * in bootloader DISPC will be reset with outputs enabled
3070 * which sometimes leads to unrecoverable L3 error. XXX The
3071 * long-term fix to this is to ensure hwmods are set up in
3072 * dependency order in the hwmod core code.
Ilya Yanok1d2f56c2011-12-28 00:31:33 +01003073 */
Paul Walmsley0a78c5c2012-04-19 04:04:31 -06003074 r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs);
Paul Walmsleyd6504ac2011-09-14 17:23:19 -06003075
3076 return r;
Markus Elfringf33aadd2017-10-20 16:30:23 +02003077
3078put_node:
3079 of_node_put(bus);
3080 return r;
Paul Walmsley73591542010-02-22 22:09:32 -07003081}