Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / arm / mach-omap2 / omap_hwmod_33xx_data.c
blob4d16b15bb0cfc514932e4c596789afb4c192ecec
1 /*
2 * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
4 * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
6 * This file is automatically generated from the AM33XX hardware databases.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #include <linux/i2c-omap.h>
19 #include "omap_hwmod.h"
20 #include <linux/platform_data/gpio-omap.h>
21 #include <linux/platform_data/spi-omap2-mcspi.h>
23 #include "omap_hwmod_common_data.h"
25 #include "control.h"
26 #include "cm33xx.h"
27 #include "prm33xx.h"
28 #include "prm-regbits-33xx.h"
29 #include "i2c.h"
30 #include "wd_timer.h"
31 #include "omap_hwmod_33xx_43xx_common_data.h"
34 * IP blocks
37 /* emif */
38 static struct omap_hwmod am33xx_emif_hwmod = {
39 .name = "emif",
40 .class = &am33xx_emif_hwmod_class,
41 .clkdm_name = "l3_clkdm",
42 .flags = HWMOD_INIT_NO_IDLE,
43 .main_clk = "dpll_ddr_m2_div2_ck",
44 .prcm = {
45 .omap4 = {
46 .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
47 .modulemode = MODULEMODE_SWCTRL,
52 /* l4_hs */
53 static struct omap_hwmod am33xx_l4_hs_hwmod = {
54 .name = "l4_hs",
55 .class = &am33xx_l4_hwmod_class,
56 .clkdm_name = "l4hs_clkdm",
57 .flags = HWMOD_INIT_NO_IDLE,
58 .main_clk = "l4hs_gclk",
59 .prcm = {
60 .omap4 = {
61 .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
62 .modulemode = MODULEMODE_SWCTRL,
67 static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
68 { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
71 /* wkup_m3 */
72 static struct omap_hwmod am33xx_wkup_m3_hwmod = {
73 .name = "wkup_m3",
74 .class = &am33xx_wkup_m3_hwmod_class,
75 .clkdm_name = "l4_wkup_aon_clkdm",
76 /* Keep hardreset asserted */
77 .flags = HWMOD_INIT_NO_RESET | HWMOD_NO_IDLEST,
78 .main_clk = "dpll_core_m4_div2_ck",
79 .prcm = {
80 .omap4 = {
81 .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
82 .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
83 .rstst_offs = AM33XX_RM_WKUP_RSTST_OFFSET,
84 .modulemode = MODULEMODE_SWCTRL,
87 .rst_lines = am33xx_wkup_m3_resets,
88 .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
92 * 'adc/tsc' class
93 * TouchScreen Controller (Anolog-To-Digital Converter)
95 static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
96 .rev_offs = 0x00,
97 .sysc_offs = 0x10,
98 .sysc_flags = SYSC_HAS_SIDLEMODE,
99 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
100 SIDLE_SMART_WKUP),
101 .sysc_fields = &omap_hwmod_sysc_type2,
104 static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
105 .name = "adc_tsc",
106 .sysc = &am33xx_adc_tsc_sysc,
109 static struct omap_hwmod am33xx_adc_tsc_hwmod = {
110 .name = "adc_tsc",
111 .class = &am33xx_adc_tsc_hwmod_class,
112 .clkdm_name = "l4_wkup_clkdm",
113 .main_clk = "adc_tsc_fck",
114 .prcm = {
115 .omap4 = {
116 .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
117 .modulemode = MODULEMODE_SWCTRL,
123 * Modules omap_hwmod structures
125 * The following IPs are excluded for the moment because:
126 * - They do not need an explicit SW control using omap_hwmod API.
127 * - They still need to be validated with the driver
128 * properly adapted to omap_hwmod / omap_device
130 * - cEFUSE (doesn't fall under any ocp_if)
131 * - clkdiv32k
132 * - ocp watch point
134 #if 0
136 * 'cefuse' class
138 static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
139 .name = "cefuse",
142 static struct omap_hwmod am33xx_cefuse_hwmod = {
143 .name = "cefuse",
144 .class = &am33xx_cefuse_hwmod_class,
145 .clkdm_name = "l4_cefuse_clkdm",
146 .main_clk = "cefuse_fck",
147 .prcm = {
148 .omap4 = {
149 .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
150 .modulemode = MODULEMODE_SWCTRL,
156 * 'clkdiv32k' class
158 static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
159 .name = "clkdiv32k",
162 static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
163 .name = "clkdiv32k",
164 .class = &am33xx_clkdiv32k_hwmod_class,
165 .clkdm_name = "clk_24mhz_clkdm",
166 .main_clk = "clkdiv32k_ick",
167 .prcm = {
168 .omap4 = {
169 .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
170 .modulemode = MODULEMODE_SWCTRL,
175 /* ocpwp */
176 static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
177 .name = "ocpwp",
180 static struct omap_hwmod am33xx_ocpwp_hwmod = {
181 .name = "ocpwp",
182 .class = &am33xx_ocpwp_hwmod_class,
183 .clkdm_name = "l4ls_clkdm",
184 .main_clk = "l4ls_gclk",
185 .prcm = {
186 .omap4 = {
187 .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
188 .modulemode = MODULEMODE_SWCTRL,
192 #endif
195 * 'debugss' class
196 * debug sub system
198 static struct omap_hwmod_opt_clk debugss_opt_clks[] = {
199 { .role = "dbg_sysclk", .clk = "dbg_sysclk_ck" },
200 { .role = "dbg_clka", .clk = "dbg_clka_ck" },
203 static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
204 .name = "debugss",
207 static struct omap_hwmod am33xx_debugss_hwmod = {
208 .name = "debugss",
209 .class = &am33xx_debugss_hwmod_class,
210 .clkdm_name = "l3_aon_clkdm",
211 .main_clk = "trace_clk_div_ck",
212 .prcm = {
213 .omap4 = {
214 .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
215 .modulemode = MODULEMODE_SWCTRL,
218 .opt_clks = debugss_opt_clks,
219 .opt_clks_cnt = ARRAY_SIZE(debugss_opt_clks),
222 static struct omap_hwmod am33xx_control_hwmod = {
223 .name = "control",
224 .class = &am33xx_control_hwmod_class,
225 .clkdm_name = "l4_wkup_clkdm",
226 .flags = HWMOD_INIT_NO_IDLE,
227 .main_clk = "dpll_core_m4_div2_ck",
228 .prcm = {
229 .omap4 = {
230 .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
231 .modulemode = MODULEMODE_SWCTRL,
236 /* gpio0 */
237 static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
238 { .role = "dbclk", .clk = "gpio0_dbclk" },
241 static struct omap_hwmod am33xx_gpio0_hwmod = {
242 .name = "gpio1",
243 .class = &am33xx_gpio_hwmod_class,
244 .clkdm_name = "l4_wkup_clkdm",
245 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
246 .main_clk = "dpll_core_m4_div2_ck",
247 .prcm = {
248 .omap4 = {
249 .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
250 .modulemode = MODULEMODE_SWCTRL,
253 .opt_clks = gpio0_opt_clks,
254 .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
255 .dev_attr = &gpio_dev_attr,
258 /* lcdc */
259 static struct omap_hwmod_class_sysconfig lcdc_sysc = {
260 .rev_offs = 0x0,
261 .sysc_offs = 0x54,
262 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
263 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
264 .sysc_fields = &omap_hwmod_sysc_type2,
267 static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
268 .name = "lcdc",
269 .sysc = &lcdc_sysc,
272 static struct omap_hwmod am33xx_lcdc_hwmod = {
273 .name = "lcdc",
274 .class = &am33xx_lcdc_hwmod_class,
275 .clkdm_name = "lcdc_clkdm",
276 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
277 .main_clk = "lcd_gclk",
278 .prcm = {
279 .omap4 = {
280 .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
281 .modulemode = MODULEMODE_SWCTRL,
287 * 'usb_otg' class
288 * high-speed on-the-go universal serial bus (usb_otg) controller
290 static struct omap_hwmod_class_sysconfig am33xx_usbhsotg_sysc = {
291 .rev_offs = 0x0,
292 .sysc_offs = 0x10,
293 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
294 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
295 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
296 .sysc_fields = &omap_hwmod_sysc_type2,
299 static struct omap_hwmod_class am33xx_usbotg_class = {
300 .name = "usbotg",
301 .sysc = &am33xx_usbhsotg_sysc,
304 static struct omap_hwmod am33xx_usbss_hwmod = {
305 .name = "usb_otg_hs",
306 .class = &am33xx_usbotg_class,
307 .clkdm_name = "l3s_clkdm",
308 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
309 .main_clk = "usbotg_fck",
310 .prcm = {
311 .omap4 = {
312 .clkctrl_offs = AM33XX_CM_PER_USB0_CLKCTRL_OFFSET,
313 .modulemode = MODULEMODE_SWCTRL,
320 * Interfaces
323 /* l3 main -> emif */
324 static struct omap_hwmod_ocp_if am33xx_l3_main__emif = {
325 .master = &am33xx_l3_main_hwmod,
326 .slave = &am33xx_emif_hwmod,
327 .clk = "dpll_core_m4_ck",
328 .user = OCP_USER_MPU | OCP_USER_SDMA,
331 /* l3 main -> l4 hs */
332 static struct omap_hwmod_ocp_if am33xx_l3_main__l4_hs = {
333 .master = &am33xx_l3_main_hwmod,
334 .slave = &am33xx_l4_hs_hwmod,
335 .clk = "l3s_gclk",
336 .user = OCP_USER_MPU | OCP_USER_SDMA,
339 /* wkup m3 -> l4 wkup */
340 static struct omap_hwmod_ocp_if am33xx_wkup_m3__l4_wkup = {
341 .master = &am33xx_wkup_m3_hwmod,
342 .slave = &am33xx_l4_wkup_hwmod,
343 .clk = "dpll_core_m4_div2_ck",
344 .user = OCP_USER_MPU | OCP_USER_SDMA,
347 /* l4 wkup -> wkup m3 */
348 static struct omap_hwmod_ocp_if am33xx_l4_wkup__wkup_m3 = {
349 .master = &am33xx_l4_wkup_hwmod,
350 .slave = &am33xx_wkup_m3_hwmod,
351 .clk = "dpll_core_m4_div2_ck",
352 .user = OCP_USER_MPU | OCP_USER_SDMA,
355 /* l4 hs -> pru-icss */
356 static struct omap_hwmod_ocp_if am33xx_l4_hs__pruss = {
357 .master = &am33xx_l4_hs_hwmod,
358 .slave = &am33xx_pruss_hwmod,
359 .clk = "dpll_core_m4_ck",
360 .user = OCP_USER_MPU | OCP_USER_SDMA,
363 /* l3_main -> debugss */
364 static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = {
365 .master = &am33xx_l3_main_hwmod,
366 .slave = &am33xx_debugss_hwmod,
367 .clk = "dpll_core_m4_ck",
368 .user = OCP_USER_MPU,
371 /* l4 wkup -> smartreflex0 */
372 static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = {
373 .master = &am33xx_l4_wkup_hwmod,
374 .slave = &am33xx_smartreflex0_hwmod,
375 .clk = "dpll_core_m4_div2_ck",
376 .user = OCP_USER_MPU,
379 /* l4 wkup -> smartreflex1 */
380 static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex1 = {
381 .master = &am33xx_l4_wkup_hwmod,
382 .slave = &am33xx_smartreflex1_hwmod,
383 .clk = "dpll_core_m4_div2_ck",
384 .user = OCP_USER_MPU,
387 /* l4 wkup -> control */
388 static struct omap_hwmod_ocp_if am33xx_l4_wkup__control = {
389 .master = &am33xx_l4_wkup_hwmod,
390 .slave = &am33xx_control_hwmod,
391 .clk = "dpll_core_m4_div2_ck",
392 .user = OCP_USER_MPU,
395 /* L4 WKUP -> I2C1 */
396 static struct omap_hwmod_ocp_if am33xx_l4_wkup__i2c1 = {
397 .master = &am33xx_l4_wkup_hwmod,
398 .slave = &am33xx_i2c1_hwmod,
399 .clk = "dpll_core_m4_div2_ck",
400 .user = OCP_USER_MPU,
403 /* L4 WKUP -> GPIO1 */
404 static struct omap_hwmod_ocp_if am33xx_l4_wkup__gpio0 = {
405 .master = &am33xx_l4_wkup_hwmod,
406 .slave = &am33xx_gpio0_hwmod,
407 .clk = "dpll_core_m4_div2_ck",
408 .user = OCP_USER_MPU | OCP_USER_SDMA,
411 /* L4 WKUP -> ADC_TSC */
412 static struct omap_hwmod_ocp_if am33xx_l4_wkup__adc_tsc = {
413 .master = &am33xx_l4_wkup_hwmod,
414 .slave = &am33xx_adc_tsc_hwmod,
415 .clk = "dpll_core_m4_div2_ck",
416 .user = OCP_USER_MPU,
419 static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
420 .master = &am33xx_l4_hs_hwmod,
421 .slave = &am33xx_cpgmac0_hwmod,
422 .clk = "cpsw_125mhz_gclk",
423 .user = OCP_USER_MPU,
426 static struct omap_hwmod_ocp_if am33xx_l3_main__lcdc = {
427 .master = &am33xx_l3_main_hwmod,
428 .slave = &am33xx_lcdc_hwmod,
429 .clk = "dpll_core_m4_ck",
430 .user = OCP_USER_MPU,
433 /* l4 wkup -> timer1 */
434 static struct omap_hwmod_ocp_if am33xx_l4_wkup__timer1 = {
435 .master = &am33xx_l4_wkup_hwmod,
436 .slave = &am33xx_timer1_hwmod,
437 .clk = "dpll_core_m4_div2_ck",
438 .user = OCP_USER_MPU,
441 /* l4 wkup -> uart1 */
442 static struct omap_hwmod_ocp_if am33xx_l4_wkup__uart1 = {
443 .master = &am33xx_l4_wkup_hwmod,
444 .slave = &am33xx_uart1_hwmod,
445 .clk = "dpll_core_m4_div2_ck",
446 .user = OCP_USER_MPU,
449 /* l4 wkup -> wd_timer1 */
450 static struct omap_hwmod_ocp_if am33xx_l4_wkup__wd_timer1 = {
451 .master = &am33xx_l4_wkup_hwmod,
452 .slave = &am33xx_wd_timer1_hwmod,
453 .clk = "dpll_core_m4_div2_ck",
454 .user = OCP_USER_MPU,
457 /* usbss */
458 /* l3 s -> USBSS interface */
459 static struct omap_hwmod_ocp_if am33xx_l3_s__usbss = {
460 .master = &am33xx_l3_s_hwmod,
461 .slave = &am33xx_usbss_hwmod,
462 .clk = "l3s_gclk",
463 .user = OCP_USER_MPU,
464 .flags = OCPIF_SWSUP_IDLE,
467 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
468 &am33xx_l3_main__emif,
469 &am33xx_mpu__l3_main,
470 &am33xx_mpu__prcm,
471 &am33xx_l3_s__l4_ls,
472 &am33xx_l3_s__l4_wkup,
473 &am33xx_l3_main__l4_hs,
474 &am33xx_l3_main__l3_s,
475 &am33xx_l3_main__l3_instr,
476 &am33xx_l3_main__gfx,
477 &am33xx_l3_s__l3_main,
478 &am33xx_pruss__l3_main,
479 &am33xx_wkup_m3__l4_wkup,
480 &am33xx_gfx__l3_main,
481 &am33xx_l3_main__debugss,
482 &am33xx_l4_wkup__wkup_m3,
483 &am33xx_l4_wkup__control,
484 &am33xx_l4_wkup__smartreflex0,
485 &am33xx_l4_wkup__smartreflex1,
486 &am33xx_l4_wkup__uart1,
487 &am33xx_l4_wkup__timer1,
488 &am33xx_l4_wkup__rtc,
489 &am33xx_l4_wkup__i2c1,
490 &am33xx_l4_wkup__gpio0,
491 &am33xx_l4_wkup__adc_tsc,
492 &am33xx_l4_wkup__wd_timer1,
493 &am33xx_l4_hs__pruss,
494 &am33xx_l4_per__dcan0,
495 &am33xx_l4_per__dcan1,
496 &am33xx_l4_per__gpio1,
497 &am33xx_l4_per__gpio2,
498 &am33xx_l4_per__gpio3,
499 &am33xx_l4_per__i2c2,
500 &am33xx_l4_per__i2c3,
501 &am33xx_l4_per__mailbox,
502 &am33xx_l4_ls__mcasp0,
503 &am33xx_l4_ls__mcasp1,
504 &am33xx_l4_ls__mmc0,
505 &am33xx_l4_ls__mmc1,
506 &am33xx_l3_s__mmc2,
507 &am33xx_l4_ls__timer2,
508 &am33xx_l4_ls__timer3,
509 &am33xx_l4_ls__timer4,
510 &am33xx_l4_ls__timer5,
511 &am33xx_l4_ls__timer6,
512 &am33xx_l4_ls__timer7,
513 &am33xx_l3_main__tpcc,
514 &am33xx_l4_ls__uart2,
515 &am33xx_l4_ls__uart3,
516 &am33xx_l4_ls__uart4,
517 &am33xx_l4_ls__uart5,
518 &am33xx_l4_ls__uart6,
519 &am33xx_l4_ls__spinlock,
520 &am33xx_l4_ls__elm,
521 &am33xx_l4_ls__epwmss0,
522 &am33xx_l4_ls__epwmss1,
523 &am33xx_l4_ls__epwmss2,
524 &am33xx_l3_s__gpmc,
525 &am33xx_l3_main__lcdc,
526 &am33xx_l4_ls__mcspi0,
527 &am33xx_l4_ls__mcspi1,
528 &am33xx_l3_main__tptc0,
529 &am33xx_l3_main__tptc1,
530 &am33xx_l3_main__tptc2,
531 &am33xx_l3_main__ocmc,
532 &am33xx_l3_s__usbss,
533 &am33xx_l4_hs__cpgmac0,
534 &am33xx_cpgmac0__mdio,
535 &am33xx_l3_main__sha0,
536 &am33xx_l3_main__aes0,
537 &am33xx_l4_per__rng,
538 NULL,
541 int __init am33xx_hwmod_init(void)
543 omap_hwmod_am33xx_reg();
544 omap_hwmod_init();
545 return omap_hwmod_register_links(am33xx_hwmod_ocp_ifs);