4 * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
5 * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
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.
18 #include <linux/types.h>
20 #include <linux/platform_data/hsmmc-omap.h>
22 #include "omap_hwmod_common_data.h"
28 * DM816X hardware modules integration data
30 * Note: This is incomplete and at present, not generated from h/w database.
34 * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
35 * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
37 #define DM81XX_CM_ALWON_MCASP0_CLKCTRL 0x140
38 #define DM81XX_CM_ALWON_MCASP1_CLKCTRL 0x144
39 #define DM81XX_CM_ALWON_MCASP2_CLKCTRL 0x148
40 #define DM81XX_CM_ALWON_MCBSP_CLKCTRL 0x14c
41 #define DM81XX_CM_ALWON_UART_0_CLKCTRL 0x150
42 #define DM81XX_CM_ALWON_UART_1_CLKCTRL 0x154
43 #define DM81XX_CM_ALWON_UART_2_CLKCTRL 0x158
44 #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL 0x15c
45 #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL 0x160
46 #define DM81XX_CM_ALWON_I2C_0_CLKCTRL 0x164
47 #define DM81XX_CM_ALWON_I2C_1_CLKCTRL 0x168
48 #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL 0x18c
49 #define DM81XX_CM_ALWON_SPI_CLKCTRL 0x190
50 #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL 0x194
51 #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL 0x198
52 #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL 0x19c
53 #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL 0x1a8
54 #define DM81XX_CM_ALWON_CONTROL_CLKCTRL 0x1c4
55 #define DM81XX_CM_ALWON_GPMC_CLKCTRL 0x1d0
56 #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL 0x1d4
57 #define DM81XX_CM_ALWON_L3_CLKCTRL 0x1e4
58 #define DM81XX_CM_ALWON_L4HS_CLKCTRL 0x1e8
59 #define DM81XX_CM_ALWON_L4LS_CLKCTRL 0x1ec
60 #define DM81XX_CM_ALWON_RTC_CLKCTRL 0x1f0
61 #define DM81XX_CM_ALWON_TPCC_CLKCTRL 0x1f4
62 #define DM81XX_CM_ALWON_TPTC0_CLKCTRL 0x1f8
63 #define DM81XX_CM_ALWON_TPTC1_CLKCTRL 0x1fc
64 #define DM81XX_CM_ALWON_TPTC2_CLKCTRL 0x200
65 #define DM81XX_CM_ALWON_TPTC3_CLKCTRL 0x204
67 /* Registers specific to dm814x */
68 #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL 0x16c
69 #define DM814X_CM_ALWON_ATL_CLKCTRL 0x170
70 #define DM814X_CM_ALWON_MLB_CLKCTRL 0x174
71 #define DM814X_CM_ALWON_PATA_CLKCTRL 0x178
72 #define DM814X_CM_ALWON_UART_3_CLKCTRL 0x180
73 #define DM814X_CM_ALWON_UART_4_CLKCTRL 0x184
74 #define DM814X_CM_ALWON_UART_5_CLKCTRL 0x188
75 #define DM814X_CM_ALWON_OCM_0_CLKCTRL 0x1b4
76 #define DM814X_CM_ALWON_VCP_CLKCTRL 0x1b8
77 #define DM814X_CM_ALWON_MPU_CLKCTRL 0x1dc
78 #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL 0x1e0
79 #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL 0x218
80 #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL 0x21c
81 #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL 0x220
82 #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL 0x224
83 #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL 0x228
85 /* Registers specific to dm816x */
86 #define DM816X_DM_ALWON_BASE 0x1400
87 #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE)
88 #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE)
89 #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE)
90 #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE)
91 #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE)
92 #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE)
93 #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE)
94 #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE)
95 #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE)
96 #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE)
97 #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
98 #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE)
99 #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE)
100 #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE)
103 * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
104 * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
106 #define DM81XX_CM_DEFAULT_OFFSET 0x500
107 #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET)
108 #define DM81XX_CM_DEFAULT_SATA_CLKCTRL (0x560 - DM81XX_CM_DEFAULT_OFFSET)
110 /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
111 static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = {
112 .name = "alwon_l3_slow",
113 .clkdm_name = "alwon_l3s_clkdm",
114 .class = &l3_hwmod_class,
115 .flags = HWMOD_NO_IDLEST,
118 static struct omap_hwmod dm81xx_default_l3_slow_hwmod = {
119 .name = "default_l3_slow",
120 .clkdm_name = "default_l3_slow_clkdm",
121 .class = &l3_hwmod_class,
122 .flags = HWMOD_NO_IDLEST,
125 static struct omap_hwmod dm81xx_alwon_l3_med_hwmod = {
127 .clkdm_name = "alwon_l3_med_clkdm",
128 .class = &l3_hwmod_class,
129 .flags = HWMOD_NO_IDLEST,
132 static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod = {
134 .clkdm_name = "alwon_l3_fast_clkdm",
135 .class = &l3_hwmod_class,
136 .flags = HWMOD_NO_IDLEST,
140 * L4 standard peripherals, see TRM table 1-12 for devices using this.
141 * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock.
143 static struct omap_hwmod dm81xx_l4_ls_hwmod = {
145 .clkdm_name = "alwon_l3s_clkdm",
146 .class = &l4_hwmod_class,
147 .flags = HWMOD_NO_IDLEST,
151 * L4 high-speed peripherals. For devices using this, please see the TRM
152 * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
153 * table 1-73 for devices using 250MHz SYSCLK5 clock.
155 static struct omap_hwmod dm81xx_l4_hs_hwmod = {
157 .clkdm_name = "alwon_l3_med_clkdm",
158 .class = &l4_hwmod_class,
159 .flags = HWMOD_NO_IDLEST,
162 /* L3 slow -> L4 ls peripheral interface running at 125MHz */
163 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = {
164 .master = &dm81xx_alwon_l3_slow_hwmod,
165 .slave = &dm81xx_l4_ls_hwmod,
166 .user = OCP_USER_MPU,
169 /* L3 med -> L4 fast peripheral interface running at 250MHz */
170 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = {
171 .master = &dm81xx_alwon_l3_med_hwmod,
172 .slave = &dm81xx_l4_hs_hwmod,
173 .user = OCP_USER_MPU,
177 static struct omap_hwmod dm814x_mpu_hwmod = {
179 .clkdm_name = "alwon_l3s_clkdm",
180 .class = &mpu_hwmod_class,
181 .flags = HWMOD_INIT_NO_IDLE,
182 .main_clk = "mpu_ck",
185 .clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL,
186 .modulemode = MODULEMODE_SWCTRL,
191 static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = {
192 .master = &dm814x_mpu_hwmod,
193 .slave = &dm81xx_alwon_l3_slow_hwmod,
194 .user = OCP_USER_MPU,
197 /* L3 med peripheral interface running at 200MHz */
198 static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = {
199 .master = &dm814x_mpu_hwmod,
200 .slave = &dm81xx_alwon_l3_med_hwmod,
201 .user = OCP_USER_MPU,
204 static struct omap_hwmod dm816x_mpu_hwmod = {
206 .clkdm_name = "alwon_mpu_clkdm",
207 .class = &mpu_hwmod_class,
208 .flags = HWMOD_INIT_NO_IDLE,
209 .main_clk = "mpu_ck",
212 .clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
213 .modulemode = MODULEMODE_SWCTRL,
218 static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
219 .master = &dm816x_mpu_hwmod,
220 .slave = &dm81xx_alwon_l3_slow_hwmod,
221 .user = OCP_USER_MPU,
224 /* L3 med peripheral interface running at 250MHz */
225 static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
226 .master = &dm816x_mpu_hwmod,
227 .slave = &dm81xx_alwon_l3_med_hwmod,
228 .user = OCP_USER_MPU,
232 static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = {
235 .sysc_flags = SYSC_HAS_SIDLEMODE,
236 .idlemodes = SIDLE_FORCE | SIDLE_NO |
237 SIDLE_SMART | SIDLE_SMART_WKUP,
238 .sysc_fields = &omap_hwmod_sysc_type3,
241 static struct omap_hwmod_class ti81xx_rtc_hwmod_class = {
243 .sysc = &ti81xx_rtc_sysc,
246 static struct omap_hwmod ti81xx_rtc_hwmod = {
248 .class = &ti81xx_rtc_hwmod_class,
249 .clkdm_name = "alwon_l3s_clkdm",
250 .flags = HWMOD_NO_IDLEST,
251 .main_clk = "sysclk18_ck",
254 .clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL,
255 .modulemode = MODULEMODE_SWCTRL,
260 static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = {
261 .master = &dm81xx_l4_ls_hwmod,
262 .slave = &ti81xx_rtc_hwmod,
264 .user = OCP_USER_MPU,
268 static struct omap_hwmod_class_sysconfig uart_sysc = {
272 .sysc_flags = SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
273 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
274 SYSS_HAS_RESET_STATUS,
275 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
277 .sysc_fields = &omap_hwmod_sysc_type1,
280 static struct omap_hwmod_class uart_class = {
285 static struct omap_hwmod dm81xx_uart1_hwmod = {
287 .clkdm_name = "alwon_l3s_clkdm",
288 .main_clk = "sysclk10_ck",
291 .clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
292 .modulemode = MODULEMODE_SWCTRL,
295 .class = &uart_class,
296 .flags = DEBUG_TI81XXUART1_FLAGS,
299 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
300 .master = &dm81xx_l4_ls_hwmod,
301 .slave = &dm81xx_uart1_hwmod,
303 .user = OCP_USER_MPU,
306 static struct omap_hwmod dm81xx_uart2_hwmod = {
308 .clkdm_name = "alwon_l3s_clkdm",
309 .main_clk = "sysclk10_ck",
312 .clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
313 .modulemode = MODULEMODE_SWCTRL,
316 .class = &uart_class,
317 .flags = DEBUG_TI81XXUART2_FLAGS,
320 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
321 .master = &dm81xx_l4_ls_hwmod,
322 .slave = &dm81xx_uart2_hwmod,
324 .user = OCP_USER_MPU,
327 static struct omap_hwmod dm81xx_uart3_hwmod = {
329 .clkdm_name = "alwon_l3s_clkdm",
330 .main_clk = "sysclk10_ck",
333 .clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
334 .modulemode = MODULEMODE_SWCTRL,
337 .class = &uart_class,
338 .flags = DEBUG_TI81XXUART3_FLAGS,
341 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
342 .master = &dm81xx_l4_ls_hwmod,
343 .slave = &dm81xx_uart3_hwmod,
345 .user = OCP_USER_MPU,
348 static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
352 .sysc_flags = SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
353 SYSS_HAS_RESET_STATUS,
354 .sysc_fields = &omap_hwmod_sysc_type1,
357 static struct omap_hwmod_class wd_timer_class = {
359 .sysc = &wd_timer_sysc,
360 .pre_shutdown = &omap2_wd_timer_disable,
361 .reset = &omap2_wd_timer_reset,
364 static struct omap_hwmod dm81xx_wd_timer_hwmod = {
366 .clkdm_name = "alwon_l3s_clkdm",
367 .main_clk = "sysclk18_ck",
368 .flags = HWMOD_NO_IDLEST,
371 .clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
372 .modulemode = MODULEMODE_SWCTRL,
375 .class = &wd_timer_class,
378 static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
379 .master = &dm81xx_l4_ls_hwmod,
380 .slave = &dm81xx_wd_timer_hwmod,
382 .user = OCP_USER_MPU,
386 static struct omap_hwmod_class_sysconfig i2c_sysc = {
390 .sysc_flags = SYSC_HAS_SIDLEMODE |
391 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
393 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
394 .sysc_fields = &omap_hwmod_sysc_type1,
397 static struct omap_hwmod_class i2c_class = {
402 static struct omap_hwmod dm81xx_i2c1_hwmod = {
404 .clkdm_name = "alwon_l3s_clkdm",
405 .main_clk = "sysclk10_ck",
408 .clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
409 .modulemode = MODULEMODE_SWCTRL,
415 static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
416 .master = &dm81xx_l4_ls_hwmod,
417 .slave = &dm81xx_i2c1_hwmod,
419 .user = OCP_USER_MPU,
422 static struct omap_hwmod dm81xx_i2c2_hwmod = {
424 .clkdm_name = "alwon_l3s_clkdm",
425 .main_clk = "sysclk10_ck",
428 .clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
429 .modulemode = MODULEMODE_SWCTRL,
435 static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
439 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
441 SYSS_HAS_RESET_STATUS,
442 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
443 .sysc_fields = &omap_hwmod_sysc_type1,
446 static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
447 .master = &dm81xx_l4_ls_hwmod,
448 .slave = &dm81xx_i2c2_hwmod,
450 .user = OCP_USER_MPU,
453 static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
455 .sysc = &dm81xx_elm_sysc,
458 static struct omap_hwmod dm81xx_elm_hwmod = {
460 .clkdm_name = "alwon_l3s_clkdm",
461 .class = &dm81xx_elm_hwmod_class,
462 .main_clk = "sysclk6_ck",
465 static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
466 .master = &dm81xx_l4_ls_hwmod,
467 .slave = &dm81xx_elm_hwmod,
469 .user = OCP_USER_MPU,
472 static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
476 .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
477 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
478 SYSS_HAS_RESET_STATUS,
479 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
481 .sysc_fields = &omap_hwmod_sysc_type1,
484 static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
486 .sysc = &dm81xx_gpio_sysc,
490 static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
491 { .role = "dbclk", .clk = "sysclk18_ck" },
494 static struct omap_hwmod dm81xx_gpio1_hwmod = {
496 .clkdm_name = "alwon_l3s_clkdm",
497 .class = &dm81xx_gpio_hwmod_class,
498 .main_clk = "sysclk6_ck",
501 .clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
502 .modulemode = MODULEMODE_SWCTRL,
505 .opt_clks = gpio1_opt_clks,
506 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
509 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
510 .master = &dm81xx_l4_ls_hwmod,
511 .slave = &dm81xx_gpio1_hwmod,
513 .user = OCP_USER_MPU,
516 static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
517 { .role = "dbclk", .clk = "sysclk18_ck" },
520 static struct omap_hwmod dm81xx_gpio2_hwmod = {
522 .clkdm_name = "alwon_l3s_clkdm",
523 .class = &dm81xx_gpio_hwmod_class,
524 .main_clk = "sysclk6_ck",
527 .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
528 .modulemode = MODULEMODE_SWCTRL,
531 .opt_clks = gpio2_opt_clks,
532 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
535 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
536 .master = &dm81xx_l4_ls_hwmod,
537 .slave = &dm81xx_gpio2_hwmod,
539 .user = OCP_USER_MPU,
542 static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
546 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
547 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
548 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
549 .sysc_fields = &omap_hwmod_sysc_type1,
552 static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
554 .sysc = &dm81xx_gpmc_sysc,
557 static struct omap_hwmod dm81xx_gpmc_hwmod = {
559 .clkdm_name = "alwon_l3s_clkdm",
560 .class = &dm81xx_gpmc_hwmod_class,
561 .main_clk = "sysclk6_ck",
562 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
563 .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
566 .clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
567 .modulemode = MODULEMODE_SWCTRL,
572 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
573 .master = &dm81xx_alwon_l3_slow_hwmod,
574 .slave = &dm81xx_gpmc_hwmod,
575 .user = OCP_USER_MPU,
578 /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */
579 static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
583 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
585 .idlemodes = SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
586 .sysc_fields = &omap_hwmod_sysc_type2,
589 static struct omap_hwmod_class dm81xx_usbotg_class = {
591 .sysc = &dm81xx_usbhsotg_sysc,
594 static struct omap_hwmod dm814x_usbss_hwmod = {
595 .name = "usb_otg_hs",
596 .clkdm_name = "default_l3_slow_clkdm",
597 .main_clk = "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */
600 .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
601 .modulemode = MODULEMODE_SWCTRL,
604 .class = &dm81xx_usbotg_class,
607 static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = {
608 .master = &dm81xx_default_l3_slow_hwmod,
609 .slave = &dm814x_usbss_hwmod,
611 .user = OCP_USER_MPU,
614 static struct omap_hwmod dm816x_usbss_hwmod = {
615 .name = "usb_otg_hs",
616 .clkdm_name = "default_l3_slow_clkdm",
617 .main_clk = "sysclk6_ck",
620 .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
621 .modulemode = MODULEMODE_SWCTRL,
624 .class = &dm81xx_usbotg_class,
627 static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = {
628 .master = &dm81xx_default_l3_slow_hwmod,
629 .slave = &dm816x_usbss_hwmod,
631 .user = OCP_USER_MPU,
634 static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
638 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
639 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
641 .sysc_fields = &omap_hwmod_sysc_type2,
644 static struct omap_hwmod_class dm816x_timer_hwmod_class = {
646 .sysc = &dm816x_timer_sysc,
649 static struct omap_hwmod dm814x_timer1_hwmod = {
651 .clkdm_name = "alwon_l3s_clkdm",
652 .main_clk = "timer1_fck",
653 .class = &dm816x_timer_hwmod_class,
654 .flags = HWMOD_NO_IDLEST,
657 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
658 .master = &dm81xx_l4_ls_hwmod,
659 .slave = &dm814x_timer1_hwmod,
661 .user = OCP_USER_MPU,
664 static struct omap_hwmod dm816x_timer1_hwmod = {
666 .clkdm_name = "alwon_l3s_clkdm",
667 .main_clk = "timer1_fck",
670 .clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
671 .modulemode = MODULEMODE_SWCTRL,
674 .class = &dm816x_timer_hwmod_class,
677 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
678 .master = &dm81xx_l4_ls_hwmod,
679 .slave = &dm816x_timer1_hwmod,
681 .user = OCP_USER_MPU,
684 static struct omap_hwmod dm814x_timer2_hwmod = {
686 .clkdm_name = "alwon_l3s_clkdm",
687 .main_clk = "timer2_fck",
688 .class = &dm816x_timer_hwmod_class,
689 .flags = HWMOD_NO_IDLEST,
692 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
693 .master = &dm81xx_l4_ls_hwmod,
694 .slave = &dm814x_timer2_hwmod,
696 .user = OCP_USER_MPU,
699 static struct omap_hwmod dm816x_timer2_hwmod = {
701 .clkdm_name = "alwon_l3s_clkdm",
702 .main_clk = "timer2_fck",
705 .clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
706 .modulemode = MODULEMODE_SWCTRL,
709 .class = &dm816x_timer_hwmod_class,
712 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
713 .master = &dm81xx_l4_ls_hwmod,
714 .slave = &dm816x_timer2_hwmod,
716 .user = OCP_USER_MPU,
719 static struct omap_hwmod dm816x_timer3_hwmod = {
721 .clkdm_name = "alwon_l3s_clkdm",
722 .main_clk = "timer3_fck",
725 .clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
726 .modulemode = MODULEMODE_SWCTRL,
729 .class = &dm816x_timer_hwmod_class,
732 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
733 .master = &dm81xx_l4_ls_hwmod,
734 .slave = &dm816x_timer3_hwmod,
736 .user = OCP_USER_MPU,
739 static struct omap_hwmod dm816x_timer4_hwmod = {
741 .clkdm_name = "alwon_l3s_clkdm",
742 .main_clk = "timer4_fck",
745 .clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
746 .modulemode = MODULEMODE_SWCTRL,
749 .class = &dm816x_timer_hwmod_class,
752 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
753 .master = &dm81xx_l4_ls_hwmod,
754 .slave = &dm816x_timer4_hwmod,
756 .user = OCP_USER_MPU,
759 static struct omap_hwmod dm816x_timer5_hwmod = {
761 .clkdm_name = "alwon_l3s_clkdm",
762 .main_clk = "timer5_fck",
765 .clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
766 .modulemode = MODULEMODE_SWCTRL,
769 .class = &dm816x_timer_hwmod_class,
772 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
773 .master = &dm81xx_l4_ls_hwmod,
774 .slave = &dm816x_timer5_hwmod,
776 .user = OCP_USER_MPU,
779 static struct omap_hwmod dm816x_timer6_hwmod = {
781 .clkdm_name = "alwon_l3s_clkdm",
782 .main_clk = "timer6_fck",
785 .clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
786 .modulemode = MODULEMODE_SWCTRL,
789 .class = &dm816x_timer_hwmod_class,
792 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
793 .master = &dm81xx_l4_ls_hwmod,
794 .slave = &dm816x_timer6_hwmod,
796 .user = OCP_USER_MPU,
799 static struct omap_hwmod dm816x_timer7_hwmod = {
801 .clkdm_name = "alwon_l3s_clkdm",
802 .main_clk = "timer7_fck",
805 .clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
806 .modulemode = MODULEMODE_SWCTRL,
809 .class = &dm816x_timer_hwmod_class,
812 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
813 .master = &dm81xx_l4_ls_hwmod,
814 .slave = &dm816x_timer7_hwmod,
816 .user = OCP_USER_MPU,
820 static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
824 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
825 SYSS_HAS_RESET_STATUS,
826 .idlemodes = SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
828 .sysc_fields = &omap_hwmod_sysc_type3,
831 static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
833 .sysc = &dm814x_cpgmac_sysc,
836 static struct omap_hwmod dm814x_cpgmac0_hwmod = {
838 .class = &dm814x_cpgmac0_hwmod_class,
839 .clkdm_name = "alwon_ethernet_clkdm",
840 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
841 .main_clk = "cpsw_125mhz_gclk",
844 .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
845 .modulemode = MODULEMODE_SWCTRL,
850 static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
851 .name = "davinci_mdio",
854 static struct omap_hwmod dm814x_mdio_hwmod = {
855 .name = "davinci_mdio",
856 .class = &dm814x_mdio_hwmod_class,
857 .clkdm_name = "alwon_ethernet_clkdm",
858 .main_clk = "cpsw_125mhz_gclk",
861 static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
862 .master = &dm81xx_l4_hs_hwmod,
863 .slave = &dm814x_cpgmac0_hwmod,
864 .clk = "cpsw_125mhz_gclk",
865 .user = OCP_USER_MPU,
868 static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
869 .master = &dm814x_cpgmac0_hwmod,
870 .slave = &dm814x_mdio_hwmod,
871 .user = OCP_USER_MPU,
872 .flags = HWMOD_NO_IDLEST,
876 static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
879 .sysc_flags = SYSC_HAS_SOFTRESET,
880 .sysc_fields = &omap_hwmod_sysc_type2,
883 static struct omap_hwmod_class dm816x_emac_hwmod_class = {
885 .sysc = &dm816x_emac_sysc,
889 * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
890 * driver probed before EMAC0, we let MDIO do the clock idling.
892 static struct omap_hwmod dm816x_emac0_hwmod = {
894 .clkdm_name = "alwon_ethernet_clkdm",
895 .class = &dm816x_emac_hwmod_class,
896 .flags = HWMOD_NO_IDLEST,
899 static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
900 .master = &dm81xx_l4_hs_hwmod,
901 .slave = &dm816x_emac0_hwmod,
903 .user = OCP_USER_MPU,
906 static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
907 .name = "davinci_mdio",
908 .sysc = &dm816x_emac_sysc,
911 static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
912 .name = "davinci_mdio",
913 .class = &dm81xx_mdio_hwmod_class,
914 .clkdm_name = "alwon_ethernet_clkdm",
915 .main_clk = "sysclk24_ck",
916 .flags = HWMOD_NO_IDLEST,
918 * REVISIT: This should be moved to the emac0_hwmod
919 * once we have a better way to handle device slaves.
923 .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
924 .modulemode = MODULEMODE_SWCTRL,
929 static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
930 .master = &dm81xx_l4_hs_hwmod,
931 .slave = &dm81xx_emac0_mdio_hwmod,
932 .user = OCP_USER_MPU,
935 static struct omap_hwmod dm816x_emac1_hwmod = {
937 .clkdm_name = "alwon_ethernet_clkdm",
938 .main_clk = "sysclk24_ck",
939 .flags = HWMOD_NO_IDLEST,
942 .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
943 .modulemode = MODULEMODE_SWCTRL,
946 .class = &dm816x_emac_hwmod_class,
949 static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
950 .master = &dm81xx_l4_hs_hwmod,
951 .slave = &dm816x_emac1_hwmod,
953 .user = OCP_USER_MPU,
956 static struct omap_hwmod_class_sysconfig dm81xx_sata_sysc = {
959 .sysc_flags = SYSC_HAS_SIDLEMODE,
960 .idlemodes = SIDLE_FORCE,
961 .sysc_fields = &omap_hwmod_sysc_type3,
964 static struct omap_hwmod_class dm81xx_sata_hwmod_class = {
966 .sysc = &dm81xx_sata_sysc,
969 static struct omap_hwmod dm81xx_sata_hwmod = {
971 .clkdm_name = "default_clkdm",
972 .flags = HWMOD_NO_IDLEST,
975 .clkctrl_offs = DM81XX_CM_DEFAULT_SATA_CLKCTRL,
976 .modulemode = MODULEMODE_SWCTRL,
979 .class = &dm81xx_sata_hwmod_class,
982 static struct omap_hwmod_ocp_if dm81xx_l4_hs__sata = {
983 .master = &dm81xx_l4_hs_hwmod,
984 .slave = &dm81xx_sata_hwmod,
986 .user = OCP_USER_MPU,
989 static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = {
993 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
994 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
995 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
996 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
997 .sysc_fields = &omap_hwmod_sysc_type1,
1000 static struct omap_hwmod_class dm81xx_mmc_class = {
1002 .sysc = &dm81xx_mmc_sysc,
1005 static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = {
1006 { .role = "dbck", .clk = "sysclk18_ck", },
1009 static struct omap_hsmmc_dev_attr mmc_dev_attr = {
1012 static struct omap_hwmod dm814x_mmc1_hwmod = {
1014 .clkdm_name = "alwon_l3s_clkdm",
1015 .opt_clks = dm81xx_mmc_opt_clks,
1016 .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
1017 .main_clk = "sysclk8_ck",
1020 .clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL,
1021 .modulemode = MODULEMODE_SWCTRL,
1024 .dev_attr = &mmc_dev_attr,
1025 .class = &dm81xx_mmc_class,
1028 static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = {
1029 .master = &dm81xx_l4_ls_hwmod,
1030 .slave = &dm814x_mmc1_hwmod,
1031 .clk = "sysclk6_ck",
1032 .user = OCP_USER_MPU,
1033 .flags = OMAP_FIREWALL_L4
1036 static struct omap_hwmod dm814x_mmc2_hwmod = {
1038 .clkdm_name = "alwon_l3s_clkdm",
1039 .opt_clks = dm81xx_mmc_opt_clks,
1040 .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
1041 .main_clk = "sysclk8_ck",
1044 .clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL,
1045 .modulemode = MODULEMODE_SWCTRL,
1048 .dev_attr = &mmc_dev_attr,
1049 .class = &dm81xx_mmc_class,
1052 static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = {
1053 .master = &dm81xx_l4_ls_hwmod,
1054 .slave = &dm814x_mmc2_hwmod,
1055 .clk = "sysclk6_ck",
1056 .user = OCP_USER_MPU,
1057 .flags = OMAP_FIREWALL_L4
1060 static struct omap_hwmod dm814x_mmc3_hwmod = {
1062 .clkdm_name = "alwon_l3_med_clkdm",
1063 .opt_clks = dm81xx_mmc_opt_clks,
1064 .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
1065 .main_clk = "sysclk8_ck",
1068 .clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL,
1069 .modulemode = MODULEMODE_SWCTRL,
1072 .dev_attr = &mmc_dev_attr,
1073 .class = &dm81xx_mmc_class,
1076 static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = {
1077 .master = &dm81xx_alwon_l3_med_hwmod,
1078 .slave = &dm814x_mmc3_hwmod,
1079 .clk = "sysclk4_ck",
1080 .user = OCP_USER_MPU,
1083 static struct omap_hwmod dm816x_mmc1_hwmod = {
1085 .clkdm_name = "alwon_l3s_clkdm",
1086 .opt_clks = dm81xx_mmc_opt_clks,
1087 .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
1088 .main_clk = "sysclk10_ck",
1091 .clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
1092 .modulemode = MODULEMODE_SWCTRL,
1095 .dev_attr = &mmc_dev_attr,
1096 .class = &dm81xx_mmc_class,
1099 static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
1100 .master = &dm81xx_l4_ls_hwmod,
1101 .slave = &dm816x_mmc1_hwmod,
1102 .clk = "sysclk6_ck",
1103 .user = OCP_USER_MPU,
1104 .flags = OMAP_FIREWALL_L4
1107 static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
1111 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1112 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1113 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
1114 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
1115 .sysc_fields = &omap_hwmod_sysc_type1,
1118 static struct omap_hwmod_class dm816x_mcspi_class = {
1120 .sysc = &dm816x_mcspi_sysc,
1123 static struct omap_hwmod dm81xx_mcspi1_hwmod = {
1125 .clkdm_name = "alwon_l3s_clkdm",
1126 .main_clk = "sysclk10_ck",
1129 .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
1130 .modulemode = MODULEMODE_SWCTRL,
1133 .class = &dm816x_mcspi_class,
1136 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
1137 .master = &dm81xx_l4_ls_hwmod,
1138 .slave = &dm81xx_mcspi1_hwmod,
1139 .clk = "sysclk6_ck",
1140 .user = OCP_USER_MPU,
1143 static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
1147 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1148 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
1149 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
1150 .sysc_fields = &omap_hwmod_sysc_type1,
1153 static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
1155 .sysc = &dm81xx_mailbox_sysc,
1158 static struct omap_hwmod dm81xx_mailbox_hwmod = {
1160 .clkdm_name = "alwon_l3s_clkdm",
1161 .class = &dm81xx_mailbox_hwmod_class,
1162 .main_clk = "sysclk6_ck",
1165 .clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
1166 .modulemode = MODULEMODE_SWCTRL,
1171 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
1172 .master = &dm81xx_l4_ls_hwmod,
1173 .slave = &dm81xx_mailbox_hwmod,
1174 .clk = "sysclk6_ck",
1175 .user = OCP_USER_MPU,
1178 static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
1182 .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1183 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
1184 .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
1185 .sysc_fields = &omap_hwmod_sysc_type1,
1188 static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
1190 .sysc = &dm81xx_spinbox_sysc,
1193 static struct omap_hwmod dm81xx_spinbox_hwmod = {
1195 .clkdm_name = "alwon_l3s_clkdm",
1196 .class = &dm81xx_spinbox_hwmod_class,
1197 .main_clk = "sysclk6_ck",
1200 .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
1201 .modulemode = MODULEMODE_SWCTRL,
1206 static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
1207 .master = &dm81xx_l4_ls_hwmod,
1208 .slave = &dm81xx_spinbox_hwmod,
1209 .clk = "sysclk6_ck",
1210 .user = OCP_USER_MPU,
1213 static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
1217 static struct omap_hwmod dm81xx_tpcc_hwmod = {
1219 .class = &dm81xx_tpcc_hwmod_class,
1220 .clkdm_name = "alwon_l3s_clkdm",
1221 .main_clk = "sysclk4_ck",
1224 .clkctrl_offs = DM81XX_CM_ALWON_TPCC_CLKCTRL,
1225 .modulemode = MODULEMODE_SWCTRL,
1230 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
1231 .master = &dm81xx_alwon_l3_fast_hwmod,
1232 .slave = &dm81xx_tpcc_hwmod,
1233 .clk = "sysclk4_ck",
1234 .user = OCP_USER_MPU,
1237 static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
1241 static struct omap_hwmod dm81xx_tptc0_hwmod = {
1243 .class = &dm81xx_tptc0_hwmod_class,
1244 .clkdm_name = "alwon_l3s_clkdm",
1245 .main_clk = "sysclk4_ck",
1248 .clkctrl_offs = DM81XX_CM_ALWON_TPTC0_CLKCTRL,
1249 .modulemode = MODULEMODE_SWCTRL,
1254 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
1255 .master = &dm81xx_alwon_l3_fast_hwmod,
1256 .slave = &dm81xx_tptc0_hwmod,
1257 .clk = "sysclk4_ck",
1258 .user = OCP_USER_MPU,
1261 static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
1262 .master = &dm81xx_tptc0_hwmod,
1263 .slave = &dm81xx_alwon_l3_fast_hwmod,
1264 .clk = "sysclk4_ck",
1265 .user = OCP_USER_MPU,
1268 static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
1272 static struct omap_hwmod dm81xx_tptc1_hwmod = {
1274 .class = &dm81xx_tptc1_hwmod_class,
1275 .clkdm_name = "alwon_l3s_clkdm",
1276 .main_clk = "sysclk4_ck",
1279 .clkctrl_offs = DM81XX_CM_ALWON_TPTC1_CLKCTRL,
1280 .modulemode = MODULEMODE_SWCTRL,
1285 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
1286 .master = &dm81xx_alwon_l3_fast_hwmod,
1287 .slave = &dm81xx_tptc1_hwmod,
1288 .clk = "sysclk4_ck",
1289 .user = OCP_USER_MPU,
1292 static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
1293 .master = &dm81xx_tptc1_hwmod,
1294 .slave = &dm81xx_alwon_l3_fast_hwmod,
1295 .clk = "sysclk4_ck",
1296 .user = OCP_USER_MPU,
1299 static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
1303 static struct omap_hwmod dm81xx_tptc2_hwmod = {
1305 .class = &dm81xx_tptc2_hwmod_class,
1306 .clkdm_name = "alwon_l3s_clkdm",
1307 .main_clk = "sysclk4_ck",
1310 .clkctrl_offs = DM81XX_CM_ALWON_TPTC2_CLKCTRL,
1311 .modulemode = MODULEMODE_SWCTRL,
1316 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
1317 .master = &dm81xx_alwon_l3_fast_hwmod,
1318 .slave = &dm81xx_tptc2_hwmod,
1319 .clk = "sysclk4_ck",
1320 .user = OCP_USER_MPU,
1323 static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
1324 .master = &dm81xx_tptc2_hwmod,
1325 .slave = &dm81xx_alwon_l3_fast_hwmod,
1326 .clk = "sysclk4_ck",
1327 .user = OCP_USER_MPU,
1330 static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
1334 static struct omap_hwmod dm81xx_tptc3_hwmod = {
1336 .class = &dm81xx_tptc3_hwmod_class,
1337 .clkdm_name = "alwon_l3s_clkdm",
1338 .main_clk = "sysclk4_ck",
1341 .clkctrl_offs = DM81XX_CM_ALWON_TPTC3_CLKCTRL,
1342 .modulemode = MODULEMODE_SWCTRL,
1347 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
1348 .master = &dm81xx_alwon_l3_fast_hwmod,
1349 .slave = &dm81xx_tptc3_hwmod,
1350 .clk = "sysclk4_ck",
1351 .user = OCP_USER_MPU,
1354 static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
1355 .master = &dm81xx_tptc3_hwmod,
1356 .slave = &dm81xx_alwon_l3_fast_hwmod,
1357 .clk = "sysclk4_ck",
1358 .user = OCP_USER_MPU,
1362 * REVISIT: Test and enable the following once clocks work:
1363 * dm81xx_l4_ls__mailbox
1365 * Also note that some devices share a single clkctrl_offs..
1366 * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
1368 static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
1369 &dm814x_mpu__alwon_l3_slow,
1370 &dm814x_mpu__alwon_l3_med,
1371 &dm81xx_alwon_l3_slow__l4_ls,
1372 &dm81xx_alwon_l3_slow__l4_hs,
1373 &dm81xx_l4_ls__uart1,
1374 &dm81xx_l4_ls__uart2,
1375 &dm81xx_l4_ls__uart3,
1376 &dm81xx_l4_ls__wd_timer1,
1377 &dm81xx_l4_ls__i2c1,
1378 &dm81xx_l4_ls__i2c2,
1379 &dm81xx_l4_ls__gpio1,
1380 &dm81xx_l4_ls__gpio2,
1382 &dm81xx_l4_ls__mcspi1,
1383 &dm814x_l4_ls__mmc1,
1384 &dm814x_l4_ls__mmc2,
1386 &dm81xx_alwon_l3_fast__tpcc,
1387 &dm81xx_alwon_l3_fast__tptc0,
1388 &dm81xx_alwon_l3_fast__tptc1,
1389 &dm81xx_alwon_l3_fast__tptc2,
1390 &dm81xx_alwon_l3_fast__tptc3,
1391 &dm81xx_tptc0__alwon_l3_fast,
1392 &dm81xx_tptc1__alwon_l3_fast,
1393 &dm81xx_tptc2__alwon_l3_fast,
1394 &dm81xx_tptc3__alwon_l3_fast,
1395 &dm814x_l4_ls__timer1,
1396 &dm814x_l4_ls__timer2,
1397 &dm814x_l4_hs__cpgmac0,
1398 &dm814x_cpgmac0__mdio,
1399 &dm81xx_alwon_l3_slow__gpmc,
1400 &dm814x_default_l3_slow__usbss,
1401 &dm814x_alwon_l3_med__mmc3,
1405 int __init dm814x_hwmod_init(void)
1408 return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
1411 static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
1412 &dm816x_mpu__alwon_l3_slow,
1413 &dm816x_mpu__alwon_l3_med,
1414 &dm81xx_alwon_l3_slow__l4_ls,
1415 &dm81xx_alwon_l3_slow__l4_hs,
1416 &dm81xx_l4_ls__uart1,
1417 &dm81xx_l4_ls__uart2,
1418 &dm81xx_l4_ls__uart3,
1419 &dm81xx_l4_ls__wd_timer1,
1420 &dm81xx_l4_ls__i2c1,
1421 &dm81xx_l4_ls__i2c2,
1422 &dm81xx_l4_ls__gpio1,
1423 &dm81xx_l4_ls__gpio2,
1426 &dm816x_l4_ls__mmc1,
1427 &dm816x_l4_ls__timer1,
1428 &dm816x_l4_ls__timer2,
1429 &dm816x_l4_ls__timer3,
1430 &dm816x_l4_ls__timer4,
1431 &dm816x_l4_ls__timer5,
1432 &dm816x_l4_ls__timer6,
1433 &dm816x_l4_ls__timer7,
1434 &dm81xx_l4_ls__mcspi1,
1435 &dm81xx_l4_ls__mailbox,
1436 &dm81xx_l4_ls__spinbox,
1437 &dm81xx_l4_hs__emac0,
1438 &dm81xx_emac0__mdio,
1439 &dm816x_l4_hs__emac1,
1440 &dm81xx_l4_hs__sata,
1441 &dm81xx_alwon_l3_fast__tpcc,
1442 &dm81xx_alwon_l3_fast__tptc0,
1443 &dm81xx_alwon_l3_fast__tptc1,
1444 &dm81xx_alwon_l3_fast__tptc2,
1445 &dm81xx_alwon_l3_fast__tptc3,
1446 &dm81xx_tptc0__alwon_l3_fast,
1447 &dm81xx_tptc1__alwon_l3_fast,
1448 &dm81xx_tptc2__alwon_l3_fast,
1449 &dm81xx_tptc3__alwon_l3_fast,
1450 &dm81xx_alwon_l3_slow__gpmc,
1451 &dm816x_default_l3_slow__usbss,
1455 int __init dm816x_hwmod_init(void)
1458 return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);