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/platform_data/gpio-omap.h>
19 #include <linux/platform_data/hsmmc-omap.h>
20 #include <linux/platform_data/spi-omap2-mcspi.h>
21 #include <plat/dmtimer.h>
23 #include "omap_hwmod_common_data.h"
29 * DM816X hardware modules integration data
31 * Note: This is incomplete and at present, not generated from h/w database.
35 * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
36 * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
38 #define DM81XX_CM_ALWON_MCASP0_CLKCTRL 0x140
39 #define DM81XX_CM_ALWON_MCASP1_CLKCTRL 0x144
40 #define DM81XX_CM_ALWON_MCASP2_CLKCTRL 0x148
41 #define DM81XX_CM_ALWON_MCBSP_CLKCTRL 0x14c
42 #define DM81XX_CM_ALWON_UART_0_CLKCTRL 0x150
43 #define DM81XX_CM_ALWON_UART_1_CLKCTRL 0x154
44 #define DM81XX_CM_ALWON_UART_2_CLKCTRL 0x158
45 #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL 0x15c
46 #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL 0x160
47 #define DM81XX_CM_ALWON_I2C_0_CLKCTRL 0x164
48 #define DM81XX_CM_ALWON_I2C_1_CLKCTRL 0x168
49 #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL 0x18c
50 #define DM81XX_CM_ALWON_SPI_CLKCTRL 0x190
51 #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL 0x194
52 #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL 0x198
53 #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL 0x19c
54 #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL 0x1a8
55 #define DM81XX_CM_ALWON_CONTROL_CLKCTRL 0x1c4
56 #define DM81XX_CM_ALWON_GPMC_CLKCTRL 0x1d0
57 #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL 0x1d4
58 #define DM81XX_CM_ALWON_L3_CLKCTRL 0x1e4
59 #define DM81XX_CM_ALWON_L4HS_CLKCTRL 0x1e8
60 #define DM81XX_CM_ALWON_L4LS_CLKCTRL 0x1ec
61 #define DM81XX_CM_ALWON_RTC_CLKCTRL 0x1f0
62 #define DM81XX_CM_ALWON_TPCC_CLKCTRL 0x1f4
63 #define DM81XX_CM_ALWON_TPTC0_CLKCTRL 0x1f8
64 #define DM81XX_CM_ALWON_TPTC1_CLKCTRL 0x1fc
65 #define DM81XX_CM_ALWON_TPTC2_CLKCTRL 0x200
66 #define DM81XX_CM_ALWON_TPTC3_CLKCTRL 0x204
68 /* Registers specific to dm814x */
69 #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL 0x16c
70 #define DM814X_CM_ALWON_ATL_CLKCTRL 0x170
71 #define DM814X_CM_ALWON_MLB_CLKCTRL 0x174
72 #define DM814X_CM_ALWON_PATA_CLKCTRL 0x178
73 #define DM814X_CM_ALWON_UART_3_CLKCTRL 0x180
74 #define DM814X_CM_ALWON_UART_4_CLKCTRL 0x184
75 #define DM814X_CM_ALWON_UART_5_CLKCTRL 0x188
76 #define DM814X_CM_ALWON_OCM_0_CLKCTRL 0x1b4
77 #define DM814X_CM_ALWON_VCP_CLKCTRL 0x1b8
78 #define DM814X_CM_ALWON_MPU_CLKCTRL 0x1dc
79 #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL 0x1e0
80 #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL 0x218
81 #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL 0x21c
82 #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL 0x220
83 #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL 0x224
84 #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL 0x228
86 /* Registers specific to dm816x */
87 #define DM816X_DM_ALWON_BASE 0x1400
88 #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE)
89 #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE)
90 #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE)
91 #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE)
92 #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE)
93 #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE)
94 #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE)
95 #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE)
96 #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE)
97 #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE)
98 #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
99 #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE)
100 #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE)
101 #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE)
104 * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
105 * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
107 #define DM81XX_CM_DEFAULT_OFFSET 0x500
108 #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET)
109 #define DM81XX_CM_DEFAULT_SATA_CLKCTRL (0x560 - DM81XX_CM_DEFAULT_OFFSET)
111 /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
112 static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod
= {
113 .name
= "alwon_l3_slow",
114 .clkdm_name
= "alwon_l3s_clkdm",
115 .class = &l3_hwmod_class
,
116 .flags
= HWMOD_NO_IDLEST
,
119 static struct omap_hwmod dm81xx_default_l3_slow_hwmod
= {
120 .name
= "default_l3_slow",
121 .clkdm_name
= "default_l3_slow_clkdm",
122 .class = &l3_hwmod_class
,
123 .flags
= HWMOD_NO_IDLEST
,
126 static struct omap_hwmod dm81xx_alwon_l3_med_hwmod
= {
128 .clkdm_name
= "alwon_l3_med_clkdm",
129 .class = &l3_hwmod_class
,
130 .flags
= HWMOD_NO_IDLEST
,
133 static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod
= {
135 .clkdm_name
= "alwon_l3_fast_clkdm",
136 .class = &l3_hwmod_class
,
137 .flags
= HWMOD_NO_IDLEST
,
141 * L4 standard peripherals, see TRM table 1-12 for devices using this.
142 * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock.
144 static struct omap_hwmod dm81xx_l4_ls_hwmod
= {
146 .clkdm_name
= "alwon_l3s_clkdm",
147 .class = &l4_hwmod_class
,
148 .flags
= HWMOD_NO_IDLEST
,
152 * L4 high-speed peripherals. For devices using this, please see the TRM
153 * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
154 * table 1-73 for devices using 250MHz SYSCLK5 clock.
156 static struct omap_hwmod dm81xx_l4_hs_hwmod
= {
158 .clkdm_name
= "alwon_l3_med_clkdm",
159 .class = &l4_hwmod_class
,
160 .flags
= HWMOD_NO_IDLEST
,
163 /* L3 slow -> L4 ls peripheral interface running at 125MHz */
164 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls
= {
165 .master
= &dm81xx_alwon_l3_slow_hwmod
,
166 .slave
= &dm81xx_l4_ls_hwmod
,
167 .user
= OCP_USER_MPU
,
170 /* L3 med -> L4 fast peripheral interface running at 250MHz */
171 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs
= {
172 .master
= &dm81xx_alwon_l3_med_hwmod
,
173 .slave
= &dm81xx_l4_hs_hwmod
,
174 .user
= OCP_USER_MPU
,
178 static struct omap_hwmod dm814x_mpu_hwmod
= {
180 .clkdm_name
= "alwon_l3s_clkdm",
181 .class = &mpu_hwmod_class
,
182 .flags
= HWMOD_INIT_NO_IDLE
,
183 .main_clk
= "mpu_ck",
186 .clkctrl_offs
= DM814X_CM_ALWON_MPU_CLKCTRL
,
187 .modulemode
= MODULEMODE_SWCTRL
,
192 static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow
= {
193 .master
= &dm814x_mpu_hwmod
,
194 .slave
= &dm81xx_alwon_l3_slow_hwmod
,
195 .user
= OCP_USER_MPU
,
198 /* L3 med peripheral interface running at 200MHz */
199 static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med
= {
200 .master
= &dm814x_mpu_hwmod
,
201 .slave
= &dm81xx_alwon_l3_med_hwmod
,
202 .user
= OCP_USER_MPU
,
205 static struct omap_hwmod dm816x_mpu_hwmod
= {
207 .clkdm_name
= "alwon_mpu_clkdm",
208 .class = &mpu_hwmod_class
,
209 .flags
= HWMOD_INIT_NO_IDLE
,
210 .main_clk
= "mpu_ck",
213 .clkctrl_offs
= DM816X_CM_ALWON_MPU_CLKCTRL
,
214 .modulemode
= MODULEMODE_SWCTRL
,
219 static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow
= {
220 .master
= &dm816x_mpu_hwmod
,
221 .slave
= &dm81xx_alwon_l3_slow_hwmod
,
222 .user
= OCP_USER_MPU
,
225 /* L3 med peripheral interface running at 250MHz */
226 static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med
= {
227 .master
= &dm816x_mpu_hwmod
,
228 .slave
= &dm81xx_alwon_l3_med_hwmod
,
229 .user
= OCP_USER_MPU
,
233 static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc
= {
236 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
237 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
|
238 SIDLE_SMART
| SIDLE_SMART_WKUP
,
239 .sysc_fields
= &omap_hwmod_sysc_type3
,
242 static struct omap_hwmod_class ti81xx_rtc_hwmod_class
= {
244 .sysc
= &ti81xx_rtc_sysc
,
247 static struct omap_hwmod ti81xx_rtc_hwmod
= {
249 .class = &ti81xx_rtc_hwmod_class
,
250 .clkdm_name
= "alwon_l3s_clkdm",
251 .flags
= HWMOD_NO_IDLEST
,
252 .main_clk
= "sysclk18_ck",
255 .clkctrl_offs
= DM81XX_CM_ALWON_RTC_CLKCTRL
,
256 .modulemode
= MODULEMODE_SWCTRL
,
261 static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc
= {
262 .master
= &dm81xx_l4_ls_hwmod
,
263 .slave
= &ti81xx_rtc_hwmod
,
265 .user
= OCP_USER_MPU
,
269 static struct omap_hwmod_class_sysconfig uart_sysc
= {
273 .sysc_flags
= SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SIDLEMODE
|
274 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
|
275 SYSS_HAS_RESET_STATUS
,
276 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
278 .sysc_fields
= &omap_hwmod_sysc_type1
,
281 static struct omap_hwmod_class uart_class
= {
286 static struct omap_hwmod dm81xx_uart1_hwmod
= {
288 .clkdm_name
= "alwon_l3s_clkdm",
289 .main_clk
= "sysclk10_ck",
292 .clkctrl_offs
= DM81XX_CM_ALWON_UART_0_CLKCTRL
,
293 .modulemode
= MODULEMODE_SWCTRL
,
296 .class = &uart_class
,
297 .flags
= DEBUG_TI81XXUART1_FLAGS
,
300 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1
= {
301 .master
= &dm81xx_l4_ls_hwmod
,
302 .slave
= &dm81xx_uart1_hwmod
,
304 .user
= OCP_USER_MPU
,
307 static struct omap_hwmod dm81xx_uart2_hwmod
= {
309 .clkdm_name
= "alwon_l3s_clkdm",
310 .main_clk
= "sysclk10_ck",
313 .clkctrl_offs
= DM81XX_CM_ALWON_UART_1_CLKCTRL
,
314 .modulemode
= MODULEMODE_SWCTRL
,
317 .class = &uart_class
,
318 .flags
= DEBUG_TI81XXUART2_FLAGS
,
321 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2
= {
322 .master
= &dm81xx_l4_ls_hwmod
,
323 .slave
= &dm81xx_uart2_hwmod
,
325 .user
= OCP_USER_MPU
,
328 static struct omap_hwmod dm81xx_uart3_hwmod
= {
330 .clkdm_name
= "alwon_l3s_clkdm",
331 .main_clk
= "sysclk10_ck",
334 .clkctrl_offs
= DM81XX_CM_ALWON_UART_2_CLKCTRL
,
335 .modulemode
= MODULEMODE_SWCTRL
,
338 .class = &uart_class
,
339 .flags
= DEBUG_TI81XXUART3_FLAGS
,
342 static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3
= {
343 .master
= &dm81xx_l4_ls_hwmod
,
344 .slave
= &dm81xx_uart3_hwmod
,
346 .user
= OCP_USER_MPU
,
349 static struct omap_hwmod_class_sysconfig wd_timer_sysc
= {
353 .sysc_flags
= SYSC_HAS_EMUFREE
| SYSC_HAS_SOFTRESET
|
354 SYSS_HAS_RESET_STATUS
,
355 .sysc_fields
= &omap_hwmod_sysc_type1
,
358 static struct omap_hwmod_class wd_timer_class
= {
360 .sysc
= &wd_timer_sysc
,
361 .pre_shutdown
= &omap2_wd_timer_disable
,
362 .reset
= &omap2_wd_timer_reset
,
365 static struct omap_hwmod dm81xx_wd_timer_hwmod
= {
367 .clkdm_name
= "alwon_l3s_clkdm",
368 .main_clk
= "sysclk18_ck",
369 .flags
= HWMOD_NO_IDLEST
,
372 .clkctrl_offs
= DM81XX_CM_ALWON_WDTIMER_CLKCTRL
,
373 .modulemode
= MODULEMODE_SWCTRL
,
376 .class = &wd_timer_class
,
379 static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1
= {
380 .master
= &dm81xx_l4_ls_hwmod
,
381 .slave
= &dm81xx_wd_timer_hwmod
,
383 .user
= OCP_USER_MPU
,
387 static struct omap_hwmod_class_sysconfig i2c_sysc
= {
391 .sysc_flags
= SYSC_HAS_SIDLEMODE
|
392 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
394 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
395 .sysc_fields
= &omap_hwmod_sysc_type1
,
398 static struct omap_hwmod_class i2c_class
= {
403 static struct omap_hwmod dm81xx_i2c1_hwmod
= {
405 .clkdm_name
= "alwon_l3s_clkdm",
406 .main_clk
= "sysclk10_ck",
409 .clkctrl_offs
= DM81XX_CM_ALWON_I2C_0_CLKCTRL
,
410 .modulemode
= MODULEMODE_SWCTRL
,
416 static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1
= {
417 .master
= &dm81xx_l4_ls_hwmod
,
418 .slave
= &dm81xx_i2c1_hwmod
,
420 .user
= OCP_USER_MPU
,
423 static struct omap_hwmod dm81xx_i2c2_hwmod
= {
425 .clkdm_name
= "alwon_l3s_clkdm",
426 .main_clk
= "sysclk10_ck",
429 .clkctrl_offs
= DM81XX_CM_ALWON_I2C_1_CLKCTRL
,
430 .modulemode
= MODULEMODE_SWCTRL
,
436 static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc
= {
440 .sysc_flags
= SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
442 SYSS_HAS_RESET_STATUS
,
443 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
444 .sysc_fields
= &omap_hwmod_sysc_type1
,
447 static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2
= {
448 .master
= &dm81xx_l4_ls_hwmod
,
449 .slave
= &dm81xx_i2c2_hwmod
,
451 .user
= OCP_USER_MPU
,
454 static struct omap_hwmod_class dm81xx_elm_hwmod_class
= {
456 .sysc
= &dm81xx_elm_sysc
,
459 static struct omap_hwmod dm81xx_elm_hwmod
= {
461 .clkdm_name
= "alwon_l3s_clkdm",
462 .class = &dm81xx_elm_hwmod_class
,
463 .main_clk
= "sysclk6_ck",
466 static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm
= {
467 .master
= &dm81xx_l4_ls_hwmod
,
468 .slave
= &dm81xx_elm_hwmod
,
470 .user
= OCP_USER_MPU
,
473 static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc
= {
477 .sysc_flags
= SYSC_HAS_AUTOIDLE
| SYSC_HAS_ENAWAKEUP
|
478 SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
479 SYSS_HAS_RESET_STATUS
,
480 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
482 .sysc_fields
= &omap_hwmod_sysc_type1
,
485 static struct omap_hwmod_class dm81xx_gpio_hwmod_class
= {
487 .sysc
= &dm81xx_gpio_sysc
,
491 static struct omap_gpio_dev_attr gpio_dev_attr
= {
496 static struct omap_hwmod_opt_clk gpio1_opt_clks
[] = {
497 { .role
= "dbclk", .clk
= "sysclk18_ck" },
500 static struct omap_hwmod dm81xx_gpio1_hwmod
= {
502 .clkdm_name
= "alwon_l3s_clkdm",
503 .class = &dm81xx_gpio_hwmod_class
,
504 .main_clk
= "sysclk6_ck",
507 .clkctrl_offs
= DM81XX_CM_ALWON_GPIO_0_CLKCTRL
,
508 .modulemode
= MODULEMODE_SWCTRL
,
511 .opt_clks
= gpio1_opt_clks
,
512 .opt_clks_cnt
= ARRAY_SIZE(gpio1_opt_clks
),
513 .dev_attr
= &gpio_dev_attr
,
516 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1
= {
517 .master
= &dm81xx_l4_ls_hwmod
,
518 .slave
= &dm81xx_gpio1_hwmod
,
520 .user
= OCP_USER_MPU
,
523 static struct omap_hwmod_opt_clk gpio2_opt_clks
[] = {
524 { .role
= "dbclk", .clk
= "sysclk18_ck" },
527 static struct omap_hwmod dm81xx_gpio2_hwmod
= {
529 .clkdm_name
= "alwon_l3s_clkdm",
530 .class = &dm81xx_gpio_hwmod_class
,
531 .main_clk
= "sysclk6_ck",
534 .clkctrl_offs
= DM81XX_CM_ALWON_GPIO_1_CLKCTRL
,
535 .modulemode
= MODULEMODE_SWCTRL
,
538 .opt_clks
= gpio2_opt_clks
,
539 .opt_clks_cnt
= ARRAY_SIZE(gpio2_opt_clks
),
540 .dev_attr
= &gpio_dev_attr
,
543 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2
= {
544 .master
= &dm81xx_l4_ls_hwmod
,
545 .slave
= &dm81xx_gpio2_hwmod
,
547 .user
= OCP_USER_MPU
,
550 static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc
= {
554 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
|
555 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
,
556 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
557 .sysc_fields
= &omap_hwmod_sysc_type1
,
560 static struct omap_hwmod_class dm81xx_gpmc_hwmod_class
= {
562 .sysc
= &dm81xx_gpmc_sysc
,
565 static struct omap_hwmod dm81xx_gpmc_hwmod
= {
567 .clkdm_name
= "alwon_l3s_clkdm",
568 .class = &dm81xx_gpmc_hwmod_class
,
569 .main_clk
= "sysclk6_ck",
570 /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
571 .flags
= DEBUG_OMAP_GPMC_HWMOD_FLAGS
,
574 .clkctrl_offs
= DM81XX_CM_ALWON_GPMC_CLKCTRL
,
575 .modulemode
= MODULEMODE_SWCTRL
,
580 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc
= {
581 .master
= &dm81xx_alwon_l3_slow_hwmod
,
582 .slave
= &dm81xx_gpmc_hwmod
,
583 .user
= OCP_USER_MPU
,
586 /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */
587 static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc
= {
591 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
593 .idlemodes
= SIDLE_SMART
| MSTANDBY_FORCE
| MSTANDBY_SMART
,
594 .sysc_fields
= &omap_hwmod_sysc_type2
,
597 static struct omap_hwmod_class dm81xx_usbotg_class
= {
599 .sysc
= &dm81xx_usbhsotg_sysc
,
602 static struct omap_hwmod dm814x_usbss_hwmod
= {
603 .name
= "usb_otg_hs",
604 .clkdm_name
= "default_l3_slow_clkdm",
605 .main_clk
= "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */
608 .clkctrl_offs
= DM81XX_CM_DEFAULT_USB_CLKCTRL
,
609 .modulemode
= MODULEMODE_SWCTRL
,
612 .class = &dm81xx_usbotg_class
,
615 static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss
= {
616 .master
= &dm81xx_default_l3_slow_hwmod
,
617 .slave
= &dm814x_usbss_hwmod
,
619 .user
= OCP_USER_MPU
,
622 static struct omap_hwmod dm816x_usbss_hwmod
= {
623 .name
= "usb_otg_hs",
624 .clkdm_name
= "default_l3_slow_clkdm",
625 .main_clk
= "sysclk6_ck",
628 .clkctrl_offs
= DM81XX_CM_DEFAULT_USB_CLKCTRL
,
629 .modulemode
= MODULEMODE_SWCTRL
,
632 .class = &dm81xx_usbotg_class
,
635 static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss
= {
636 .master
= &dm81xx_default_l3_slow_hwmod
,
637 .slave
= &dm816x_usbss_hwmod
,
639 .user
= OCP_USER_MPU
,
642 static struct omap_hwmod_class_sysconfig dm816x_timer_sysc
= {
646 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_SOFTRESET
,
647 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
|
649 .sysc_fields
= &omap_hwmod_sysc_type2
,
652 static struct omap_hwmod_class dm816x_timer_hwmod_class
= {
654 .sysc
= &dm816x_timer_sysc
,
657 static struct omap_timer_capability_dev_attr capability_alwon_dev_attr
= {
658 .timer_capability
= OMAP_TIMER_ALWON
,
661 static struct omap_hwmod dm814x_timer1_hwmod
= {
663 .clkdm_name
= "alwon_l3s_clkdm",
664 .main_clk
= "timer1_fck",
665 .dev_attr
= &capability_alwon_dev_attr
,
666 .class = &dm816x_timer_hwmod_class
,
667 .flags
= HWMOD_NO_IDLEST
,
670 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1
= {
671 .master
= &dm81xx_l4_ls_hwmod
,
672 .slave
= &dm814x_timer1_hwmod
,
674 .user
= OCP_USER_MPU
,
677 static struct omap_hwmod dm816x_timer1_hwmod
= {
679 .clkdm_name
= "alwon_l3s_clkdm",
680 .main_clk
= "timer1_fck",
683 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_1_CLKCTRL
,
684 .modulemode
= MODULEMODE_SWCTRL
,
687 .dev_attr
= &capability_alwon_dev_attr
,
688 .class = &dm816x_timer_hwmod_class
,
691 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1
= {
692 .master
= &dm81xx_l4_ls_hwmod
,
693 .slave
= &dm816x_timer1_hwmod
,
695 .user
= OCP_USER_MPU
,
698 static struct omap_hwmod dm814x_timer2_hwmod
= {
700 .clkdm_name
= "alwon_l3s_clkdm",
701 .main_clk
= "timer2_fck",
702 .dev_attr
= &capability_alwon_dev_attr
,
703 .class = &dm816x_timer_hwmod_class
,
704 .flags
= HWMOD_NO_IDLEST
,
707 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2
= {
708 .master
= &dm81xx_l4_ls_hwmod
,
709 .slave
= &dm814x_timer2_hwmod
,
711 .user
= OCP_USER_MPU
,
714 static struct omap_hwmod dm816x_timer2_hwmod
= {
716 .clkdm_name
= "alwon_l3s_clkdm",
717 .main_clk
= "timer2_fck",
720 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_2_CLKCTRL
,
721 .modulemode
= MODULEMODE_SWCTRL
,
724 .dev_attr
= &capability_alwon_dev_attr
,
725 .class = &dm816x_timer_hwmod_class
,
728 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2
= {
729 .master
= &dm81xx_l4_ls_hwmod
,
730 .slave
= &dm816x_timer2_hwmod
,
732 .user
= OCP_USER_MPU
,
735 static struct omap_hwmod dm816x_timer3_hwmod
= {
737 .clkdm_name
= "alwon_l3s_clkdm",
738 .main_clk
= "timer3_fck",
741 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_3_CLKCTRL
,
742 .modulemode
= MODULEMODE_SWCTRL
,
745 .dev_attr
= &capability_alwon_dev_attr
,
746 .class = &dm816x_timer_hwmod_class
,
749 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3
= {
750 .master
= &dm81xx_l4_ls_hwmod
,
751 .slave
= &dm816x_timer3_hwmod
,
753 .user
= OCP_USER_MPU
,
756 static struct omap_hwmod dm816x_timer4_hwmod
= {
758 .clkdm_name
= "alwon_l3s_clkdm",
759 .main_clk
= "timer4_fck",
762 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_4_CLKCTRL
,
763 .modulemode
= MODULEMODE_SWCTRL
,
766 .dev_attr
= &capability_alwon_dev_attr
,
767 .class = &dm816x_timer_hwmod_class
,
770 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4
= {
771 .master
= &dm81xx_l4_ls_hwmod
,
772 .slave
= &dm816x_timer4_hwmod
,
774 .user
= OCP_USER_MPU
,
777 static struct omap_hwmod dm816x_timer5_hwmod
= {
779 .clkdm_name
= "alwon_l3s_clkdm",
780 .main_clk
= "timer5_fck",
783 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_5_CLKCTRL
,
784 .modulemode
= MODULEMODE_SWCTRL
,
787 .dev_attr
= &capability_alwon_dev_attr
,
788 .class = &dm816x_timer_hwmod_class
,
791 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5
= {
792 .master
= &dm81xx_l4_ls_hwmod
,
793 .slave
= &dm816x_timer5_hwmod
,
795 .user
= OCP_USER_MPU
,
798 static struct omap_hwmod dm816x_timer6_hwmod
= {
800 .clkdm_name
= "alwon_l3s_clkdm",
801 .main_clk
= "timer6_fck",
804 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_6_CLKCTRL
,
805 .modulemode
= MODULEMODE_SWCTRL
,
808 .dev_attr
= &capability_alwon_dev_attr
,
809 .class = &dm816x_timer_hwmod_class
,
812 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6
= {
813 .master
= &dm81xx_l4_ls_hwmod
,
814 .slave
= &dm816x_timer6_hwmod
,
816 .user
= OCP_USER_MPU
,
819 static struct omap_hwmod dm816x_timer7_hwmod
= {
821 .clkdm_name
= "alwon_l3s_clkdm",
822 .main_clk
= "timer7_fck",
825 .clkctrl_offs
= DM816X_CM_ALWON_TIMER_7_CLKCTRL
,
826 .modulemode
= MODULEMODE_SWCTRL
,
829 .dev_attr
= &capability_alwon_dev_attr
,
830 .class = &dm816x_timer_hwmod_class
,
833 static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7
= {
834 .master
= &dm81xx_l4_ls_hwmod
,
835 .slave
= &dm816x_timer7_hwmod
,
837 .user
= OCP_USER_MPU
,
841 static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc
= {
845 .sysc_flags
= SYSC_HAS_SIDLEMODE
| SYSC_HAS_MIDLEMODE
|
846 SYSS_HAS_RESET_STATUS
,
847 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| MSTANDBY_FORCE
|
849 .sysc_fields
= &omap_hwmod_sysc_type3
,
852 static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class
= {
854 .sysc
= &dm814x_cpgmac_sysc
,
857 static struct omap_hwmod dm814x_cpgmac0_hwmod
= {
859 .class = &dm814x_cpgmac0_hwmod_class
,
860 .clkdm_name
= "alwon_ethernet_clkdm",
861 .flags
= HWMOD_SWSUP_SIDLE
| HWMOD_SWSUP_MSTANDBY
,
862 .main_clk
= "cpsw_125mhz_gclk",
865 .clkctrl_offs
= DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL
,
866 .modulemode
= MODULEMODE_SWCTRL
,
871 static struct omap_hwmod_class dm814x_mdio_hwmod_class
= {
872 .name
= "davinci_mdio",
875 static struct omap_hwmod dm814x_mdio_hwmod
= {
876 .name
= "davinci_mdio",
877 .class = &dm814x_mdio_hwmod_class
,
878 .clkdm_name
= "alwon_ethernet_clkdm",
879 .main_clk
= "cpsw_125mhz_gclk",
882 static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0
= {
883 .master
= &dm81xx_l4_hs_hwmod
,
884 .slave
= &dm814x_cpgmac0_hwmod
,
885 .clk
= "cpsw_125mhz_gclk",
886 .user
= OCP_USER_MPU
,
889 static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio
= {
890 .master
= &dm814x_cpgmac0_hwmod
,
891 .slave
= &dm814x_mdio_hwmod
,
892 .user
= OCP_USER_MPU
,
893 .flags
= HWMOD_NO_IDLEST
,
897 static struct omap_hwmod_class_sysconfig dm816x_emac_sysc
= {
900 .sysc_flags
= SYSC_HAS_SOFTRESET
,
901 .sysc_fields
= &omap_hwmod_sysc_type2
,
904 static struct omap_hwmod_class dm816x_emac_hwmod_class
= {
906 .sysc
= &dm816x_emac_sysc
,
910 * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
911 * driver probed before EMAC0, we let MDIO do the clock idling.
913 static struct omap_hwmod dm816x_emac0_hwmod
= {
915 .clkdm_name
= "alwon_ethernet_clkdm",
916 .class = &dm816x_emac_hwmod_class
,
917 .flags
= HWMOD_NO_IDLEST
,
920 static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0
= {
921 .master
= &dm81xx_l4_hs_hwmod
,
922 .slave
= &dm816x_emac0_hwmod
,
924 .user
= OCP_USER_MPU
,
927 static struct omap_hwmod_class dm81xx_mdio_hwmod_class
= {
928 .name
= "davinci_mdio",
929 .sysc
= &dm816x_emac_sysc
,
932 static struct omap_hwmod dm81xx_emac0_mdio_hwmod
= {
933 .name
= "davinci_mdio",
934 .class = &dm81xx_mdio_hwmod_class
,
935 .clkdm_name
= "alwon_ethernet_clkdm",
936 .main_clk
= "sysclk24_ck",
937 .flags
= HWMOD_NO_IDLEST
,
939 * REVISIT: This should be moved to the emac0_hwmod
940 * once we have a better way to handle device slaves.
944 .clkctrl_offs
= DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL
,
945 .modulemode
= MODULEMODE_SWCTRL
,
950 static struct omap_hwmod_ocp_if dm81xx_emac0__mdio
= {
951 .master
= &dm81xx_l4_hs_hwmod
,
952 .slave
= &dm81xx_emac0_mdio_hwmod
,
953 .user
= OCP_USER_MPU
,
956 static struct omap_hwmod dm816x_emac1_hwmod
= {
958 .clkdm_name
= "alwon_ethernet_clkdm",
959 .main_clk
= "sysclk24_ck",
960 .flags
= HWMOD_NO_IDLEST
,
963 .clkctrl_offs
= DM816X_CM_ALWON_ETHERNET_1_CLKCTRL
,
964 .modulemode
= MODULEMODE_SWCTRL
,
967 .class = &dm816x_emac_hwmod_class
,
970 static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1
= {
971 .master
= &dm81xx_l4_hs_hwmod
,
972 .slave
= &dm816x_emac1_hwmod
,
974 .user
= OCP_USER_MPU
,
977 static struct omap_hwmod_class_sysconfig dm81xx_sata_sysc
= {
979 .sysc_flags
= SYSC_HAS_SIDLEMODE
,
980 .idlemodes
= SIDLE_FORCE
,
981 .sysc_fields
= &omap_hwmod_sysc_type3
,
984 static struct omap_hwmod_class dm81xx_sata_hwmod_class
= {
986 .sysc
= &dm81xx_sata_sysc
,
989 static struct omap_hwmod dm81xx_sata_hwmod
= {
991 .clkdm_name
= "default_sata_clkdm",
992 .flags
= HWMOD_NO_IDLEST
,
995 .clkctrl_offs
= DM81XX_CM_DEFAULT_SATA_CLKCTRL
,
996 .modulemode
= MODULEMODE_SWCTRL
,
999 .class = &dm81xx_sata_hwmod_class
,
1002 static struct omap_hwmod_ocp_if dm81xx_l4_hs__sata
= {
1003 .master
= &dm81xx_l4_hs_hwmod
,
1004 .slave
= &dm81xx_sata_hwmod
,
1005 .clk
= "sysclk5_ck",
1006 .user
= OCP_USER_MPU
,
1009 static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc
= {
1013 .sysc_flags
= SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1014 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1015 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
,
1016 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
1017 .sysc_fields
= &omap_hwmod_sysc_type1
,
1020 static struct omap_hwmod_class dm81xx_mmc_class
= {
1022 .sysc
= &dm81xx_mmc_sysc
,
1025 static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks
[] = {
1026 { .role
= "dbck", .clk
= "sysclk18_ck", },
1029 static struct omap_hsmmc_dev_attr mmc_dev_attr
= {
1032 static struct omap_hwmod dm814x_mmc1_hwmod
= {
1034 .clkdm_name
= "alwon_l3s_clkdm",
1035 .opt_clks
= dm81xx_mmc_opt_clks
,
1036 .opt_clks_cnt
= ARRAY_SIZE(dm81xx_mmc_opt_clks
),
1037 .main_clk
= "sysclk8_ck",
1040 .clkctrl_offs
= DM814X_CM_ALWON_MMCHS_0_CLKCTRL
,
1041 .modulemode
= MODULEMODE_SWCTRL
,
1044 .dev_attr
= &mmc_dev_attr
,
1045 .class = &dm81xx_mmc_class
,
1048 static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1
= {
1049 .master
= &dm81xx_l4_ls_hwmod
,
1050 .slave
= &dm814x_mmc1_hwmod
,
1051 .clk
= "sysclk6_ck",
1052 .user
= OCP_USER_MPU
,
1053 .flags
= OMAP_FIREWALL_L4
1056 static struct omap_hwmod dm814x_mmc2_hwmod
= {
1058 .clkdm_name
= "alwon_l3s_clkdm",
1059 .opt_clks
= dm81xx_mmc_opt_clks
,
1060 .opt_clks_cnt
= ARRAY_SIZE(dm81xx_mmc_opt_clks
),
1061 .main_clk
= "sysclk8_ck",
1064 .clkctrl_offs
= DM814X_CM_ALWON_MMCHS_1_CLKCTRL
,
1065 .modulemode
= MODULEMODE_SWCTRL
,
1068 .dev_attr
= &mmc_dev_attr
,
1069 .class = &dm81xx_mmc_class
,
1072 static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2
= {
1073 .master
= &dm81xx_l4_ls_hwmod
,
1074 .slave
= &dm814x_mmc2_hwmod
,
1075 .clk
= "sysclk6_ck",
1076 .user
= OCP_USER_MPU
,
1077 .flags
= OMAP_FIREWALL_L4
1080 static struct omap_hwmod dm814x_mmc3_hwmod
= {
1082 .clkdm_name
= "alwon_l3_med_clkdm",
1083 .opt_clks
= dm81xx_mmc_opt_clks
,
1084 .opt_clks_cnt
= ARRAY_SIZE(dm81xx_mmc_opt_clks
),
1085 .main_clk
= "sysclk8_ck",
1088 .clkctrl_offs
= DM814X_CM_ALWON_MMCHS_2_CLKCTRL
,
1089 .modulemode
= MODULEMODE_SWCTRL
,
1092 .dev_attr
= &mmc_dev_attr
,
1093 .class = &dm81xx_mmc_class
,
1096 static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3
= {
1097 .master
= &dm81xx_alwon_l3_med_hwmod
,
1098 .slave
= &dm814x_mmc3_hwmod
,
1099 .clk
= "sysclk4_ck",
1100 .user
= OCP_USER_MPU
,
1103 static struct omap_hwmod dm816x_mmc1_hwmod
= {
1105 .clkdm_name
= "alwon_l3s_clkdm",
1106 .opt_clks
= dm81xx_mmc_opt_clks
,
1107 .opt_clks_cnt
= ARRAY_SIZE(dm81xx_mmc_opt_clks
),
1108 .main_clk
= "sysclk10_ck",
1111 .clkctrl_offs
= DM816X_CM_ALWON_SDIO_CLKCTRL
,
1112 .modulemode
= MODULEMODE_SWCTRL
,
1115 .dev_attr
= &mmc_dev_attr
,
1116 .class = &dm81xx_mmc_class
,
1119 static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1
= {
1120 .master
= &dm81xx_l4_ls_hwmod
,
1121 .slave
= &dm816x_mmc1_hwmod
,
1122 .clk
= "sysclk6_ck",
1123 .user
= OCP_USER_MPU
,
1124 .flags
= OMAP_FIREWALL_L4
1127 static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc
= {
1131 .sysc_flags
= SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1132 SYSC_HAS_ENAWAKEUP
| SYSC_HAS_SOFTRESET
|
1133 SYSC_HAS_AUTOIDLE
| SYSS_HAS_RESET_STATUS
,
1134 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
1135 .sysc_fields
= &omap_hwmod_sysc_type1
,
1138 static struct omap_hwmod_class dm816x_mcspi_class
= {
1140 .sysc
= &dm816x_mcspi_sysc
,
1141 .rev
= OMAP3_MCSPI_REV
,
1144 static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr
= {
1145 .num_chipselect
= 4,
1148 static struct omap_hwmod dm81xx_mcspi1_hwmod
= {
1150 .clkdm_name
= "alwon_l3s_clkdm",
1151 .main_clk
= "sysclk10_ck",
1154 .clkctrl_offs
= DM81XX_CM_ALWON_SPI_CLKCTRL
,
1155 .modulemode
= MODULEMODE_SWCTRL
,
1158 .class = &dm816x_mcspi_class
,
1159 .dev_attr
= &dm816x_mcspi1_dev_attr
,
1162 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1
= {
1163 .master
= &dm81xx_l4_ls_hwmod
,
1164 .slave
= &dm81xx_mcspi1_hwmod
,
1165 .clk
= "sysclk6_ck",
1166 .user
= OCP_USER_MPU
,
1169 static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc
= {
1173 .sysc_flags
= SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1174 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
,
1175 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
1176 .sysc_fields
= &omap_hwmod_sysc_type1
,
1179 static struct omap_hwmod_class dm81xx_mailbox_hwmod_class
= {
1181 .sysc
= &dm81xx_mailbox_sysc
,
1184 static struct omap_hwmod dm81xx_mailbox_hwmod
= {
1186 .clkdm_name
= "alwon_l3s_clkdm",
1187 .class = &dm81xx_mailbox_hwmod_class
,
1188 .main_clk
= "sysclk6_ck",
1191 .clkctrl_offs
= DM81XX_CM_ALWON_MAILBOX_CLKCTRL
,
1192 .modulemode
= MODULEMODE_SWCTRL
,
1197 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox
= {
1198 .master
= &dm81xx_l4_ls_hwmod
,
1199 .slave
= &dm81xx_mailbox_hwmod
,
1200 .clk
= "sysclk6_ck",
1201 .user
= OCP_USER_MPU
,
1204 static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc
= {
1208 .sysc_flags
= SYSC_HAS_CLOCKACTIVITY
| SYSC_HAS_SIDLEMODE
|
1209 SYSC_HAS_SOFTRESET
| SYSC_HAS_AUTOIDLE
,
1210 .idlemodes
= SIDLE_FORCE
| SIDLE_NO
| SIDLE_SMART
,
1211 .sysc_fields
= &omap_hwmod_sysc_type1
,
1214 static struct omap_hwmod_class dm81xx_spinbox_hwmod_class
= {
1216 .sysc
= &dm81xx_spinbox_sysc
,
1219 static struct omap_hwmod dm81xx_spinbox_hwmod
= {
1221 .clkdm_name
= "alwon_l3s_clkdm",
1222 .class = &dm81xx_spinbox_hwmod_class
,
1223 .main_clk
= "sysclk6_ck",
1226 .clkctrl_offs
= DM81XX_CM_ALWON_SPINBOX_CLKCTRL
,
1227 .modulemode
= MODULEMODE_SWCTRL
,
1232 static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox
= {
1233 .master
= &dm81xx_l4_ls_hwmod
,
1234 .slave
= &dm81xx_spinbox_hwmod
,
1235 .clk
= "sysclk6_ck",
1236 .user
= OCP_USER_MPU
,
1239 static struct omap_hwmod_class dm81xx_tpcc_hwmod_class
= {
1243 static struct omap_hwmod dm81xx_tpcc_hwmod
= {
1245 .class = &dm81xx_tpcc_hwmod_class
,
1246 .clkdm_name
= "alwon_l3s_clkdm",
1247 .main_clk
= "sysclk4_ck",
1250 .clkctrl_offs
= DM81XX_CM_ALWON_TPCC_CLKCTRL
,
1251 .modulemode
= MODULEMODE_SWCTRL
,
1256 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc
= {
1257 .master
= &dm81xx_alwon_l3_fast_hwmod
,
1258 .slave
= &dm81xx_tpcc_hwmod
,
1259 .clk
= "sysclk4_ck",
1260 .user
= OCP_USER_MPU
,
1263 static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space
[] = {
1265 .pa_start
= 0x49800000,
1266 .pa_end
= 0x49800000 + SZ_8K
- 1,
1267 .flags
= ADDR_TYPE_RT
,
1272 static struct omap_hwmod_class dm81xx_tptc0_hwmod_class
= {
1276 static struct omap_hwmod dm81xx_tptc0_hwmod
= {
1278 .class = &dm81xx_tptc0_hwmod_class
,
1279 .clkdm_name
= "alwon_l3s_clkdm",
1280 .main_clk
= "sysclk4_ck",
1283 .clkctrl_offs
= DM81XX_CM_ALWON_TPTC0_CLKCTRL
,
1284 .modulemode
= MODULEMODE_SWCTRL
,
1289 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0
= {
1290 .master
= &dm81xx_alwon_l3_fast_hwmod
,
1291 .slave
= &dm81xx_tptc0_hwmod
,
1292 .clk
= "sysclk4_ck",
1293 .addr
= dm81xx_tptc0_addr_space
,
1294 .user
= OCP_USER_MPU
,
1297 static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast
= {
1298 .master
= &dm81xx_tptc0_hwmod
,
1299 .slave
= &dm81xx_alwon_l3_fast_hwmod
,
1300 .clk
= "sysclk4_ck",
1301 .addr
= dm81xx_tptc0_addr_space
,
1302 .user
= OCP_USER_MPU
,
1305 static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space
[] = {
1307 .pa_start
= 0x49900000,
1308 .pa_end
= 0x49900000 + SZ_8K
- 1,
1309 .flags
= ADDR_TYPE_RT
,
1314 static struct omap_hwmod_class dm81xx_tptc1_hwmod_class
= {
1318 static struct omap_hwmod dm81xx_tptc1_hwmod
= {
1320 .class = &dm81xx_tptc1_hwmod_class
,
1321 .clkdm_name
= "alwon_l3s_clkdm",
1322 .main_clk
= "sysclk4_ck",
1325 .clkctrl_offs
= DM81XX_CM_ALWON_TPTC1_CLKCTRL
,
1326 .modulemode
= MODULEMODE_SWCTRL
,
1331 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1
= {
1332 .master
= &dm81xx_alwon_l3_fast_hwmod
,
1333 .slave
= &dm81xx_tptc1_hwmod
,
1334 .clk
= "sysclk4_ck",
1335 .addr
= dm81xx_tptc1_addr_space
,
1336 .user
= OCP_USER_MPU
,
1339 static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast
= {
1340 .master
= &dm81xx_tptc1_hwmod
,
1341 .slave
= &dm81xx_alwon_l3_fast_hwmod
,
1342 .clk
= "sysclk4_ck",
1343 .addr
= dm81xx_tptc1_addr_space
,
1344 .user
= OCP_USER_MPU
,
1347 static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space
[] = {
1349 .pa_start
= 0x49a00000,
1350 .pa_end
= 0x49a00000 + SZ_8K
- 1,
1351 .flags
= ADDR_TYPE_RT
,
1356 static struct omap_hwmod_class dm81xx_tptc2_hwmod_class
= {
1360 static struct omap_hwmod dm81xx_tptc2_hwmod
= {
1362 .class = &dm81xx_tptc2_hwmod_class
,
1363 .clkdm_name
= "alwon_l3s_clkdm",
1364 .main_clk
= "sysclk4_ck",
1367 .clkctrl_offs
= DM81XX_CM_ALWON_TPTC2_CLKCTRL
,
1368 .modulemode
= MODULEMODE_SWCTRL
,
1373 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2
= {
1374 .master
= &dm81xx_alwon_l3_fast_hwmod
,
1375 .slave
= &dm81xx_tptc2_hwmod
,
1376 .clk
= "sysclk4_ck",
1377 .addr
= dm81xx_tptc2_addr_space
,
1378 .user
= OCP_USER_MPU
,
1381 static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast
= {
1382 .master
= &dm81xx_tptc2_hwmod
,
1383 .slave
= &dm81xx_alwon_l3_fast_hwmod
,
1384 .clk
= "sysclk4_ck",
1385 .addr
= dm81xx_tptc2_addr_space
,
1386 .user
= OCP_USER_MPU
,
1389 static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space
[] = {
1391 .pa_start
= 0x49b00000,
1392 .pa_end
= 0x49b00000 + SZ_8K
- 1,
1393 .flags
= ADDR_TYPE_RT
,
1398 static struct omap_hwmod_class dm81xx_tptc3_hwmod_class
= {
1402 static struct omap_hwmod dm81xx_tptc3_hwmod
= {
1404 .class = &dm81xx_tptc3_hwmod_class
,
1405 .clkdm_name
= "alwon_l3s_clkdm",
1406 .main_clk
= "sysclk4_ck",
1409 .clkctrl_offs
= DM81XX_CM_ALWON_TPTC3_CLKCTRL
,
1410 .modulemode
= MODULEMODE_SWCTRL
,
1415 static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3
= {
1416 .master
= &dm81xx_alwon_l3_fast_hwmod
,
1417 .slave
= &dm81xx_tptc3_hwmod
,
1418 .clk
= "sysclk4_ck",
1419 .addr
= dm81xx_tptc3_addr_space
,
1420 .user
= OCP_USER_MPU
,
1423 static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast
= {
1424 .master
= &dm81xx_tptc3_hwmod
,
1425 .slave
= &dm81xx_alwon_l3_fast_hwmod
,
1426 .clk
= "sysclk4_ck",
1427 .addr
= dm81xx_tptc3_addr_space
,
1428 .user
= OCP_USER_MPU
,
1432 * REVISIT: Test and enable the following once clocks work:
1433 * dm81xx_l4_ls__mailbox
1435 * Also note that some devices share a single clkctrl_offs..
1436 * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
1438 static struct omap_hwmod_ocp_if
*dm814x_hwmod_ocp_ifs
[] __initdata
= {
1439 &dm814x_mpu__alwon_l3_slow
,
1440 &dm814x_mpu__alwon_l3_med
,
1441 &dm81xx_alwon_l3_slow__l4_ls
,
1442 &dm81xx_alwon_l3_slow__l4_hs
,
1443 &dm81xx_l4_ls__uart1
,
1444 &dm81xx_l4_ls__uart2
,
1445 &dm81xx_l4_ls__uart3
,
1446 &dm81xx_l4_ls__wd_timer1
,
1447 &dm81xx_l4_ls__i2c1
,
1448 &dm81xx_l4_ls__i2c2
,
1449 &dm81xx_l4_ls__gpio1
,
1450 &dm81xx_l4_ls__gpio2
,
1452 &dm81xx_l4_ls__mcspi1
,
1453 &dm814x_l4_ls__mmc1
,
1454 &dm814x_l4_ls__mmc2
,
1456 &dm81xx_alwon_l3_fast__tpcc
,
1457 &dm81xx_alwon_l3_fast__tptc0
,
1458 &dm81xx_alwon_l3_fast__tptc1
,
1459 &dm81xx_alwon_l3_fast__tptc2
,
1460 &dm81xx_alwon_l3_fast__tptc3
,
1461 &dm81xx_tptc0__alwon_l3_fast
,
1462 &dm81xx_tptc1__alwon_l3_fast
,
1463 &dm81xx_tptc2__alwon_l3_fast
,
1464 &dm81xx_tptc3__alwon_l3_fast
,
1465 &dm814x_l4_ls__timer1
,
1466 &dm814x_l4_ls__timer2
,
1467 &dm814x_l4_hs__cpgmac0
,
1468 &dm814x_cpgmac0__mdio
,
1469 &dm81xx_alwon_l3_slow__gpmc
,
1470 &dm814x_default_l3_slow__usbss
,
1471 &dm814x_alwon_l3_med__mmc3
,
1475 int __init
dm814x_hwmod_init(void)
1478 return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs
);
1481 static struct omap_hwmod_ocp_if
*dm816x_hwmod_ocp_ifs
[] __initdata
= {
1482 &dm816x_mpu__alwon_l3_slow
,
1483 &dm816x_mpu__alwon_l3_med
,
1484 &dm81xx_alwon_l3_slow__l4_ls
,
1485 &dm81xx_alwon_l3_slow__l4_hs
,
1486 &dm81xx_l4_ls__uart1
,
1487 &dm81xx_l4_ls__uart2
,
1488 &dm81xx_l4_ls__uart3
,
1489 &dm81xx_l4_ls__wd_timer1
,
1490 &dm81xx_l4_ls__i2c1
,
1491 &dm81xx_l4_ls__i2c2
,
1492 &dm81xx_l4_ls__gpio1
,
1493 &dm81xx_l4_ls__gpio2
,
1496 &dm816x_l4_ls__mmc1
,
1497 &dm816x_l4_ls__timer1
,
1498 &dm816x_l4_ls__timer2
,
1499 &dm816x_l4_ls__timer3
,
1500 &dm816x_l4_ls__timer4
,
1501 &dm816x_l4_ls__timer5
,
1502 &dm816x_l4_ls__timer6
,
1503 &dm816x_l4_ls__timer7
,
1504 &dm81xx_l4_ls__mcspi1
,
1505 &dm81xx_l4_ls__mailbox
,
1506 &dm81xx_l4_ls__spinbox
,
1507 &dm81xx_l4_hs__emac0
,
1508 &dm81xx_emac0__mdio
,
1509 &dm816x_l4_hs__emac1
,
1510 &dm81xx_l4_hs__sata
,
1511 &dm81xx_alwon_l3_fast__tpcc
,
1512 &dm81xx_alwon_l3_fast__tptc0
,
1513 &dm81xx_alwon_l3_fast__tptc1
,
1514 &dm81xx_alwon_l3_fast__tptc2
,
1515 &dm81xx_alwon_l3_fast__tptc3
,
1516 &dm81xx_tptc0__alwon_l3_fast
,
1517 &dm81xx_tptc1__alwon_l3_fast
,
1518 &dm81xx_tptc2__alwon_l3_fast
,
1519 &dm81xx_tptc3__alwon_l3_fast
,
1520 &dm81xx_alwon_l3_slow__gpmc
,
1521 &dm816x_default_l3_slow__usbss
,
1525 int __init
dm816x_hwmod_init(void)
1528 return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs
);