xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision 4f5395f0d1a5b7c8921331ef81081da00302a37c)
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  */
107f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_OFFSET	0x500
108f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_USB_CLKCTRL	(0x558 - DM81XX_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,
14729f5b34cSNeil 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,
15929f5b34cSNeil 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,
432*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
4334d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4344d38bd12STony Lindgren };
4354d38bd12STony Lindgren 
4364d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
4374d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4384d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4394d38bd12STony Lindgren 	.syss_offs	= 0x0114,
4404d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4414d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4424d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4434d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4444d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
4454d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4464d38bd12STony Lindgren };
4474d38bd12STony Lindgren 
4484d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
4494d38bd12STony Lindgren 	.name	= "gpio",
4504d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4514d38bd12STony Lindgren 	.rev	= 2,
4524d38bd12STony Lindgren };
4534d38bd12STony Lindgren 
4544d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = {
4554d38bd12STony Lindgren 	.bank_width	= 32,
4564d38bd12STony Lindgren 	.dbck_flag	= true,
4574d38bd12STony Lindgren };
4584d38bd12STony Lindgren 
4594d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4604d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4614d38bd12STony Lindgren };
4624d38bd12STony Lindgren 
4634d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4644d38bd12STony Lindgren 	.name		= "gpio1",
4654d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4664d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4674d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4684d38bd12STony Lindgren 	.prcm = {
4694d38bd12STony Lindgren 		.omap4 = {
4707e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
4714d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4724d38bd12STony Lindgren 		},
4734d38bd12STony Lindgren 	},
4744d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
4754d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
4764d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4774d38bd12STony Lindgren };
4784d38bd12STony Lindgren 
4794d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
4807e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4814d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
482*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
4834d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4844d38bd12STony Lindgren };
4854d38bd12STony Lindgren 
4864d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
4874d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4884d38bd12STony Lindgren };
4894d38bd12STony Lindgren 
4904d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
4914d38bd12STony Lindgren 	.name		= "gpio2",
4924d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4934d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4944d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4954d38bd12STony Lindgren 	.prcm = {
4964d38bd12STony Lindgren 		.omap4 = {
4977e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
4984d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4994d38bd12STony Lindgren 		},
5004d38bd12STony Lindgren 	},
5014d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
5024d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
5034d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
5044d38bd12STony Lindgren };
5054d38bd12STony Lindgren 
5064d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
5077e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5084d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
509*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
5104d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5114d38bd12STony Lindgren };
5124d38bd12STony Lindgren 
5134d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
5144d38bd12STony Lindgren 	.rev_offs	= 0x0,
5154d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5164d38bd12STony Lindgren 	.syss_offs	= 0x14,
5174d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
5184d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
5194d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
5204d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
5214d38bd12STony Lindgren };
5224d38bd12STony Lindgren 
5234d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
5244d38bd12STony Lindgren 	.name	= "gpmc",
5254d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
5264d38bd12STony Lindgren };
5274d38bd12STony Lindgren 
5284d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
5294d38bd12STony Lindgren 	.name		= "gpmc",
5304d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5314d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
5324d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
53363aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
53463aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
5354d38bd12STony Lindgren 	.prcm = {
5364d38bd12STony Lindgren 		.omap4 = {
5377e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
5384d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5394d38bd12STony Lindgren 		},
5404d38bd12STony Lindgren 	},
5414d38bd12STony Lindgren };
5424d38bd12STony Lindgren 
543f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
5447e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_slow_hwmod,
5454d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
5464d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5474d38bd12STony Lindgren };
5484d38bd12STony Lindgren 
5494d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
5504d38bd12STony Lindgren 	.rev_offs	= 0x0,
5514d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5524d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5534d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5544d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5554d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5564d38bd12STony Lindgren };
5574d38bd12STony Lindgren 
5584d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5594d38bd12STony Lindgren 	.name = "usbotg",
5604d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5614d38bd12STony Lindgren };
5624d38bd12STony Lindgren 
563f53850b5STony Lindgren static struct omap_hwmod dm814x_usbss_hwmod = {
5644d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5654d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
566f53850b5STony Lindgren 	.main_clk	= "pll260dcoclkldo",	/* 481c5260.adpll.dcoclkldo */
5674d38bd12STony Lindgren 	.prcm		= {
5684d38bd12STony Lindgren 		.omap4 = {
569f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
5704d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5714d38bd12STony Lindgren 		},
5724d38bd12STony Lindgren 	},
5734d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
5744d38bd12STony Lindgren };
5754d38bd12STony Lindgren 
576f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = {
5777e1b11d1STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
578f53850b5STony Lindgren 	.slave		= &dm814x_usbss_hwmod,
579f53850b5STony Lindgren 	.clk		= "sysclk6_ck",
580f53850b5STony Lindgren 	.user		= OCP_USER_MPU,
581f53850b5STony Lindgren };
582f53850b5STony Lindgren 
583f53850b5STony Lindgren static struct omap_hwmod dm816x_usbss_hwmod = {
584f53850b5STony Lindgren 	.name		= "usb_otg_hs",
585f53850b5STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
586f53850b5STony Lindgren 	.main_clk	= "sysclk6_ck",
587f53850b5STony Lindgren 	.prcm		= {
588f53850b5STony Lindgren 		.omap4 = {
589f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
590f53850b5STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
591f53850b5STony Lindgren 		},
592f53850b5STony Lindgren 	},
593f53850b5STony Lindgren 	.class		= &dm81xx_usbotg_class,
594f53850b5STony Lindgren };
595f53850b5STony Lindgren 
596f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = {
597f53850b5STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
598f53850b5STony Lindgren 	.slave		= &dm816x_usbss_hwmod,
5994d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6004d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6014d38bd12STony Lindgren };
6024d38bd12STony Lindgren 
6034d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
6044d38bd12STony Lindgren 	.rev_offs	= 0x0000,
6054d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
6064d38bd12STony Lindgren 	.syss_offs	= 0x0014,
6074d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
6084d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
6094d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
6104d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
6114d38bd12STony Lindgren };
6124d38bd12STony Lindgren 
6134d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
6144d38bd12STony Lindgren 	.name = "timer",
6154d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
6164d38bd12STony Lindgren };
6174d38bd12STony Lindgren 
6184d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
6194d38bd12STony Lindgren 	.timer_capability	= OMAP_TIMER_ALWON,
6204d38bd12STony Lindgren };
6214d38bd12STony Lindgren 
6220f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = {
6230f3ccb24STony Lindgren 	.name		= "timer1",
6240f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
625cb4db038STony Lindgren 	.main_clk	= "timer1_fck",
6260f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6270f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6280f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6290f3ccb24STony Lindgren };
6300f3ccb24STony Lindgren 
6310f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
6320f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6330f3ccb24STony Lindgren 	.slave		= &dm814x_timer1_hwmod,
634*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
6350f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6360f3ccb24STony Lindgren };
6370f3ccb24STony Lindgren 
6384d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
6394d38bd12STony Lindgren 	.name		= "timer1",
6404d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6414d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
6424d38bd12STony Lindgren 	.prcm		= {
6434d38bd12STony Lindgren 		.omap4 = {
6444d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
6454d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6464d38bd12STony Lindgren 		},
6474d38bd12STony Lindgren 	},
6484d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6494d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6504d38bd12STony Lindgren };
6514d38bd12STony Lindgren 
6524d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
6537e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6544d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
6554d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6564d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6574d38bd12STony Lindgren };
6584d38bd12STony Lindgren 
6590f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = {
6600f3ccb24STony Lindgren 	.name		= "timer2",
6610f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
662cb4db038STony Lindgren 	.main_clk	= "timer2_fck",
6630f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6640f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6650f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6660f3ccb24STony Lindgren };
6670f3ccb24STony Lindgren 
6680f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
6690f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6700f3ccb24STony Lindgren 	.slave		= &dm814x_timer2_hwmod,
671*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
6720f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6730f3ccb24STony Lindgren };
6740f3ccb24STony Lindgren 
6754d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
6764d38bd12STony Lindgren 	.name		= "timer2",
6774d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6784d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
6794d38bd12STony Lindgren 	.prcm		= {
6804d38bd12STony Lindgren 		.omap4 = {
6814d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
6824d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6834d38bd12STony Lindgren 		},
6844d38bd12STony Lindgren 	},
6854d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6864d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6874d38bd12STony Lindgren };
6884d38bd12STony Lindgren 
6894d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
6907e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6914d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
6924d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6934d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6944d38bd12STony Lindgren };
6954d38bd12STony Lindgren 
6964d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
6974d38bd12STony Lindgren 	.name		= "timer3",
6984d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6994d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
7004d38bd12STony Lindgren 	.prcm		= {
7014d38bd12STony Lindgren 		.omap4 = {
7024d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
7034d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7044d38bd12STony Lindgren 		},
7054d38bd12STony Lindgren 	},
7064d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7074d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7084d38bd12STony Lindgren };
7094d38bd12STony Lindgren 
7104d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
7117e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7124d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
7134d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7144d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7154d38bd12STony Lindgren };
7164d38bd12STony Lindgren 
7174d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
7184d38bd12STony Lindgren 	.name		= "timer4",
7194d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7204d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
7214d38bd12STony Lindgren 	.prcm		= {
7224d38bd12STony Lindgren 		.omap4 = {
7234d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
7244d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7254d38bd12STony Lindgren 		},
7264d38bd12STony Lindgren 	},
7274d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7284d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7294d38bd12STony Lindgren };
7304d38bd12STony Lindgren 
7314d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
7327e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7334d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
7344d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7354d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7364d38bd12STony Lindgren };
7374d38bd12STony Lindgren 
7384d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
7394d38bd12STony Lindgren 	.name		= "timer5",
7404d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7414d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
7424d38bd12STony Lindgren 	.prcm		= {
7434d38bd12STony Lindgren 		.omap4 = {
7444d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
7454d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7464d38bd12STony Lindgren 		},
7474d38bd12STony Lindgren 	},
7484d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7494d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7504d38bd12STony Lindgren };
7514d38bd12STony Lindgren 
7524d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
7537e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7544d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
7554d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7564d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7574d38bd12STony Lindgren };
7584d38bd12STony Lindgren 
7594d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
7604d38bd12STony Lindgren 	.name		= "timer6",
7614d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7624d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
7634d38bd12STony Lindgren 	.prcm		= {
7644d38bd12STony Lindgren 		.omap4 = {
7654d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
7664d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7674d38bd12STony Lindgren 		},
7684d38bd12STony Lindgren 	},
7694d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7704d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7714d38bd12STony Lindgren };
7724d38bd12STony Lindgren 
7734d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
7747e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7754d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
7764d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7774d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7784d38bd12STony Lindgren };
7794d38bd12STony Lindgren 
7804d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
7814d38bd12STony Lindgren 	.name		= "timer7",
7824d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7834d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
7844d38bd12STony Lindgren 	.prcm		= {
7854d38bd12STony Lindgren 		.omap4 = {
7864d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
7874d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7884d38bd12STony Lindgren 		},
7894d38bd12STony Lindgren 	},
7904d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7914d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7924d38bd12STony Lindgren };
7934d38bd12STony Lindgren 
7944d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
7957e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7964d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
7974d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7984d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7994d38bd12STony Lindgren };
8004d38bd12STony Lindgren 
8010f3ccb24STony Lindgren /* CPSW on dm814x */
8020f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
8030f3ccb24STony Lindgren 	.rev_offs	= 0x0,
8040f3ccb24STony Lindgren 	.sysc_offs	= 0x8,
8050f3ccb24STony Lindgren 	.syss_offs	= 0x4,
8060f3ccb24STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
8070f3ccb24STony Lindgren 			  SYSS_HAS_RESET_STATUS,
8080f3ccb24STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
8090f3ccb24STony Lindgren 			  MSTANDBY_NO,
8100f3ccb24STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type3,
8110f3ccb24STony Lindgren };
8120f3ccb24STony Lindgren 
8130f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
8140f3ccb24STony Lindgren 	.name		= "cpgmac0",
8150f3ccb24STony Lindgren 	.sysc		= &dm814x_cpgmac_sysc,
8160f3ccb24STony Lindgren };
8170f3ccb24STony Lindgren 
81824da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = {
8190f3ccb24STony Lindgren 	.name		= "cpgmac0",
8200f3ccb24STony Lindgren 	.class		= &dm814x_cpgmac0_hwmod_class,
8210f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8220f3ccb24STony Lindgren 	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
8230f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8240f3ccb24STony Lindgren 	.prcm		= {
8250f3ccb24STony Lindgren 		.omap4	= {
8260f3ccb24STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
8270f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8280f3ccb24STony Lindgren 		},
8290f3ccb24STony Lindgren 	},
8300f3ccb24STony Lindgren };
8310f3ccb24STony Lindgren 
8320f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
8330f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8340f3ccb24STony Lindgren };
8350f3ccb24STony Lindgren 
83624da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = {
8370f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8380f3ccb24STony Lindgren 	.class		= &dm814x_mdio_hwmod_class,
8390f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8400f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8410f3ccb24STony Lindgren };
8420f3ccb24STony Lindgren 
8430f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
8440f3ccb24STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8450f3ccb24STony Lindgren 	.slave		= &dm814x_cpgmac0_hwmod,
8460f3ccb24STony Lindgren 	.clk		= "cpsw_125mhz_gclk",
8470f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8480f3ccb24STony Lindgren };
8490f3ccb24STony Lindgren 
85024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
8510f3ccb24STony Lindgren 	.master		= &dm814x_cpgmac0_hwmod,
8520f3ccb24STony Lindgren 	.slave		= &dm814x_mdio_hwmod,
8530f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8540f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8550f3ccb24STony Lindgren };
8560f3ccb24STony Lindgren 
8574d38bd12STony Lindgren /* EMAC Ethernet */
8584d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
8594d38bd12STony Lindgren 	.rev_offs	= 0x0,
8604d38bd12STony Lindgren 	.sysc_offs	= 0x4,
8614d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
8624d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
8634d38bd12STony Lindgren };
8644d38bd12STony Lindgren 
8654d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
8664d38bd12STony Lindgren 	.name		= "emac",
8674d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8684d38bd12STony Lindgren };
8694d38bd12STony Lindgren 
8704d38bd12STony Lindgren /*
8714d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
8724d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
8734d38bd12STony Lindgren  */
8744d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
8754d38bd12STony Lindgren 	.name		= "emac0",
8764d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8774d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
87829f5b34cSNeil Armstrong 	.flags		= HWMOD_NO_IDLEST,
8794d38bd12STony Lindgren };
8804d38bd12STony Lindgren 
8817e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
8827e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8834d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
8844d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
8854d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8864d38bd12STony Lindgren };
8874d38bd12STony Lindgren 
8887e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
8894d38bd12STony Lindgren 	.name		= "davinci_mdio",
8904d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8914d38bd12STony Lindgren };
8924d38bd12STony Lindgren 
89324da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
8944d38bd12STony Lindgren 	.name		= "davinci_mdio",
8957e1b11d1STony Lindgren 	.class		= &dm81xx_mdio_hwmod_class,
8964d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8974d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
8984d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8994d38bd12STony Lindgren 	/*
9004d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
9014d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
9024d38bd12STony Lindgren 	 */
9034d38bd12STony Lindgren 	.prcm		= {
9044d38bd12STony Lindgren 		.omap4 = {
9057e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
9064d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9074d38bd12STony Lindgren 		},
9084d38bd12STony Lindgren 	},
9094d38bd12STony Lindgren };
9104d38bd12STony Lindgren 
91124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
9127e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9137e1b11d1STony Lindgren 	.slave		= &dm81xx_emac0_mdio_hwmod,
9144d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9154d38bd12STony Lindgren };
9164d38bd12STony Lindgren 
9174d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
9184d38bd12STony Lindgren 	.name		= "emac1",
9194d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
9204d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
9214d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
9224d38bd12STony Lindgren 	.prcm		= {
9234d38bd12STony Lindgren 		.omap4 = {
9244d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
9254d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9264d38bd12STony Lindgren 		},
9274d38bd12STony Lindgren 	},
9284d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
9294d38bd12STony Lindgren };
9304d38bd12STony Lindgren 
9314d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
9327e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9334d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
9344d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
9354d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9364d38bd12STony Lindgren };
9374d38bd12STony Lindgren 
938c757fda8STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = {
9394d38bd12STony Lindgren 	.rev_offs	= 0x0,
9404d38bd12STony Lindgren 	.sysc_offs	= 0x110,
9414d38bd12STony Lindgren 	.syss_offs	= 0x114,
9424d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
9434d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
9444d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
9454d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
9464d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
9474d38bd12STony Lindgren };
9484d38bd12STony Lindgren 
949c757fda8STony Lindgren static struct omap_hwmod_class dm81xx_mmc_class = {
9504d38bd12STony Lindgren 	.name = "mmc",
951c757fda8STony Lindgren 	.sysc = &dm81xx_mmc_sysc,
9524d38bd12STony Lindgren };
9534d38bd12STony Lindgren 
954c757fda8STony Lindgren static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = {
9554d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
9564d38bd12STony Lindgren };
9574d38bd12STony Lindgren 
958c757fda8STony Lindgren static struct omap_hsmmc_dev_attr mmc_dev_attr = {
959c757fda8STony Lindgren };
960c757fda8STony Lindgren 
961c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc1_hwmod = {
962c757fda8STony Lindgren 	.name		= "mmc1",
963c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
964c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
965c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
966c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
967c757fda8STony Lindgren 	.prcm		= {
968c757fda8STony Lindgren 		.omap4 = {
969c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL,
970c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
971c757fda8STony Lindgren 		},
972c757fda8STony Lindgren 	},
973c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
974c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
975c757fda8STony Lindgren };
976c757fda8STony Lindgren 
977c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = {
978c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
979c757fda8STony Lindgren 	.slave		= &dm814x_mmc1_hwmod,
980c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
981c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
982c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
983c757fda8STony Lindgren };
984c757fda8STony Lindgren 
985c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc2_hwmod = {
986c757fda8STony Lindgren 	.name		= "mmc2",
987c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
988c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
989c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
990c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
991c757fda8STony Lindgren 	.prcm		= {
992c757fda8STony Lindgren 		.omap4 = {
993c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL,
994c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
995c757fda8STony Lindgren 		},
996c757fda8STony Lindgren 	},
997c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
998c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
999c757fda8STony Lindgren };
1000c757fda8STony Lindgren 
1001c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = {
1002c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
1003c757fda8STony Lindgren 	.slave		= &dm814x_mmc2_hwmod,
1004c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
1005c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
1006c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
1007c757fda8STony Lindgren };
1008c757fda8STony Lindgren 
1009c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc3_hwmod = {
1010c757fda8STony Lindgren 	.name		= "mmc3",
1011c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1012c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1013c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
1014c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
1015c757fda8STony Lindgren 	.prcm		= {
1016c757fda8STony Lindgren 		.omap4 = {
1017c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL,
1018c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1019c757fda8STony Lindgren 		},
1020c757fda8STony Lindgren 	},
1021c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1022c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
1023c757fda8STony Lindgren };
1024c757fda8STony Lindgren 
1025c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = {
1026c757fda8STony Lindgren 	.master		= &dm81xx_alwon_l3_med_hwmod,
1027c757fda8STony Lindgren 	.slave		= &dm814x_mmc3_hwmod,
1028c757fda8STony Lindgren 	.clk		= "sysclk4_ck",
1029c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
10304d38bd12STony Lindgren };
10314d38bd12STony Lindgren 
10324d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
10334d38bd12STony Lindgren 	.name		= "mmc1",
10344d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1035c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1036c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
10374d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
10384d38bd12STony Lindgren 	.prcm		= {
10394d38bd12STony Lindgren 		.omap4 = {
10404d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
10414d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10424d38bd12STony Lindgren 		},
10434d38bd12STony Lindgren 	},
1044c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1045c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
10464d38bd12STony Lindgren };
10474d38bd12STony Lindgren 
10484d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
10497e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10504d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
10514d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
10524d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10534d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
10544d38bd12STony Lindgren };
10554d38bd12STony Lindgren 
10564d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
10574d38bd12STony Lindgren 	.rev_offs	= 0x0,
10584d38bd12STony Lindgren 	.sysc_offs	= 0x110,
10594d38bd12STony Lindgren 	.syss_offs	= 0x114,
10604d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
10614d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
10624d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
10634d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
10644d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
10654d38bd12STony Lindgren };
10664d38bd12STony Lindgren 
10674d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
10684d38bd12STony Lindgren 	.name = "mcspi",
10694d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
10704d38bd12STony Lindgren 	.rev = OMAP3_MCSPI_REV,
10714d38bd12STony Lindgren };
10724d38bd12STony Lindgren 
10734d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
10744d38bd12STony Lindgren 	.num_chipselect = 4,
10754d38bd12STony Lindgren };
10764d38bd12STony Lindgren 
10777e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = {
10784d38bd12STony Lindgren 	.name		= "mcspi1",
10794d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10804d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
10814d38bd12STony Lindgren 	.prcm		= {
10824d38bd12STony Lindgren 		.omap4 = {
10837e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
10844d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10854d38bd12STony Lindgren 		},
10864d38bd12STony Lindgren 	},
10874d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
10884d38bd12STony Lindgren 	.dev_attr	= &dm816x_mcspi1_dev_attr,
10894d38bd12STony Lindgren };
10904d38bd12STony Lindgren 
10917e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
10927e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10937e1b11d1STony Lindgren 	.slave		= &dm81xx_mcspi1_hwmod,
10944d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
10954d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10964d38bd12STony Lindgren };
10974d38bd12STony Lindgren 
10987e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
10994d38bd12STony Lindgren 	.rev_offs	= 0x000,
11004d38bd12STony Lindgren 	.sysc_offs	= 0x010,
11014d38bd12STony Lindgren 	.syss_offs	= 0x014,
11024d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11034d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
11044d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11054d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
11064d38bd12STony Lindgren };
11074d38bd12STony Lindgren 
11087e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
11094d38bd12STony Lindgren 	.name = "mailbox",
11107e1b11d1STony Lindgren 	.sysc = &dm81xx_mailbox_sysc,
11114d38bd12STony Lindgren };
11124d38bd12STony Lindgren 
11137e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = {
11144d38bd12STony Lindgren 	.name		= "mailbox",
11154d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11167e1b11d1STony Lindgren 	.class		= &dm81xx_mailbox_hwmod_class,
11174d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
11184d38bd12STony Lindgren 	.prcm		= {
11194d38bd12STony Lindgren 		.omap4 = {
11207e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
11214d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
11224d38bd12STony Lindgren 		},
11234d38bd12STony Lindgren 	},
11244d38bd12STony Lindgren };
11254d38bd12STony Lindgren 
11267e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
11277e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
11287e1b11d1STony Lindgren 	.slave		= &dm81xx_mailbox_hwmod,
1129*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
11304d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11314d38bd12STony Lindgren };
11324d38bd12STony Lindgren 
11331539569bSNeil Armstrong static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
11341539569bSNeil Armstrong 	.rev_offs	= 0x000,
11351539569bSNeil Armstrong 	.sysc_offs	= 0x010,
11361539569bSNeil Armstrong 	.syss_offs	= 0x014,
11371539569bSNeil Armstrong 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11381539569bSNeil Armstrong 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
11391539569bSNeil Armstrong 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11401539569bSNeil Armstrong 	.sysc_fields	= &omap_hwmod_sysc_type1,
11411539569bSNeil Armstrong };
11421539569bSNeil Armstrong 
11431539569bSNeil Armstrong static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
11441539569bSNeil Armstrong 	.name = "spinbox",
11451539569bSNeil Armstrong 	.sysc = &dm81xx_spinbox_sysc,
11461539569bSNeil Armstrong };
11471539569bSNeil Armstrong 
11481539569bSNeil Armstrong static struct omap_hwmod dm81xx_spinbox_hwmod = {
11491539569bSNeil Armstrong 	.name		= "spinbox",
11501539569bSNeil Armstrong 	.clkdm_name	= "alwon_l3s_clkdm",
11511539569bSNeil Armstrong 	.class		= &dm81xx_spinbox_hwmod_class,
11521539569bSNeil Armstrong 	.main_clk	= "sysclk6_ck",
11531539569bSNeil Armstrong 	.prcm		= {
11541539569bSNeil Armstrong 		.omap4 = {
11551539569bSNeil Armstrong 			.clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
11561539569bSNeil Armstrong 			.modulemode = MODULEMODE_SWCTRL,
11571539569bSNeil Armstrong 		},
11581539569bSNeil Armstrong 	},
11591539569bSNeil Armstrong };
11601539569bSNeil Armstrong 
11611539569bSNeil Armstrong static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
11621539569bSNeil Armstrong 	.master		= &dm81xx_l4_ls_hwmod,
11631539569bSNeil Armstrong 	.slave		= &dm81xx_spinbox_hwmod,
1164*4f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
11651539569bSNeil Armstrong 	.user		= OCP_USER_MPU,
11661539569bSNeil Armstrong };
11671539569bSNeil Armstrong 
11687e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
11694d38bd12STony Lindgren 	.name		= "tpcc",
11704d38bd12STony Lindgren };
11714d38bd12STony Lindgren 
117224da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = {
11734d38bd12STony Lindgren 	.name		= "tpcc",
11747e1b11d1STony Lindgren 	.class		= &dm81xx_tpcc_hwmod_class,
11754d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11764d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
11774d38bd12STony Lindgren 	.prcm		= {
11784d38bd12STony Lindgren 		.omap4	= {
11797e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPCC_CLKCTRL,
11804d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
11814d38bd12STony Lindgren 		},
11824d38bd12STony Lindgren 	},
11834d38bd12STony Lindgren };
11844d38bd12STony Lindgren 
118524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
11867e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
11877e1b11d1STony Lindgren 	.slave		= &dm81xx_tpcc_hwmod,
11884d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11894d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11904d38bd12STony Lindgren };
11914d38bd12STony Lindgren 
11927e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space[] = {
11934d38bd12STony Lindgren 	{
11944d38bd12STony Lindgren 		.pa_start	= 0x49800000,
11954d38bd12STony Lindgren 		.pa_end		= 0x49800000 + SZ_8K - 1,
11964d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
11974d38bd12STony Lindgren 	},
11984d38bd12STony Lindgren 	{ },
11994d38bd12STony Lindgren };
12004d38bd12STony Lindgren 
12017e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
12024d38bd12STony Lindgren 	.name		= "tptc0",
12034d38bd12STony Lindgren };
12044d38bd12STony Lindgren 
120524da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = {
12064d38bd12STony Lindgren 	.name		= "tptc0",
12077e1b11d1STony Lindgren 	.class		= &dm81xx_tptc0_hwmod_class,
12084d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12094d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12104d38bd12STony Lindgren 	.prcm		= {
12114d38bd12STony Lindgren 		.omap4	= {
12127e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC0_CLKCTRL,
12134d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12144d38bd12STony Lindgren 		},
12154d38bd12STony Lindgren 	},
12164d38bd12STony Lindgren };
12174d38bd12STony Lindgren 
121824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
12197e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12207e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc0_hwmod,
12214d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12227e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
12234d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12244d38bd12STony Lindgren };
12254d38bd12STony Lindgren 
122624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
12277e1b11d1STony Lindgren 	.master		= &dm81xx_tptc0_hwmod,
12287e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12294d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12307e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
12314d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12324d38bd12STony Lindgren };
12334d38bd12STony Lindgren 
12347e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space[] = {
12354d38bd12STony Lindgren 	{
12364d38bd12STony Lindgren 		.pa_start	= 0x49900000,
12374d38bd12STony Lindgren 		.pa_end		= 0x49900000 + SZ_8K - 1,
12384d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
12394d38bd12STony Lindgren 	},
12404d38bd12STony Lindgren 	{ },
12414d38bd12STony Lindgren };
12424d38bd12STony Lindgren 
12437e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
12444d38bd12STony Lindgren 	.name		= "tptc1",
12454d38bd12STony Lindgren };
12464d38bd12STony Lindgren 
124724da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = {
12484d38bd12STony Lindgren 	.name		= "tptc1",
12497e1b11d1STony Lindgren 	.class		= &dm81xx_tptc1_hwmod_class,
12504d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12514d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12524d38bd12STony Lindgren 	.prcm		= {
12534d38bd12STony Lindgren 		.omap4	= {
12547e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC1_CLKCTRL,
12554d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12564d38bd12STony Lindgren 		},
12574d38bd12STony Lindgren 	},
12584d38bd12STony Lindgren };
12594d38bd12STony Lindgren 
126024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
12617e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12627e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc1_hwmod,
12634d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12647e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
12654d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12664d38bd12STony Lindgren };
12674d38bd12STony Lindgren 
126824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
12697e1b11d1STony Lindgren 	.master		= &dm81xx_tptc1_hwmod,
12707e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12714d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12727e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
12734d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12744d38bd12STony Lindgren };
12754d38bd12STony Lindgren 
12767e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space[] = {
12774d38bd12STony Lindgren 	{
12784d38bd12STony Lindgren 		.pa_start	= 0x49a00000,
12794d38bd12STony Lindgren 		.pa_end		= 0x49a00000 + SZ_8K - 1,
12804d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
12814d38bd12STony Lindgren 	},
12824d38bd12STony Lindgren 	{ },
12834d38bd12STony Lindgren };
12844d38bd12STony Lindgren 
12857e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
12864d38bd12STony Lindgren 	.name		= "tptc2",
12874d38bd12STony Lindgren };
12884d38bd12STony Lindgren 
128924da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = {
12904d38bd12STony Lindgren 	.name		= "tptc2",
12917e1b11d1STony Lindgren 	.class		= &dm81xx_tptc2_hwmod_class,
12924d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12934d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12944d38bd12STony Lindgren 	.prcm		= {
12954d38bd12STony Lindgren 		.omap4	= {
12967e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC2_CLKCTRL,
12974d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12984d38bd12STony Lindgren 		},
12994d38bd12STony Lindgren 	},
13004d38bd12STony Lindgren };
13014d38bd12STony Lindgren 
130224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
13037e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
13047e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc2_hwmod,
13054d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13067e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
13074d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13084d38bd12STony Lindgren };
13094d38bd12STony Lindgren 
131024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
13117e1b11d1STony Lindgren 	.master		= &dm81xx_tptc2_hwmod,
13127e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13134d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13147e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
13154d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13164d38bd12STony Lindgren };
13174d38bd12STony Lindgren 
13187e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space[] = {
13194d38bd12STony Lindgren 	{
13204d38bd12STony Lindgren 		.pa_start	= 0x49b00000,
13214d38bd12STony Lindgren 		.pa_end		= 0x49b00000 + SZ_8K - 1,
13224d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
13234d38bd12STony Lindgren 	},
13244d38bd12STony Lindgren 	{ },
13254d38bd12STony Lindgren };
13264d38bd12STony Lindgren 
13277e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
13284d38bd12STony Lindgren 	.name		= "tptc3",
13294d38bd12STony Lindgren };
13304d38bd12STony Lindgren 
133124da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = {
13324d38bd12STony Lindgren 	.name		= "tptc3",
13337e1b11d1STony Lindgren 	.class		= &dm81xx_tptc3_hwmod_class,
13344d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
13354d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
13364d38bd12STony Lindgren 	.prcm		= {
13374d38bd12STony Lindgren 		.omap4	= {
13387e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC3_CLKCTRL,
13394d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
13404d38bd12STony Lindgren 		},
13414d38bd12STony Lindgren 	},
13424d38bd12STony Lindgren };
13434d38bd12STony Lindgren 
134424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
13457e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
13467e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc3_hwmod,
13474d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13487e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
13494d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13504d38bd12STony Lindgren };
13514d38bd12STony Lindgren 
135224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
13537e1b11d1STony Lindgren 	.master		= &dm81xx_tptc3_hwmod,
13547e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13554d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13567e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
13574d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13584d38bd12STony Lindgren };
13594d38bd12STony Lindgren 
13600f3ccb24STony Lindgren /*
13610f3ccb24STony Lindgren  * REVISIT: Test and enable the following once clocks work:
13620f3ccb24STony Lindgren  * dm81xx_l4_ls__mailbox
13630f3ccb24STony Lindgren  *
13640f3ccb24STony Lindgren  * Also note that some devices share a single clkctrl_offs..
13650f3ccb24STony Lindgren  * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
13660f3ccb24STony Lindgren  */
13670f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
13680f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_slow,
13690f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_med,
13700f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
13710f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
13720f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart1,
13730f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart2,
13740f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart3,
13750f3ccb24STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
13760f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c1,
13770f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c2,
13783022b29dSTony Lindgren 	&dm81xx_l4_ls__gpio1,
13793022b29dSTony Lindgren 	&dm81xx_l4_ls__gpio2,
13800f3ccb24STony Lindgren 	&dm81xx_l4_ls__elm,
13810f3ccb24STony Lindgren 	&dm81xx_l4_ls__mcspi1,
1382c757fda8STony Lindgren 	&dm814x_l4_ls__mmc1,
1383c757fda8STony Lindgren 	&dm814x_l4_ls__mmc2,
13840f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
13850f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
13860f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
13870f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
13880f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
13890f3ccb24STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
13900f3ccb24STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
13910f3ccb24STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
13920f3ccb24STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
13930f3ccb24STony Lindgren 	&dm814x_l4_ls__timer1,
13940f3ccb24STony Lindgren 	&dm814x_l4_ls__timer2,
13950f3ccb24STony Lindgren 	&dm814x_l4_hs__cpgmac0,
13960f3ccb24STony Lindgren 	&dm814x_cpgmac0__mdio,
1397f53850b5STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1398f53850b5STony Lindgren 	&dm814x_default_l3_slow__usbss,
1399c757fda8STony Lindgren 	&dm814x_alwon_l3_med__mmc3,
14000f3ccb24STony Lindgren 	NULL,
14010f3ccb24STony Lindgren };
14020f3ccb24STony Lindgren 
14030f3ccb24STony Lindgren int __init dm814x_hwmod_init(void)
14040f3ccb24STony Lindgren {
14050f3ccb24STony Lindgren 	omap_hwmod_init();
14060f3ccb24STony Lindgren 	return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
14070f3ccb24STony Lindgren }
14080f3ccb24STony Lindgren 
14094d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
14104d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
14114d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
14127e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
14137e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
14147e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart1,
14157e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart2,
14167e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart3,
14177e1b11d1STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
14187e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c1,
14197e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c2,
14204d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
14214d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
14224d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
14234d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
14244d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
14254d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
14264d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
14274d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
14284d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
14294d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
14304d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
14317e1b11d1STony Lindgren 	&dm81xx_l4_ls__mcspi1,
14327e1b11d1STony Lindgren 	&dm81xx_l4_ls__mailbox,
14331539569bSNeil Armstrong 	&dm81xx_l4_ls__spinbox,
14347e1b11d1STony Lindgren 	&dm81xx_l4_hs__emac0,
14357e1b11d1STony Lindgren 	&dm81xx_emac0__mdio,
14364d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
14377e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
14387e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
14397e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
14407e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
14417e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
14427e1b11d1STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
14437e1b11d1STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
14447e1b11d1STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
14457e1b11d1STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
14464d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1447f53850b5STony Lindgren 	&dm816x_default_l3_slow__usbss,
14484d38bd12STony Lindgren 	NULL,
14494d38bd12STony Lindgren };
14504d38bd12STony Lindgren 
14510f3ccb24STony Lindgren int __init dm816x_hwmod_init(void)
14524d38bd12STony Lindgren {
14534d38bd12STony Lindgren 	omap_hwmod_init();
14544d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
14554d38bd12STony Lindgren }
1456