xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision 29f5b34ca1a191c2cf4f6c8c12f4dec56e8d3bc1)
14d38bd12STony Lindgren /*
24d38bd12STony Lindgren  * DM81xx hwmod data.
34d38bd12STony Lindgren  *
44d38bd12STony Lindgren  * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
54d38bd12STony Lindgren  * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
64d38bd12STony Lindgren  *
74d38bd12STony Lindgren  * This program is free software; you can redistribute it and/or
84d38bd12STony Lindgren  * modify it under the terms of the GNU General Public License as
94d38bd12STony Lindgren  * published by the Free Software Foundation version 2.
104d38bd12STony Lindgren  *
114d38bd12STony Lindgren  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
124d38bd12STony Lindgren  * kind, whether express or implied; without even the implied warranty
134d38bd12STony Lindgren  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
144d38bd12STony Lindgren  * GNU General Public License for more details.
154d38bd12STony Lindgren  *
164d38bd12STony Lindgren  */
174d38bd12STony Lindgren 
184d38bd12STony Lindgren #include <linux/platform_data/gpio-omap.h>
194d38bd12STony Lindgren #include <linux/platform_data/hsmmc-omap.h>
204d38bd12STony Lindgren #include <linux/platform_data/spi-omap2-mcspi.h>
214d38bd12STony Lindgren #include <plat/dmtimer.h>
224d38bd12STony Lindgren 
234d38bd12STony Lindgren #include "omap_hwmod_common_data.h"
244d38bd12STony Lindgren #include "cm81xx.h"
254d38bd12STony Lindgren #include "ti81xx.h"
264d38bd12STony Lindgren #include "wd_timer.h"
274d38bd12STony Lindgren 
284d38bd12STony Lindgren /*
294d38bd12STony Lindgren  * DM816X hardware modules integration data
304d38bd12STony Lindgren  *
314d38bd12STony Lindgren  * Note: This is incomplete and at present, not generated from h/w database.
324d38bd12STony Lindgren  */
334d38bd12STony Lindgren 
344d38bd12STony Lindgren /*
357e1b11d1STony Lindgren  * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
367e1b11d1STony Lindgren  * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
374d38bd12STony Lindgren  */
387e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP0_CLKCTRL		0x140
397e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP1_CLKCTRL		0x144
407e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP2_CLKCTRL		0x148
417e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCBSP_CLKCTRL		0x14c
427e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_0_CLKCTRL		0x150
437e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_1_CLKCTRL		0x154
447e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_2_CLKCTRL		0x158
457e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL		0x15c
467e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL		0x160
477e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_0_CLKCTRL		0x164
487e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_1_CLKCTRL		0x168
497e1b11d1STony Lindgren #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL		0x18c
507e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPI_CLKCTRL		0x190
517e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL		0x194
527e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL		0x198
537e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL		0x19c
547e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL		0x1a8
557e1b11d1STony Lindgren #define DM81XX_CM_ALWON_CONTROL_CLKCTRL		0x1c4
567e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPMC_CLKCTRL		0x1d0
577e1b11d1STony Lindgren #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL	0x1d4
587e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L3_CLKCTRL		0x1e4
597e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4HS_CLKCTRL		0x1e8
607e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4LS_CLKCTRL		0x1ec
617e1b11d1STony Lindgren #define DM81XX_CM_ALWON_RTC_CLKCTRL		0x1f0
627e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPCC_CLKCTRL		0x1f4
637e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC0_CLKCTRL		0x1f8
647e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC1_CLKCTRL		0x1fc
657e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC2_CLKCTRL		0x200
667e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC3_CLKCTRL		0x204
677e1b11d1STony Lindgren 
687e1b11d1STony Lindgren /* Registers specific to dm814x */
697e1b11d1STony Lindgren #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL	0x16c
707e1b11d1STony Lindgren #define DM814X_CM_ALWON_ATL_CLKCTRL		0x170
717e1b11d1STony Lindgren #define DM814X_CM_ALWON_MLB_CLKCTRL		0x174
727e1b11d1STony Lindgren #define DM814X_CM_ALWON_PATA_CLKCTRL		0x178
737e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_3_CLKCTRL		0x180
747e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_4_CLKCTRL		0x184
757e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_5_CLKCTRL		0x188
767e1b11d1STony Lindgren #define DM814X_CM_ALWON_OCM_0_CLKCTRL		0x1b4
777e1b11d1STony Lindgren #define DM814X_CM_ALWON_VCP_CLKCTRL		0x1b8
787e1b11d1STony Lindgren #define DM814X_CM_ALWON_MPU_CLKCTRL		0x1dc
797e1b11d1STony Lindgren #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL		0x1e0
807e1b11d1STony Lindgren #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL	0x218
817e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL		0x21c
827e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL		0x220
837e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL		0x224
847e1b11d1STony Lindgren #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL	0x228
857e1b11d1STony Lindgren 
867e1b11d1STony Lindgren /* Registers specific to dm816x */
874d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE		0x1400
884d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL	(0x1570 - DM816X_DM_ALWON_BASE)
894d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL	(0x1574 - DM816X_DM_ALWON_BASE)
904d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL	(0x1578 - DM816X_DM_ALWON_BASE)
914d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL	(0x157c - DM816X_DM_ALWON_BASE)
924d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL	(0x1580 - DM816X_DM_ALWON_BASE)
934d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL	(0x1584 - DM816X_DM_ALWON_BASE)
944d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL	(0x1588 - DM816X_DM_ALWON_BASE)
954d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL	(0x15b0 - DM816X_DM_ALWON_BASE)
964d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL	(0x15b4 - DM816X_DM_ALWON_BASE)
974d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL	(0x15b8 - DM816X_DM_ALWON_BASE)
984d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
994d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL	(0x15dc - DM816X_DM_ALWON_BASE)
1004d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL	(0x1608 - DM816X_DM_ALWON_BASE)
1014d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL	(0x160c - DM816X_DM_ALWON_BASE)
1024d38bd12STony Lindgren 
1034d38bd12STony Lindgren /*
1044d38bd12STony Lindgren  * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
1054d38bd12STony Lindgren  * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
1064d38bd12STony Lindgren  */
1074d38bd12STony Lindgren #define DM816X_CM_DEFAULT_OFFSET	0x500
1084d38bd12STony Lindgren #define DM816X_CM_DEFAULT_USB_CLKCTRL	(0x558 - DM816X_CM_DEFAULT_OFFSET)
1094d38bd12STony Lindgren 
1104d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
1117e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = {
1124d38bd12STony Lindgren 	.name		= "alwon_l3_slow",
1134d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1144d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1154d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1164d38bd12STony Lindgren };
1174d38bd12STony Lindgren 
1187e1b11d1STony Lindgren static struct omap_hwmod dm81xx_default_l3_slow_hwmod = {
1194d38bd12STony Lindgren 	.name		= "default_l3_slow",
1204d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
1214d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1224d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1234d38bd12STony Lindgren };
1244d38bd12STony Lindgren 
1257e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_med_hwmod = {
1264d38bd12STony Lindgren 	.name		= "l3_med",
1274d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1284d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1294d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1304d38bd12STony Lindgren };
1314d38bd12STony Lindgren 
1327e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod = {
1334d38bd12STony Lindgren 	.name		= "l3_fast",
1344d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_fast_clkdm",
1354d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1364d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1374d38bd12STony Lindgren };
1384d38bd12STony Lindgren 
1394d38bd12STony Lindgren /*
1404d38bd12STony Lindgren  * L4 standard peripherals, see TRM table 1-12 for devices using this.
1414d38bd12STony Lindgren  * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock.
1424d38bd12STony Lindgren  */
1437e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_ls_hwmod = {
1444d38bd12STony Lindgren 	.name		= "l4_ls",
1454d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1464d38bd12STony Lindgren 	.class		= &l4_hwmod_class,
147*29f5b34cSNeil Armstrong 	.flags		= HWMOD_NO_IDLEST,
1484d38bd12STony Lindgren };
1494d38bd12STony Lindgren 
1504d38bd12STony Lindgren /*
1514d38bd12STony Lindgren  * L4 high-speed peripherals. For devices using this, please see the TRM
1524d38bd12STony Lindgren  * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
1534d38bd12STony Lindgren  * table 1-73 for devices using 250MHz SYSCLK5 clock.
1544d38bd12STony Lindgren  */
1557e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_hs_hwmod = {
1564d38bd12STony Lindgren 	.name		= "l4_hs",
1574d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1584d38bd12STony Lindgren 	.class		= &l4_hwmod_class,
159*29f5b34cSNeil Armstrong 	.flags		= HWMOD_NO_IDLEST,
1604d38bd12STony Lindgren };
1614d38bd12STony Lindgren 
1624d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */
1637e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = {
1647e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_slow_hwmod,
1657e1b11d1STony Lindgren 	.slave	= &dm81xx_l4_ls_hwmod,
1664d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1674d38bd12STony Lindgren };
1684d38bd12STony Lindgren 
1694d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */
1707e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = {
1717e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_med_hwmod,
1727e1b11d1STony Lindgren 	.slave	= &dm81xx_l4_hs_hwmod,
1734d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1744d38bd12STony Lindgren };
1754d38bd12STony Lindgren 
1764d38bd12STony Lindgren /* MPU */
1770f3ccb24STony Lindgren static struct omap_hwmod dm814x_mpu_hwmod = {
1780f3ccb24STony Lindgren 	.name		= "mpu",
1790f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1800f3ccb24STony Lindgren 	.class		= &mpu_hwmod_class,
1810f3ccb24STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
1820f3ccb24STony Lindgren 	.main_clk	= "mpu_ck",
1830f3ccb24STony Lindgren 	.prcm		= {
1840f3ccb24STony Lindgren 		.omap4 = {
1850f3ccb24STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL,
1860f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1870f3ccb24STony Lindgren 		},
1880f3ccb24STony Lindgren 	},
1890f3ccb24STony Lindgren };
1900f3ccb24STony Lindgren 
1910f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = {
1920f3ccb24STony Lindgren 	.master		= &dm814x_mpu_hwmod,
1930f3ccb24STony Lindgren 	.slave		= &dm81xx_alwon_l3_slow_hwmod,
1940f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
1950f3ccb24STony Lindgren };
1960f3ccb24STony Lindgren 
1970f3ccb24STony Lindgren /* L3 med peripheral interface running at 200MHz */
1980f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = {
1990f3ccb24STony Lindgren 	.master	= &dm814x_mpu_hwmod,
2000f3ccb24STony Lindgren 	.slave	= &dm81xx_alwon_l3_med_hwmod,
2010f3ccb24STony Lindgren 	.user	= OCP_USER_MPU,
2020f3ccb24STony Lindgren };
2030f3ccb24STony Lindgren 
2044d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = {
2054d38bd12STony Lindgren 	.name		= "mpu",
2064d38bd12STony Lindgren 	.clkdm_name	= "alwon_mpu_clkdm",
2074d38bd12STony Lindgren 	.class		= &mpu_hwmod_class,
2084d38bd12STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
2094d38bd12STony Lindgren 	.main_clk	= "mpu_ck",
2104d38bd12STony Lindgren 	.prcm		= {
2114d38bd12STony Lindgren 		.omap4 = {
2124d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
2134d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2144d38bd12STony Lindgren 		},
2154d38bd12STony Lindgren 	},
2164d38bd12STony Lindgren };
2174d38bd12STony Lindgren 
2184d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
2194d38bd12STony Lindgren 	.master		= &dm816x_mpu_hwmod,
2207e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_slow_hwmod,
2214d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2224d38bd12STony Lindgren };
2234d38bd12STony Lindgren 
2244d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */
2254d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
2264d38bd12STony Lindgren 	.master	= &dm816x_mpu_hwmod,
2277e1b11d1STony Lindgren 	.slave	= &dm81xx_alwon_l3_med_hwmod,
2284d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
2294d38bd12STony Lindgren };
2304d38bd12STony Lindgren 
2314d38bd12STony Lindgren /* UART common */
2324d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = {
2334d38bd12STony Lindgren 	.rev_offs	= 0x50,
2344d38bd12STony Lindgren 	.sysc_offs	= 0x54,
2354d38bd12STony Lindgren 	.syss_offs	= 0x58,
2364d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
2374d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
2384d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2394d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2404d38bd12STony Lindgren 				MSTANDBY_SMART_WKUP,
2414d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2424d38bd12STony Lindgren };
2434d38bd12STony Lindgren 
2444d38bd12STony Lindgren static struct omap_hwmod_class uart_class = {
2454d38bd12STony Lindgren 	.name = "uart",
2464d38bd12STony Lindgren 	.sysc = &uart_sysc,
2474d38bd12STony Lindgren };
2484d38bd12STony Lindgren 
2497e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = {
2504d38bd12STony Lindgren 	.name		= "uart1",
2514d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2524d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2534d38bd12STony Lindgren 	.prcm		= {
2544d38bd12STony Lindgren 		.omap4 = {
2557e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
2564d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2574d38bd12STony Lindgren 		},
2584d38bd12STony Lindgren 	},
2594d38bd12STony Lindgren 	.class		= &uart_class,
2604d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART1_FLAGS,
2614d38bd12STony Lindgren };
2624d38bd12STony Lindgren 
2637e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
2647e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
2657e1b11d1STony Lindgren 	.slave		= &dm81xx_uart1_hwmod,
2664d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2674d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2684d38bd12STony Lindgren };
2694d38bd12STony Lindgren 
2707e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = {
2714d38bd12STony Lindgren 	.name		= "uart2",
2724d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2734d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2744d38bd12STony Lindgren 	.prcm		= {
2754d38bd12STony Lindgren 		.omap4 = {
2767e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
2774d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2784d38bd12STony Lindgren 		},
2794d38bd12STony Lindgren 	},
2804d38bd12STony Lindgren 	.class		= &uart_class,
2814d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART2_FLAGS,
2824d38bd12STony Lindgren };
2834d38bd12STony Lindgren 
2847e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
2857e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
2867e1b11d1STony Lindgren 	.slave		= &dm81xx_uart2_hwmod,
2874d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2884d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2894d38bd12STony Lindgren };
2904d38bd12STony Lindgren 
2917e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = {
2924d38bd12STony Lindgren 	.name		= "uart3",
2934d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2944d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2954d38bd12STony Lindgren 	.prcm		= {
2964d38bd12STony Lindgren 		.omap4 = {
2977e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
2984d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2994d38bd12STony Lindgren 		},
3004d38bd12STony Lindgren 	},
3014d38bd12STony Lindgren 	.class		= &uart_class,
3024d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART3_FLAGS,
3034d38bd12STony Lindgren };
3044d38bd12STony Lindgren 
3057e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
3067e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3077e1b11d1STony Lindgren 	.slave		= &dm81xx_uart3_hwmod,
3084d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3094d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3104d38bd12STony Lindgren };
3114d38bd12STony Lindgren 
3124d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
3134d38bd12STony Lindgren 	.rev_offs	= 0x0,
3144d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3154d38bd12STony Lindgren 	.syss_offs	= 0x14,
3164d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
3174d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3184d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3194d38bd12STony Lindgren };
3204d38bd12STony Lindgren 
3214d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = {
3224d38bd12STony Lindgren 	.name		= "wd_timer",
3234d38bd12STony Lindgren 	.sysc		= &wd_timer_sysc,
3244d38bd12STony Lindgren 	.pre_shutdown	= &omap2_wd_timer_disable,
3254d38bd12STony Lindgren 	.reset		= &omap2_wd_timer_reset,
3264d38bd12STony Lindgren };
3274d38bd12STony Lindgren 
3287e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = {
3294d38bd12STony Lindgren 	.name		= "wd_timer",
3304d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3314d38bd12STony Lindgren 	.main_clk	= "sysclk18_ck",
3324d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
3334d38bd12STony Lindgren 	.prcm		= {
3344d38bd12STony Lindgren 		.omap4 = {
3357e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
3364d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3374d38bd12STony Lindgren 		},
3384d38bd12STony Lindgren 	},
3394d38bd12STony Lindgren 	.class		= &wd_timer_class,
3404d38bd12STony Lindgren };
3414d38bd12STony Lindgren 
3427e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
3437e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3447e1b11d1STony Lindgren 	.slave		= &dm81xx_wd_timer_hwmod,
3454d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3464d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3474d38bd12STony Lindgren };
3484d38bd12STony Lindgren 
3494d38bd12STony Lindgren /* I2C common */
3504d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = {
3514d38bd12STony Lindgren 	.rev_offs	= 0x0,
3524d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3534d38bd12STony Lindgren 	.syss_offs	= 0x90,
3544d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE |
3554d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3564d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE,
3574d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3584d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3594d38bd12STony Lindgren };
3604d38bd12STony Lindgren 
3614d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = {
3624d38bd12STony Lindgren 	.name = "i2c",
3634d38bd12STony Lindgren 	.sysc = &i2c_sysc,
3644d38bd12STony Lindgren };
3654d38bd12STony Lindgren 
3664d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = {
3674d38bd12STony Lindgren 	.name		= "i2c1",
3684d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3694d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3704d38bd12STony Lindgren 	.prcm		= {
3714d38bd12STony Lindgren 		.omap4 = {
3727e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
3734d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3744d38bd12STony Lindgren 		},
3754d38bd12STony Lindgren 	},
3764d38bd12STony Lindgren 	.class		= &i2c_class,
3774d38bd12STony Lindgren };
3784d38bd12STony Lindgren 
3797e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
3807e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3814d38bd12STony Lindgren 	.slave		= &dm81xx_i2c1_hwmod,
3824d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3834d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3844d38bd12STony Lindgren };
3854d38bd12STony Lindgren 
3867e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = {
3874d38bd12STony Lindgren 	.name		= "i2c2",
3884d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3894d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3904d38bd12STony Lindgren 	.prcm		= {
3914d38bd12STony Lindgren 		.omap4 = {
3927e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
3934d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3944d38bd12STony Lindgren 		},
3954d38bd12STony Lindgren 	},
3964d38bd12STony Lindgren 	.class		= &i2c_class,
3974d38bd12STony Lindgren };
3984d38bd12STony Lindgren 
3994d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
4004d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4014d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4024d38bd12STony Lindgren 	.syss_offs	= 0x0014,
4034d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
4044d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET |
4054d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4064d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
4074d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4084d38bd12STony Lindgren };
4094d38bd12STony Lindgren 
4107e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
4117e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4127e1b11d1STony Lindgren 	.slave		= &dm81xx_i2c2_hwmod,
4134d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
4144d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4154d38bd12STony Lindgren };
4164d38bd12STony Lindgren 
4174d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
4184d38bd12STony Lindgren 	.name = "elm",
4194d38bd12STony Lindgren 	.sysc = &dm81xx_elm_sysc,
4204d38bd12STony Lindgren };
4214d38bd12STony Lindgren 
4224d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = {
4234d38bd12STony Lindgren 	.name		= "elm",
4244d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4254d38bd12STony Lindgren 	.class		= &dm81xx_elm_hwmod_class,
4264d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4274d38bd12STony Lindgren };
4284d38bd12STony Lindgren 
4294d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
4307e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4314d38bd12STony Lindgren 	.slave		= &dm81xx_elm_hwmod,
4324d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4334d38bd12STony Lindgren };
4344d38bd12STony Lindgren 
4354d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
4364d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4374d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4384d38bd12STony Lindgren 	.syss_offs	= 0x0114,
4394d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4404d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4414d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4424d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4434d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
4444d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4454d38bd12STony Lindgren };
4464d38bd12STony Lindgren 
4474d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
4484d38bd12STony Lindgren 	.name	= "gpio",
4494d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4504d38bd12STony Lindgren 	.rev	= 2,
4514d38bd12STony Lindgren };
4524d38bd12STony Lindgren 
4534d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = {
4544d38bd12STony Lindgren 	.bank_width	= 32,
4554d38bd12STony Lindgren 	.dbck_flag	= true,
4564d38bd12STony Lindgren };
4574d38bd12STony Lindgren 
4584d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4594d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4604d38bd12STony Lindgren };
4614d38bd12STony Lindgren 
4624d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4634d38bd12STony Lindgren 	.name		= "gpio1",
4644d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4654d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4664d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4674d38bd12STony Lindgren 	.prcm = {
4684d38bd12STony Lindgren 		.omap4 = {
4697e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
4704d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4714d38bd12STony Lindgren 		},
4724d38bd12STony Lindgren 	},
4734d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
4744d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
4754d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4764d38bd12STony Lindgren };
4774d38bd12STony Lindgren 
4784d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
4797e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4804d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
4814d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4824d38bd12STony Lindgren };
4834d38bd12STony Lindgren 
4844d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
4854d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4864d38bd12STony Lindgren };
4874d38bd12STony Lindgren 
4884d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
4894d38bd12STony Lindgren 	.name		= "gpio2",
4904d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4914d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4924d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4934d38bd12STony Lindgren 	.prcm = {
4944d38bd12STony Lindgren 		.omap4 = {
4957e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
4964d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4974d38bd12STony Lindgren 		},
4984d38bd12STony Lindgren 	},
4994d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
5004d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
5014d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
5024d38bd12STony Lindgren };
5034d38bd12STony Lindgren 
5044d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
5057e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5064d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
5074d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5084d38bd12STony Lindgren };
5094d38bd12STony Lindgren 
5104d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
5114d38bd12STony Lindgren 	.rev_offs	= 0x0,
5124d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5134d38bd12STony Lindgren 	.syss_offs	= 0x14,
5144d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
5154d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
5164d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
5174d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
5184d38bd12STony Lindgren };
5194d38bd12STony Lindgren 
5204d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
5214d38bd12STony Lindgren 	.name	= "gpmc",
5224d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
5234d38bd12STony Lindgren };
5244d38bd12STony Lindgren 
5254d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
5264d38bd12STony Lindgren 	.name		= "gpmc",
5274d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5284d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
5294d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
53063aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
53163aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
5324d38bd12STony Lindgren 	.prcm = {
5334d38bd12STony Lindgren 		.omap4 = {
5347e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
5354d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5364d38bd12STony Lindgren 		},
5374d38bd12STony Lindgren 	},
5384d38bd12STony Lindgren };
5394d38bd12STony Lindgren 
540f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
5417e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_slow_hwmod,
5424d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
5434d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5444d38bd12STony Lindgren };
5454d38bd12STony Lindgren 
5464d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
5474d38bd12STony Lindgren 	.rev_offs	= 0x0,
5484d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5494d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5504d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5514d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5524d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5534d38bd12STony Lindgren };
5544d38bd12STony Lindgren 
5554d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5564d38bd12STony Lindgren 	.name = "usbotg",
5574d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5584d38bd12STony Lindgren };
5594d38bd12STony Lindgren 
5604d38bd12STony Lindgren static struct omap_hwmod dm81xx_usbss_hwmod = {
5614d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5624d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
5634d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
5644d38bd12STony Lindgren 	.prcm		= {
5654d38bd12STony Lindgren 		.omap4 = {
5664d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_DEFAULT_USB_CLKCTRL,
5674d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5684d38bd12STony Lindgren 		},
5694d38bd12STony Lindgren 	},
5704d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
5714d38bd12STony Lindgren };
5724d38bd12STony Lindgren 
5734d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_default_l3_slow__usbss = {
5747e1b11d1STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
5754d38bd12STony Lindgren 	.slave		= &dm81xx_usbss_hwmod,
5764d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5774d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5784d38bd12STony Lindgren };
5794d38bd12STony Lindgren 
5804d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
5814d38bd12STony Lindgren 	.rev_offs	= 0x0000,
5824d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
5834d38bd12STony Lindgren 	.syss_offs	= 0x0014,
5844d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
5854d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5864d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
5874d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5884d38bd12STony Lindgren };
5894d38bd12STony Lindgren 
5904d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
5914d38bd12STony Lindgren 	.name = "timer",
5924d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
5934d38bd12STony Lindgren };
5944d38bd12STony Lindgren 
5954d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
5964d38bd12STony Lindgren 	.timer_capability	= OMAP_TIMER_ALWON,
5974d38bd12STony Lindgren };
5984d38bd12STony Lindgren 
5990f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = {
6000f3ccb24STony Lindgren 	.name		= "timer1",
6010f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6020f3ccb24STony Lindgren 	.main_clk	= "timer_sys_ck",
6030f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6040f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6050f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6060f3ccb24STony Lindgren };
6070f3ccb24STony Lindgren 
6080f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
6090f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6100f3ccb24STony Lindgren 	.slave		= &dm814x_timer1_hwmod,
6110f3ccb24STony Lindgren 	.clk		= "timer_sys_ck",
6120f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6130f3ccb24STony Lindgren };
6140f3ccb24STony Lindgren 
6154d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
6164d38bd12STony Lindgren 	.name		= "timer1",
6174d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6184d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
6194d38bd12STony Lindgren 	.prcm		= {
6204d38bd12STony Lindgren 		.omap4 = {
6214d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
6224d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6234d38bd12STony Lindgren 		},
6244d38bd12STony Lindgren 	},
6254d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6264d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6274d38bd12STony Lindgren };
6284d38bd12STony Lindgren 
6294d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
6307e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6314d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
6324d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6334d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6344d38bd12STony Lindgren };
6354d38bd12STony Lindgren 
6360f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = {
6370f3ccb24STony Lindgren 	.name		= "timer2",
6380f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6390f3ccb24STony Lindgren 	.main_clk	= "timer_sys_ck",
6400f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6410f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6420f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6430f3ccb24STony Lindgren };
6440f3ccb24STony Lindgren 
6450f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
6460f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6470f3ccb24STony Lindgren 	.slave		= &dm814x_timer2_hwmod,
6480f3ccb24STony Lindgren 	.clk		= "timer_sys_ck",
6490f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6500f3ccb24STony Lindgren };
6510f3ccb24STony Lindgren 
6524d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
6534d38bd12STony Lindgren 	.name		= "timer2",
6544d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6554d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
6564d38bd12STony Lindgren 	.prcm		= {
6574d38bd12STony Lindgren 		.omap4 = {
6584d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
6594d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6604d38bd12STony Lindgren 		},
6614d38bd12STony Lindgren 	},
6624d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6634d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6644d38bd12STony Lindgren };
6654d38bd12STony Lindgren 
6664d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
6677e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6684d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
6694d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6704d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6714d38bd12STony Lindgren };
6724d38bd12STony Lindgren 
6734d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
6744d38bd12STony Lindgren 	.name		= "timer3",
6754d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6764d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
6774d38bd12STony Lindgren 	.prcm		= {
6784d38bd12STony Lindgren 		.omap4 = {
6794d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
6804d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6814d38bd12STony Lindgren 		},
6824d38bd12STony Lindgren 	},
6834d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6844d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6854d38bd12STony Lindgren };
6864d38bd12STony Lindgren 
6874d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
6887e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6894d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
6904d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6914d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6924d38bd12STony Lindgren };
6934d38bd12STony Lindgren 
6944d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
6954d38bd12STony Lindgren 	.name		= "timer4",
6964d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6974d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
6984d38bd12STony Lindgren 	.prcm		= {
6994d38bd12STony Lindgren 		.omap4 = {
7004d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
7014d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7024d38bd12STony Lindgren 		},
7034d38bd12STony Lindgren 	},
7044d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7054d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7064d38bd12STony Lindgren };
7074d38bd12STony Lindgren 
7084d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
7097e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7104d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
7114d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7124d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7134d38bd12STony Lindgren };
7144d38bd12STony Lindgren 
7154d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
7164d38bd12STony Lindgren 	.name		= "timer5",
7174d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7184d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
7194d38bd12STony Lindgren 	.prcm		= {
7204d38bd12STony Lindgren 		.omap4 = {
7214d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
7224d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7234d38bd12STony Lindgren 		},
7244d38bd12STony Lindgren 	},
7254d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7264d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7274d38bd12STony Lindgren };
7284d38bd12STony Lindgren 
7294d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
7307e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7314d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
7324d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7334d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7344d38bd12STony Lindgren };
7354d38bd12STony Lindgren 
7364d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
7374d38bd12STony Lindgren 	.name		= "timer6",
7384d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7394d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
7404d38bd12STony Lindgren 	.prcm		= {
7414d38bd12STony Lindgren 		.omap4 = {
7424d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
7434d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7444d38bd12STony Lindgren 		},
7454d38bd12STony Lindgren 	},
7464d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7474d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7484d38bd12STony Lindgren };
7494d38bd12STony Lindgren 
7504d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
7517e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7524d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
7534d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7544d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7554d38bd12STony Lindgren };
7564d38bd12STony Lindgren 
7574d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
7584d38bd12STony Lindgren 	.name		= "timer7",
7594d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7604d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
7614d38bd12STony Lindgren 	.prcm		= {
7624d38bd12STony Lindgren 		.omap4 = {
7634d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
7644d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7654d38bd12STony Lindgren 		},
7664d38bd12STony Lindgren 	},
7674d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7684d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7694d38bd12STony Lindgren };
7704d38bd12STony Lindgren 
7714d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
7727e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7734d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
7744d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7754d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7764d38bd12STony Lindgren };
7774d38bd12STony Lindgren 
7780f3ccb24STony Lindgren /* CPSW on dm814x */
7790f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
7800f3ccb24STony Lindgren 	.rev_offs	= 0x0,
7810f3ccb24STony Lindgren 	.sysc_offs	= 0x8,
7820f3ccb24STony Lindgren 	.syss_offs	= 0x4,
7830f3ccb24STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
7840f3ccb24STony Lindgren 			  SYSS_HAS_RESET_STATUS,
7850f3ccb24STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
7860f3ccb24STony Lindgren 			  MSTANDBY_NO,
7870f3ccb24STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type3,
7880f3ccb24STony Lindgren };
7890f3ccb24STony Lindgren 
7900f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
7910f3ccb24STony Lindgren 	.name		= "cpgmac0",
7920f3ccb24STony Lindgren 	.sysc		= &dm814x_cpgmac_sysc,
7930f3ccb24STony Lindgren };
7940f3ccb24STony Lindgren 
79524da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = {
7960f3ccb24STony Lindgren 	.name		= "cpgmac0",
7970f3ccb24STony Lindgren 	.class		= &dm814x_cpgmac0_hwmod_class,
7980f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7990f3ccb24STony Lindgren 	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
8000f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8010f3ccb24STony Lindgren 	.prcm		= {
8020f3ccb24STony Lindgren 		.omap4	= {
8030f3ccb24STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
8040f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8050f3ccb24STony Lindgren 		},
8060f3ccb24STony Lindgren 	},
8070f3ccb24STony Lindgren };
8080f3ccb24STony Lindgren 
8090f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
8100f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8110f3ccb24STony Lindgren };
8120f3ccb24STony Lindgren 
81324da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = {
8140f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8150f3ccb24STony Lindgren 	.class		= &dm814x_mdio_hwmod_class,
8160f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8170f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8180f3ccb24STony Lindgren };
8190f3ccb24STony Lindgren 
8200f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
8210f3ccb24STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8220f3ccb24STony Lindgren 	.slave		= &dm814x_cpgmac0_hwmod,
8230f3ccb24STony Lindgren 	.clk		= "cpsw_125mhz_gclk",
8240f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8250f3ccb24STony Lindgren };
8260f3ccb24STony Lindgren 
82724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
8280f3ccb24STony Lindgren 	.master		= &dm814x_cpgmac0_hwmod,
8290f3ccb24STony Lindgren 	.slave		= &dm814x_mdio_hwmod,
8300f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8310f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8320f3ccb24STony Lindgren };
8330f3ccb24STony Lindgren 
8344d38bd12STony Lindgren /* EMAC Ethernet */
8354d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
8364d38bd12STony Lindgren 	.rev_offs	= 0x0,
8374d38bd12STony Lindgren 	.sysc_offs	= 0x4,
8384d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
8394d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
8404d38bd12STony Lindgren };
8414d38bd12STony Lindgren 
8424d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
8434d38bd12STony Lindgren 	.name		= "emac",
8444d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8454d38bd12STony Lindgren };
8464d38bd12STony Lindgren 
8474d38bd12STony Lindgren /*
8484d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
8494d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
8504d38bd12STony Lindgren  */
8514d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
8524d38bd12STony Lindgren 	.name		= "emac0",
8534d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8544d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
855*29f5b34cSNeil Armstrong 	.flags		= HWMOD_NO_IDLEST,
8564d38bd12STony Lindgren };
8574d38bd12STony Lindgren 
8587e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
8597e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8604d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
8614d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
8624d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8634d38bd12STony Lindgren };
8644d38bd12STony Lindgren 
8657e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
8664d38bd12STony Lindgren 	.name		= "davinci_mdio",
8674d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8684d38bd12STony Lindgren };
8694d38bd12STony Lindgren 
87024da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
8714d38bd12STony Lindgren 	.name		= "davinci_mdio",
8727e1b11d1STony Lindgren 	.class		= &dm81xx_mdio_hwmod_class,
8734d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8744d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
8754d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8764d38bd12STony Lindgren 	/*
8774d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
8784d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
8794d38bd12STony Lindgren 	 */
8804d38bd12STony Lindgren 	.prcm		= {
8814d38bd12STony Lindgren 		.omap4 = {
8827e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
8834d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8844d38bd12STony Lindgren 		},
8854d38bd12STony Lindgren 	},
8864d38bd12STony Lindgren };
8874d38bd12STony Lindgren 
88824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
8897e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8907e1b11d1STony Lindgren 	.slave		= &dm81xx_emac0_mdio_hwmod,
8914d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8924d38bd12STony Lindgren };
8934d38bd12STony Lindgren 
8944d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
8954d38bd12STony Lindgren 	.name		= "emac1",
8964d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8974d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
8984d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8994d38bd12STony Lindgren 	.prcm		= {
9004d38bd12STony Lindgren 		.omap4 = {
9014d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
9024d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9034d38bd12STony Lindgren 		},
9044d38bd12STony Lindgren 	},
9054d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
9064d38bd12STony Lindgren };
9074d38bd12STony Lindgren 
9084d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
9097e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9104d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
9114d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
9124d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9134d38bd12STony Lindgren };
9144d38bd12STony Lindgren 
9154d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = {
9164d38bd12STony Lindgren 	.rev_offs	= 0x0,
9174d38bd12STony Lindgren 	.sysc_offs	= 0x110,
9184d38bd12STony Lindgren 	.syss_offs	= 0x114,
9194d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
9204d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
9214d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
9224d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
9234d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
9244d38bd12STony Lindgren };
9254d38bd12STony Lindgren 
9264d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mmc_class = {
9274d38bd12STony Lindgren 	.name = "mmc",
9284d38bd12STony Lindgren 	.sysc = &dm816x_mmc_sysc,
9294d38bd12STony Lindgren };
9304d38bd12STony Lindgren 
9314d38bd12STony Lindgren static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = {
9324d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
9334d38bd12STony Lindgren };
9344d38bd12STony Lindgren 
9354d38bd12STony Lindgren static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
9364d38bd12STony Lindgren 	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
9374d38bd12STony Lindgren };
9384d38bd12STony Lindgren 
9394d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
9404d38bd12STony Lindgren 	.name		= "mmc1",
9414d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9424d38bd12STony Lindgren 	.opt_clks	= dm816x_mmc1_opt_clks,
9434d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm816x_mmc1_opt_clks),
9444d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
9454d38bd12STony Lindgren 	.prcm		= {
9464d38bd12STony Lindgren 		.omap4 = {
9474d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
9484d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9494d38bd12STony Lindgren 		},
9504d38bd12STony Lindgren 	},
9514d38bd12STony Lindgren 	.dev_attr	= &mmc1_dev_attr,
9524d38bd12STony Lindgren 	.class		= &dm816x_mmc_class,
9534d38bd12STony Lindgren };
9544d38bd12STony Lindgren 
9554d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
9567e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
9574d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
9584d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
9594d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9604d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
9614d38bd12STony Lindgren };
9624d38bd12STony Lindgren 
9634d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
9644d38bd12STony Lindgren 	.rev_offs	= 0x0,
9654d38bd12STony Lindgren 	.sysc_offs	= 0x110,
9664d38bd12STony Lindgren 	.syss_offs	= 0x114,
9674d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
9684d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
9694d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
9704d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
9714d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
9724d38bd12STony Lindgren };
9734d38bd12STony Lindgren 
9744d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
9754d38bd12STony Lindgren 	.name = "mcspi",
9764d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
9774d38bd12STony Lindgren 	.rev = OMAP3_MCSPI_REV,
9784d38bd12STony Lindgren };
9794d38bd12STony Lindgren 
9804d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
9814d38bd12STony Lindgren 	.num_chipselect = 4,
9824d38bd12STony Lindgren };
9834d38bd12STony Lindgren 
9847e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = {
9854d38bd12STony Lindgren 	.name		= "mcspi1",
9864d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9874d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
9884d38bd12STony Lindgren 	.prcm		= {
9894d38bd12STony Lindgren 		.omap4 = {
9907e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
9914d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9924d38bd12STony Lindgren 		},
9934d38bd12STony Lindgren 	},
9944d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
9954d38bd12STony Lindgren 	.dev_attr	= &dm816x_mcspi1_dev_attr,
9964d38bd12STony Lindgren };
9974d38bd12STony Lindgren 
9987e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
9997e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10007e1b11d1STony Lindgren 	.slave		= &dm81xx_mcspi1_hwmod,
10014d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
10024d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10034d38bd12STony Lindgren };
10044d38bd12STony Lindgren 
10057e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
10064d38bd12STony Lindgren 	.rev_offs	= 0x000,
10074d38bd12STony Lindgren 	.sysc_offs	= 0x010,
10084d38bd12STony Lindgren 	.syss_offs	= 0x014,
10094d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
10104d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
10114d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
10124d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
10134d38bd12STony Lindgren };
10144d38bd12STony Lindgren 
10157e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
10164d38bd12STony Lindgren 	.name = "mailbox",
10177e1b11d1STony Lindgren 	.sysc = &dm81xx_mailbox_sysc,
10184d38bd12STony Lindgren };
10194d38bd12STony Lindgren 
10207e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = {
10214d38bd12STony Lindgren 	.name		= "mailbox",
10224d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10237e1b11d1STony Lindgren 	.class		= &dm81xx_mailbox_hwmod_class,
10244d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
10254d38bd12STony Lindgren 	.prcm		= {
10264d38bd12STony Lindgren 		.omap4 = {
10277e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
10284d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10294d38bd12STony Lindgren 		},
10304d38bd12STony Lindgren 	},
10314d38bd12STony Lindgren };
10324d38bd12STony Lindgren 
10337e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
10347e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10357e1b11d1STony Lindgren 	.slave		= &dm81xx_mailbox_hwmod,
10364d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10374d38bd12STony Lindgren };
10384d38bd12STony Lindgren 
10397e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
10404d38bd12STony Lindgren 	.name		= "tpcc",
10414d38bd12STony Lindgren };
10424d38bd12STony Lindgren 
104324da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = {
10444d38bd12STony Lindgren 	.name		= "tpcc",
10457e1b11d1STony Lindgren 	.class		= &dm81xx_tpcc_hwmod_class,
10464d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10474d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10484d38bd12STony Lindgren 	.prcm		= {
10494d38bd12STony Lindgren 		.omap4	= {
10507e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPCC_CLKCTRL,
10514d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10524d38bd12STony Lindgren 		},
10534d38bd12STony Lindgren 	},
10544d38bd12STony Lindgren };
10554d38bd12STony Lindgren 
105624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
10577e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
10587e1b11d1STony Lindgren 	.slave		= &dm81xx_tpcc_hwmod,
10594d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10604d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10614d38bd12STony Lindgren };
10624d38bd12STony Lindgren 
10637e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space[] = {
10644d38bd12STony Lindgren 	{
10654d38bd12STony Lindgren 		.pa_start	= 0x49800000,
10664d38bd12STony Lindgren 		.pa_end		= 0x49800000 + SZ_8K - 1,
10674d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
10684d38bd12STony Lindgren 	},
10694d38bd12STony Lindgren 	{ },
10704d38bd12STony Lindgren };
10714d38bd12STony Lindgren 
10727e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
10734d38bd12STony Lindgren 	.name		= "tptc0",
10744d38bd12STony Lindgren };
10754d38bd12STony Lindgren 
107624da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = {
10774d38bd12STony Lindgren 	.name		= "tptc0",
10787e1b11d1STony Lindgren 	.class		= &dm81xx_tptc0_hwmod_class,
10794d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10804d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10814d38bd12STony Lindgren 	.prcm		= {
10824d38bd12STony Lindgren 		.omap4	= {
10837e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC0_CLKCTRL,
10844d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10854d38bd12STony Lindgren 		},
10864d38bd12STony Lindgren 	},
10874d38bd12STony Lindgren };
10884d38bd12STony Lindgren 
108924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
10907e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
10917e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc0_hwmod,
10924d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10937e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
10944d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10954d38bd12STony Lindgren };
10964d38bd12STony Lindgren 
109724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
10987e1b11d1STony Lindgren 	.master		= &dm81xx_tptc0_hwmod,
10997e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
11004d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11017e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
11024d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11034d38bd12STony Lindgren };
11044d38bd12STony Lindgren 
11057e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space[] = {
11064d38bd12STony Lindgren 	{
11074d38bd12STony Lindgren 		.pa_start	= 0x49900000,
11084d38bd12STony Lindgren 		.pa_end		= 0x49900000 + SZ_8K - 1,
11094d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
11104d38bd12STony Lindgren 	},
11114d38bd12STony Lindgren 	{ },
11124d38bd12STony Lindgren };
11134d38bd12STony Lindgren 
11147e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
11154d38bd12STony Lindgren 	.name		= "tptc1",
11164d38bd12STony Lindgren };
11174d38bd12STony Lindgren 
111824da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = {
11194d38bd12STony Lindgren 	.name		= "tptc1",
11207e1b11d1STony Lindgren 	.class		= &dm81xx_tptc1_hwmod_class,
11214d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11224d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
11234d38bd12STony Lindgren 	.prcm		= {
11244d38bd12STony Lindgren 		.omap4	= {
11257e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC1_CLKCTRL,
11264d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
11274d38bd12STony Lindgren 		},
11284d38bd12STony Lindgren 	},
11294d38bd12STony Lindgren };
11304d38bd12STony Lindgren 
113124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
11327e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
11337e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc1_hwmod,
11344d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11357e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
11364d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11374d38bd12STony Lindgren };
11384d38bd12STony Lindgren 
113924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
11407e1b11d1STony Lindgren 	.master		= &dm81xx_tptc1_hwmod,
11417e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
11424d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11437e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
11444d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11454d38bd12STony Lindgren };
11464d38bd12STony Lindgren 
11477e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space[] = {
11484d38bd12STony Lindgren 	{
11494d38bd12STony Lindgren 		.pa_start	= 0x49a00000,
11504d38bd12STony Lindgren 		.pa_end		= 0x49a00000 + SZ_8K - 1,
11514d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
11524d38bd12STony Lindgren 	},
11534d38bd12STony Lindgren 	{ },
11544d38bd12STony Lindgren };
11554d38bd12STony Lindgren 
11567e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
11574d38bd12STony Lindgren 	.name		= "tptc2",
11584d38bd12STony Lindgren };
11594d38bd12STony Lindgren 
116024da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = {
11614d38bd12STony Lindgren 	.name		= "tptc2",
11627e1b11d1STony Lindgren 	.class		= &dm81xx_tptc2_hwmod_class,
11634d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11644d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
11654d38bd12STony Lindgren 	.prcm		= {
11664d38bd12STony Lindgren 		.omap4	= {
11677e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC2_CLKCTRL,
11684d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
11694d38bd12STony Lindgren 		},
11704d38bd12STony Lindgren 	},
11714d38bd12STony Lindgren };
11724d38bd12STony Lindgren 
117324da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
11747e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
11757e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc2_hwmod,
11764d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11777e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
11784d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11794d38bd12STony Lindgren };
11804d38bd12STony Lindgren 
118124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
11827e1b11d1STony Lindgren 	.master		= &dm81xx_tptc2_hwmod,
11837e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
11844d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11857e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
11864d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11874d38bd12STony Lindgren };
11884d38bd12STony Lindgren 
11897e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space[] = {
11904d38bd12STony Lindgren 	{
11914d38bd12STony Lindgren 		.pa_start	= 0x49b00000,
11924d38bd12STony Lindgren 		.pa_end		= 0x49b00000 + SZ_8K - 1,
11934d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
11944d38bd12STony Lindgren 	},
11954d38bd12STony Lindgren 	{ },
11964d38bd12STony Lindgren };
11974d38bd12STony Lindgren 
11987e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
11994d38bd12STony Lindgren 	.name		= "tptc3",
12004d38bd12STony Lindgren };
12014d38bd12STony Lindgren 
120224da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = {
12034d38bd12STony Lindgren 	.name		= "tptc3",
12047e1b11d1STony Lindgren 	.class		= &dm81xx_tptc3_hwmod_class,
12054d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12064d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12074d38bd12STony Lindgren 	.prcm		= {
12084d38bd12STony Lindgren 		.omap4	= {
12097e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC3_CLKCTRL,
12104d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12114d38bd12STony Lindgren 		},
12124d38bd12STony Lindgren 	},
12134d38bd12STony Lindgren };
12144d38bd12STony Lindgren 
121524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
12167e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12177e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc3_hwmod,
12184d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12197e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
12204d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12214d38bd12STony Lindgren };
12224d38bd12STony Lindgren 
122324da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
12247e1b11d1STony Lindgren 	.master		= &dm81xx_tptc3_hwmod,
12257e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12264d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12277e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
12284d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12294d38bd12STony Lindgren };
12304d38bd12STony Lindgren 
12310f3ccb24STony Lindgren /*
12320f3ccb24STony Lindgren  * REVISIT: Test and enable the following once clocks work:
12330f3ccb24STony Lindgren  * dm81xx_l4_ls__gpio1
12340f3ccb24STony Lindgren  * dm81xx_l4_ls__gpio2
12350f3ccb24STony Lindgren  * dm81xx_l4_ls__mailbox
12360f3ccb24STony Lindgren  * dm81xx_alwon_l3_slow__gpmc
12370f3ccb24STony Lindgren  * dm81xx_default_l3_slow__usbss
12380f3ccb24STony Lindgren  *
12390f3ccb24STony Lindgren  * Also note that some devices share a single clkctrl_offs..
12400f3ccb24STony Lindgren  * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
12410f3ccb24STony Lindgren  */
12420f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
12430f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_slow,
12440f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_med,
12450f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
12460f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
12470f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart1,
12480f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart2,
12490f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart3,
12500f3ccb24STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
12510f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c1,
12520f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c2,
12530f3ccb24STony Lindgren 	&dm81xx_l4_ls__elm,
12540f3ccb24STony Lindgren 	&dm81xx_l4_ls__mcspi1,
12550f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
12560f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
12570f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
12580f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
12590f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
12600f3ccb24STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
12610f3ccb24STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
12620f3ccb24STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
12630f3ccb24STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
12640f3ccb24STony Lindgren 	&dm814x_l4_ls__timer1,
12650f3ccb24STony Lindgren 	&dm814x_l4_ls__timer2,
12660f3ccb24STony Lindgren 	&dm814x_l4_hs__cpgmac0,
12670f3ccb24STony Lindgren 	&dm814x_cpgmac0__mdio,
12680f3ccb24STony Lindgren 	NULL,
12690f3ccb24STony Lindgren };
12700f3ccb24STony Lindgren 
12710f3ccb24STony Lindgren int __init dm814x_hwmod_init(void)
12720f3ccb24STony Lindgren {
12730f3ccb24STony Lindgren 	omap_hwmod_init();
12740f3ccb24STony Lindgren 	return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
12750f3ccb24STony Lindgren }
12760f3ccb24STony Lindgren 
12774d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
12784d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
12794d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
12807e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
12817e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
12827e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart1,
12837e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart2,
12847e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart3,
12857e1b11d1STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
12867e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c1,
12877e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c2,
12884d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
12894d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
12904d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
12914d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
12924d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
12934d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
12944d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
12954d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
12964d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
12974d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
12984d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
12997e1b11d1STony Lindgren 	&dm81xx_l4_ls__mcspi1,
13007e1b11d1STony Lindgren 	&dm81xx_l4_ls__mailbox,
13017e1b11d1STony Lindgren 	&dm81xx_l4_hs__emac0,
13027e1b11d1STony Lindgren 	&dm81xx_emac0__mdio,
13034d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
13047e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
13057e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
13067e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
13077e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
13087e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
13097e1b11d1STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
13107e1b11d1STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
13117e1b11d1STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
13127e1b11d1STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
13134d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
13144d38bd12STony Lindgren 	&dm81xx_default_l3_slow__usbss,
13154d38bd12STony Lindgren 	NULL,
13164d38bd12STony Lindgren };
13174d38bd12STony Lindgren 
13180f3ccb24STony Lindgren int __init dm816x_hwmod_init(void)
13194d38bd12STony Lindgren {
13204d38bd12STony Lindgren 	omap_hwmod_init();
13214d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
13224d38bd12STony Lindgren }
1323