xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision fee3b67480360c5a3d54c7f11c6ef8f6d30b76fe)
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 
18ddd6a9d9STony Lindgren #include <linux/types.h>
19ddd6a9d9STony Lindgren 
204d38bd12STony Lindgren #include <linux/platform_data/hsmmc-omap.h>
214d38bd12STony Lindgren 
224d38bd12STony Lindgren #include "omap_hwmod_common_data.h"
234d38bd12STony Lindgren #include "cm81xx.h"
244d38bd12STony Lindgren #include "ti81xx.h"
254d38bd12STony Lindgren #include "wd_timer.h"
264d38bd12STony Lindgren 
274d38bd12STony Lindgren /*
284d38bd12STony Lindgren  * DM816X hardware modules integration data
294d38bd12STony Lindgren  *
304d38bd12STony Lindgren  * Note: This is incomplete and at present, not generated from h/w database.
314d38bd12STony Lindgren  */
324d38bd12STony Lindgren 
334d38bd12STony Lindgren /*
347e1b11d1STony Lindgren  * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
357e1b11d1STony Lindgren  * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
364d38bd12STony Lindgren  */
377e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP0_CLKCTRL		0x140
387e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP1_CLKCTRL		0x144
397e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP2_CLKCTRL		0x148
407e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCBSP_CLKCTRL		0x14c
417e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_0_CLKCTRL		0x150
427e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_1_CLKCTRL		0x154
437e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_2_CLKCTRL		0x158
447e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL		0x15c
457e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL		0x160
467e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_0_CLKCTRL		0x164
477e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_1_CLKCTRL		0x168
487e1b11d1STony Lindgren #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL		0x18c
497e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPI_CLKCTRL		0x190
507e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL		0x194
517e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL		0x198
527e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL		0x19c
537e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL		0x1a8
547e1b11d1STony Lindgren #define DM81XX_CM_ALWON_CONTROL_CLKCTRL		0x1c4
557e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPMC_CLKCTRL		0x1d0
567e1b11d1STony Lindgren #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL	0x1d4
577e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L3_CLKCTRL		0x1e4
587e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4HS_CLKCTRL		0x1e8
597e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4LS_CLKCTRL		0x1ec
607e1b11d1STony Lindgren #define DM81XX_CM_ALWON_RTC_CLKCTRL		0x1f0
617e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPCC_CLKCTRL		0x1f4
627e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC0_CLKCTRL		0x1f8
637e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC1_CLKCTRL		0x1fc
647e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC2_CLKCTRL		0x200
657e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC3_CLKCTRL		0x204
667e1b11d1STony Lindgren 
677e1b11d1STony Lindgren /* Registers specific to dm814x */
687e1b11d1STony Lindgren #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL	0x16c
697e1b11d1STony Lindgren #define DM814X_CM_ALWON_ATL_CLKCTRL		0x170
707e1b11d1STony Lindgren #define DM814X_CM_ALWON_MLB_CLKCTRL		0x174
717e1b11d1STony Lindgren #define DM814X_CM_ALWON_PATA_CLKCTRL		0x178
727e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_3_CLKCTRL		0x180
737e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_4_CLKCTRL		0x184
747e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_5_CLKCTRL		0x188
757e1b11d1STony Lindgren #define DM814X_CM_ALWON_OCM_0_CLKCTRL		0x1b4
767e1b11d1STony Lindgren #define DM814X_CM_ALWON_VCP_CLKCTRL		0x1b8
777e1b11d1STony Lindgren #define DM814X_CM_ALWON_MPU_CLKCTRL		0x1dc
787e1b11d1STony Lindgren #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL		0x1e0
797e1b11d1STony Lindgren #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL	0x218
807e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL		0x21c
817e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL		0x220
827e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL		0x224
837e1b11d1STony Lindgren #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL	0x228
847e1b11d1STony Lindgren 
857e1b11d1STony Lindgren /* Registers specific to dm816x */
864d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE		0x1400
874d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL	(0x1570 - DM816X_DM_ALWON_BASE)
884d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL	(0x1574 - DM816X_DM_ALWON_BASE)
894d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL	(0x1578 - DM816X_DM_ALWON_BASE)
904d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL	(0x157c - DM816X_DM_ALWON_BASE)
914d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL	(0x1580 - DM816X_DM_ALWON_BASE)
924d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL	(0x1584 - DM816X_DM_ALWON_BASE)
934d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL	(0x1588 - DM816X_DM_ALWON_BASE)
944d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL	(0x15b0 - DM816X_DM_ALWON_BASE)
954d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL	(0x15b4 - DM816X_DM_ALWON_BASE)
964d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL	(0x15b8 - DM816X_DM_ALWON_BASE)
974d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
984d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL	(0x15dc - DM816X_DM_ALWON_BASE)
994d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL	(0x1608 - DM816X_DM_ALWON_BASE)
1004d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL	(0x160c - DM816X_DM_ALWON_BASE)
1014d38bd12STony Lindgren 
1024d38bd12STony Lindgren /*
1034d38bd12STony Lindgren  * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
1044d38bd12STony Lindgren  * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
1054d38bd12STony Lindgren  */
106f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_OFFSET	0x500
107f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_USB_CLKCTRL	(0x558 - DM81XX_CM_DEFAULT_OFFSET)
10849e9e616SKevin Hilman #define DM81XX_CM_DEFAULT_SATA_CLKCTRL	(0x560 - 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 
231c5803246STony Lindgren /* RTC */
232c5803246STony Lindgren static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = {
233c5803246STony Lindgren 	.rev_offs	= 0x74,
234c5803246STony Lindgren 	.sysc_offs	= 0x78,
235c5803246STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE,
236c5803246STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO |
237c5803246STony Lindgren 			  SIDLE_SMART | SIDLE_SMART_WKUP,
238c5803246STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type3,
239c5803246STony Lindgren };
240c5803246STony Lindgren 
241c5803246STony Lindgren static struct omap_hwmod_class ti81xx_rtc_hwmod_class = {
242c5803246STony Lindgren 	.name		= "rtc",
243c5803246STony Lindgren 	.sysc		= &ti81xx_rtc_sysc,
244c5803246STony Lindgren };
245c5803246STony Lindgren 
24641dc5483SBen Dooks static struct omap_hwmod ti81xx_rtc_hwmod = {
247c5803246STony Lindgren 	.name		= "rtc",
248c5803246STony Lindgren 	.class		= &ti81xx_rtc_hwmod_class,
249c5803246STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
250c5803246STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
251c5803246STony Lindgren 	.main_clk	= "sysclk18_ck",
252c5803246STony Lindgren 	.prcm		= {
253c5803246STony Lindgren 		.omap4	= {
254c5803246STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL,
255c5803246STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
256c5803246STony Lindgren 		},
257c5803246STony Lindgren 	},
258c5803246STony Lindgren };
259c5803246STony Lindgren 
260c5803246STony Lindgren static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = {
261c5803246STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
262c5803246STony Lindgren 	.slave		= &ti81xx_rtc_hwmod,
263c5803246STony Lindgren 	.clk		= "sysclk6_ck",
264c5803246STony Lindgren 	.user		= OCP_USER_MPU,
265c5803246STony Lindgren };
266c5803246STony Lindgren 
2674d38bd12STony Lindgren /* UART common */
2684d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = {
2694d38bd12STony Lindgren 	.rev_offs	= 0x50,
2704d38bd12STony Lindgren 	.sysc_offs	= 0x54,
2714d38bd12STony Lindgren 	.syss_offs	= 0x58,
2724d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
2734d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
2744d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2754d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2764d38bd12STony Lindgren 				MSTANDBY_SMART_WKUP,
2774d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2784d38bd12STony Lindgren };
2794d38bd12STony Lindgren 
2804d38bd12STony Lindgren static struct omap_hwmod_class uart_class = {
2814d38bd12STony Lindgren 	.name = "uart",
2824d38bd12STony Lindgren 	.sysc = &uart_sysc,
2834d38bd12STony Lindgren };
2844d38bd12STony Lindgren 
2857e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = {
2864d38bd12STony Lindgren 	.name		= "uart1",
2874d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2884d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2894d38bd12STony Lindgren 	.prcm		= {
2904d38bd12STony Lindgren 		.omap4 = {
2917e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
2924d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2934d38bd12STony Lindgren 		},
2944d38bd12STony Lindgren 	},
2954d38bd12STony Lindgren 	.class		= &uart_class,
2964d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART1_FLAGS,
2974d38bd12STony Lindgren };
2984d38bd12STony Lindgren 
2997e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
3007e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3017e1b11d1STony Lindgren 	.slave		= &dm81xx_uart1_hwmod,
3024d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3034d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3044d38bd12STony Lindgren };
3054d38bd12STony Lindgren 
3067e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = {
3074d38bd12STony Lindgren 	.name		= "uart2",
3084d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3094d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3104d38bd12STony Lindgren 	.prcm		= {
3114d38bd12STony Lindgren 		.omap4 = {
3127e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
3134d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3144d38bd12STony Lindgren 		},
3154d38bd12STony Lindgren 	},
3164d38bd12STony Lindgren 	.class		= &uart_class,
3174d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART2_FLAGS,
3184d38bd12STony Lindgren };
3194d38bd12STony Lindgren 
3207e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
3217e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3227e1b11d1STony Lindgren 	.slave		= &dm81xx_uart2_hwmod,
3234d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3244d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3254d38bd12STony Lindgren };
3264d38bd12STony Lindgren 
3277e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = {
3284d38bd12STony Lindgren 	.name		= "uart3",
3294d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3304d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3314d38bd12STony Lindgren 	.prcm		= {
3324d38bd12STony Lindgren 		.omap4 = {
3337e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
3344d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3354d38bd12STony Lindgren 		},
3364d38bd12STony Lindgren 	},
3374d38bd12STony Lindgren 	.class		= &uart_class,
3384d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART3_FLAGS,
3394d38bd12STony Lindgren };
3404d38bd12STony Lindgren 
3417e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
3427e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3437e1b11d1STony Lindgren 	.slave		= &dm81xx_uart3_hwmod,
3444d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3454d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3464d38bd12STony Lindgren };
3474d38bd12STony Lindgren 
3484d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
3494d38bd12STony Lindgren 	.rev_offs	= 0x0,
3504d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3514d38bd12STony Lindgren 	.syss_offs	= 0x14,
3524d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
3534d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3544d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3554d38bd12STony Lindgren };
3564d38bd12STony Lindgren 
3574d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = {
3584d38bd12STony Lindgren 	.name		= "wd_timer",
3594d38bd12STony Lindgren 	.sysc		= &wd_timer_sysc,
3604d38bd12STony Lindgren 	.pre_shutdown	= &omap2_wd_timer_disable,
3614d38bd12STony Lindgren 	.reset		= &omap2_wd_timer_reset,
3624d38bd12STony Lindgren };
3634d38bd12STony Lindgren 
3647e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = {
3654d38bd12STony Lindgren 	.name		= "wd_timer",
3664d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3674d38bd12STony Lindgren 	.main_clk	= "sysclk18_ck",
3684d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
3694d38bd12STony Lindgren 	.prcm		= {
3704d38bd12STony Lindgren 		.omap4 = {
3717e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
3724d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3734d38bd12STony Lindgren 		},
3744d38bd12STony Lindgren 	},
3754d38bd12STony Lindgren 	.class		= &wd_timer_class,
3764d38bd12STony Lindgren };
3774d38bd12STony Lindgren 
3787e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
3797e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3807e1b11d1STony Lindgren 	.slave		= &dm81xx_wd_timer_hwmod,
3814d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3824d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3834d38bd12STony Lindgren };
3844d38bd12STony Lindgren 
3854d38bd12STony Lindgren /* I2C common */
3864d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = {
3874d38bd12STony Lindgren 	.rev_offs	= 0x0,
3884d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3894d38bd12STony Lindgren 	.syss_offs	= 0x90,
3904d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE |
3914d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3924d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE,
3934d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3944d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3954d38bd12STony Lindgren };
3964d38bd12STony Lindgren 
3974d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = {
3984d38bd12STony Lindgren 	.name = "i2c",
3994d38bd12STony Lindgren 	.sysc = &i2c_sysc,
4004d38bd12STony Lindgren };
4014d38bd12STony Lindgren 
4024d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = {
4034d38bd12STony Lindgren 	.name		= "i2c1",
4044d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4054d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
4064d38bd12STony Lindgren 	.prcm		= {
4074d38bd12STony Lindgren 		.omap4 = {
4087e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
4094d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4104d38bd12STony Lindgren 		},
4114d38bd12STony Lindgren 	},
4124d38bd12STony Lindgren 	.class		= &i2c_class,
4134d38bd12STony Lindgren };
4144d38bd12STony Lindgren 
4157e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
4167e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4174d38bd12STony Lindgren 	.slave		= &dm81xx_i2c1_hwmod,
4184d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
4194d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4204d38bd12STony Lindgren };
4214d38bd12STony Lindgren 
4227e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = {
4234d38bd12STony Lindgren 	.name		= "i2c2",
4244d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4254d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
4264d38bd12STony Lindgren 	.prcm		= {
4274d38bd12STony Lindgren 		.omap4 = {
4287e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
4294d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4304d38bd12STony Lindgren 		},
4314d38bd12STony Lindgren 	},
4324d38bd12STony Lindgren 	.class		= &i2c_class,
4334d38bd12STony Lindgren };
4344d38bd12STony Lindgren 
435*fee3b674SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
436*fee3b674SGraeme Smecher 	.master		= &dm81xx_l4_ls_hwmod,
437*fee3b674SGraeme Smecher 	.slave		= &dm81xx_i2c2_hwmod,
438*fee3b674SGraeme Smecher 	.clk		= "sysclk6_ck",
439*fee3b674SGraeme Smecher 	.user		= OCP_USER_MPU,
440*fee3b674SGraeme Smecher };
441*fee3b674SGraeme Smecher 
4424d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
4434d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4444d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4454d38bd12STony Lindgren 	.syss_offs	= 0x0014,
4464d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
4474d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET |
4484d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4494d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
4504d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4514d38bd12STony Lindgren };
4524d38bd12STony Lindgren 
4534d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
4544d38bd12STony Lindgren 	.name = "elm",
4554d38bd12STony Lindgren 	.sysc = &dm81xx_elm_sysc,
4564d38bd12STony Lindgren };
4574d38bd12STony Lindgren 
4584d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = {
4594d38bd12STony Lindgren 	.name		= "elm",
4604d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4614d38bd12STony Lindgren 	.class		= &dm81xx_elm_hwmod_class,
4624d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4634d38bd12STony Lindgren };
4644d38bd12STony Lindgren 
4654d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
4667e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4674d38bd12STony Lindgren 	.slave		= &dm81xx_elm_hwmod,
4684f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
4694d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4704d38bd12STony Lindgren };
4714d38bd12STony Lindgren 
4724d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
4734d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4744d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4754d38bd12STony Lindgren 	.syss_offs	= 0x0114,
4764d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4774d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4784d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4794d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4804d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
4814d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4824d38bd12STony Lindgren };
4834d38bd12STony Lindgren 
4844d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
4854d38bd12STony Lindgren 	.name	= "gpio",
4864d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4874d38bd12STony Lindgren 	.rev	= 2,
4884d38bd12STony Lindgren };
4894d38bd12STony Lindgren 
4904d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4914d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4924d38bd12STony Lindgren };
4934d38bd12STony Lindgren 
4944d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4954d38bd12STony Lindgren 	.name		= "gpio1",
4964d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4974d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4984d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4994d38bd12STony Lindgren 	.prcm = {
5004d38bd12STony Lindgren 		.omap4 = {
5017e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
5024d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5034d38bd12STony Lindgren 		},
5044d38bd12STony Lindgren 	},
5054d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
5064d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
5074d38bd12STony Lindgren };
5084d38bd12STony Lindgren 
5094d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
5107e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5114d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
5124f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
5134d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5144d38bd12STony Lindgren };
5154d38bd12STony Lindgren 
5164d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
5174d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
5184d38bd12STony Lindgren };
5194d38bd12STony Lindgren 
5204d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
5214d38bd12STony Lindgren 	.name		= "gpio2",
5224d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5234d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
5244d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
5254d38bd12STony Lindgren 	.prcm = {
5264d38bd12STony Lindgren 		.omap4 = {
5277e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
5284d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5294d38bd12STony Lindgren 		},
5304d38bd12STony Lindgren 	},
5314d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
5324d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
5334d38bd12STony Lindgren };
5344d38bd12STony Lindgren 
5354d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
5367e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5374d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
5384f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
5394d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5404d38bd12STony Lindgren };
5414d38bd12STony Lindgren 
5424d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
5434d38bd12STony Lindgren 	.rev_offs	= 0x0,
5444d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5454d38bd12STony Lindgren 	.syss_offs	= 0x14,
5464d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
5474d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
5484d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
5494d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
5504d38bd12STony Lindgren };
5514d38bd12STony Lindgren 
5524d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
5534d38bd12STony Lindgren 	.name	= "gpmc",
5544d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
5554d38bd12STony Lindgren };
5564d38bd12STony Lindgren 
5574d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
5584d38bd12STony Lindgren 	.name		= "gpmc",
5594d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5604d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
5614d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
56263aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
56363aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
5644d38bd12STony Lindgren 	.prcm = {
5654d38bd12STony Lindgren 		.omap4 = {
5667e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
5674d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5684d38bd12STony Lindgren 		},
5694d38bd12STony Lindgren 	},
5704d38bd12STony Lindgren };
5714d38bd12STony Lindgren 
572f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
5737e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_slow_hwmod,
5744d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
5754d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5764d38bd12STony Lindgren };
5774d38bd12STony Lindgren 
578ebf24414STony Lindgren /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */
5794d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
5804d38bd12STony Lindgren 	.rev_offs	= 0x0,
5814d38bd12STony Lindgren 	.sysc_offs	= 0x10,
582ebf24414STony Lindgren 	.srst_udelay	= 2,
5834d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5844d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5854d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5864d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5874d38bd12STony Lindgren };
5884d38bd12STony Lindgren 
5894d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5904d38bd12STony Lindgren 	.name = "usbotg",
5914d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5924d38bd12STony Lindgren };
5934d38bd12STony Lindgren 
594f53850b5STony Lindgren static struct omap_hwmod dm814x_usbss_hwmod = {
5954d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5964d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
597f53850b5STony Lindgren 	.main_clk	= "pll260dcoclkldo",	/* 481c5260.adpll.dcoclkldo */
5984d38bd12STony Lindgren 	.prcm		= {
5994d38bd12STony Lindgren 		.omap4 = {
600f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
6014d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6024d38bd12STony Lindgren 		},
6034d38bd12STony Lindgren 	},
6044d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
6054d38bd12STony Lindgren };
6064d38bd12STony Lindgren 
607f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = {
6087e1b11d1STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
609f53850b5STony Lindgren 	.slave		= &dm814x_usbss_hwmod,
610f53850b5STony Lindgren 	.clk		= "sysclk6_ck",
611f53850b5STony Lindgren 	.user		= OCP_USER_MPU,
612f53850b5STony Lindgren };
613f53850b5STony Lindgren 
614f53850b5STony Lindgren static struct omap_hwmod dm816x_usbss_hwmod = {
615f53850b5STony Lindgren 	.name		= "usb_otg_hs",
616f53850b5STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
617f53850b5STony Lindgren 	.main_clk	= "sysclk6_ck",
618f53850b5STony Lindgren 	.prcm		= {
619f53850b5STony Lindgren 		.omap4 = {
620f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
621f53850b5STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
622f53850b5STony Lindgren 		},
623f53850b5STony Lindgren 	},
624f53850b5STony Lindgren 	.class		= &dm81xx_usbotg_class,
625f53850b5STony Lindgren };
626f53850b5STony Lindgren 
627f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = {
628f53850b5STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
629f53850b5STony Lindgren 	.slave		= &dm816x_usbss_hwmod,
6304d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6314d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6324d38bd12STony Lindgren };
6334d38bd12STony Lindgren 
6344d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
6354d38bd12STony Lindgren 	.rev_offs	= 0x0000,
6364d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
6374d38bd12STony Lindgren 	.syss_offs	= 0x0014,
6384d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
6394d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
6404d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
6414d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
6424d38bd12STony Lindgren };
6434d38bd12STony Lindgren 
6444d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
6454d38bd12STony Lindgren 	.name = "timer",
6464d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
6474d38bd12STony Lindgren };
6484d38bd12STony Lindgren 
6490f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = {
6500f3ccb24STony Lindgren 	.name		= "timer1",
6510f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
652cb4db038STony Lindgren 	.main_clk	= "timer1_fck",
6530f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6540f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6550f3ccb24STony Lindgren };
6560f3ccb24STony Lindgren 
6570f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
6580f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6590f3ccb24STony Lindgren 	.slave		= &dm814x_timer1_hwmod,
6604f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
6610f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6620f3ccb24STony Lindgren };
6630f3ccb24STony Lindgren 
6644d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
6654d38bd12STony Lindgren 	.name		= "timer1",
6664d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6674d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
6684d38bd12STony Lindgren 	.prcm		= {
6694d38bd12STony Lindgren 		.omap4 = {
6704d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
6714d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6724d38bd12STony Lindgren 		},
6734d38bd12STony Lindgren 	},
6744d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6754d38bd12STony Lindgren };
6764d38bd12STony Lindgren 
6774d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
6787e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6794d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
6804d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6814d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6824d38bd12STony Lindgren };
6834d38bd12STony Lindgren 
6840f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = {
6850f3ccb24STony Lindgren 	.name		= "timer2",
6860f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
687cb4db038STony Lindgren 	.main_clk	= "timer2_fck",
6880f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6890f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6900f3ccb24STony Lindgren };
6910f3ccb24STony Lindgren 
6920f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
6930f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6940f3ccb24STony Lindgren 	.slave		= &dm814x_timer2_hwmod,
6954f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
6960f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6970f3ccb24STony Lindgren };
6980f3ccb24STony Lindgren 
6994d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
7004d38bd12STony Lindgren 	.name		= "timer2",
7014d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7024d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
7034d38bd12STony Lindgren 	.prcm		= {
7044d38bd12STony Lindgren 		.omap4 = {
7054d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
7064d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7074d38bd12STony Lindgren 		},
7084d38bd12STony Lindgren 	},
7094d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7104d38bd12STony Lindgren };
7114d38bd12STony Lindgren 
7124d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
7137e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7144d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
7154d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7164d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7174d38bd12STony Lindgren };
7184d38bd12STony Lindgren 
7194d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
7204d38bd12STony Lindgren 	.name		= "timer3",
7214d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7224d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
7234d38bd12STony Lindgren 	.prcm		= {
7244d38bd12STony Lindgren 		.omap4 = {
7254d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
7264d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7274d38bd12STony Lindgren 		},
7284d38bd12STony Lindgren 	},
7294d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7304d38bd12STony Lindgren };
7314d38bd12STony Lindgren 
7324d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
7337e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7344d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
7354d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7364d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7374d38bd12STony Lindgren };
7384d38bd12STony Lindgren 
7394d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
7404d38bd12STony Lindgren 	.name		= "timer4",
7414d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7424d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
7434d38bd12STony Lindgren 	.prcm		= {
7444d38bd12STony Lindgren 		.omap4 = {
7454d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
7464d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7474d38bd12STony Lindgren 		},
7484d38bd12STony Lindgren 	},
7494d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7504d38bd12STony Lindgren };
7514d38bd12STony Lindgren 
7524d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
7537e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7544d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
7554d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7564d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7574d38bd12STony Lindgren };
7584d38bd12STony Lindgren 
7594d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
7604d38bd12STony Lindgren 	.name		= "timer5",
7614d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7624d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
7634d38bd12STony Lindgren 	.prcm		= {
7644d38bd12STony Lindgren 		.omap4 = {
7654d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
7664d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7674d38bd12STony Lindgren 		},
7684d38bd12STony Lindgren 	},
7694d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7704d38bd12STony Lindgren };
7714d38bd12STony Lindgren 
7724d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
7737e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7744d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
7754d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7764d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7774d38bd12STony Lindgren };
7784d38bd12STony Lindgren 
7794d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
7804d38bd12STony Lindgren 	.name		= "timer6",
7814d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7824d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
7834d38bd12STony Lindgren 	.prcm		= {
7844d38bd12STony Lindgren 		.omap4 = {
7854d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
7864d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7874d38bd12STony Lindgren 		},
7884d38bd12STony Lindgren 	},
7894d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7904d38bd12STony Lindgren };
7914d38bd12STony Lindgren 
7924d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
7937e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7944d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
7954d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7964d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7974d38bd12STony Lindgren };
7984d38bd12STony Lindgren 
7994d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
8004d38bd12STony Lindgren 	.name		= "timer7",
8014d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8024d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
8034d38bd12STony Lindgren 	.prcm		= {
8044d38bd12STony Lindgren 		.omap4 = {
8054d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
8064d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8074d38bd12STony Lindgren 		},
8084d38bd12STony Lindgren 	},
8094d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
8104d38bd12STony Lindgren };
8114d38bd12STony Lindgren 
8124d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
8137e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
8144d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
8154d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
8164d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8174d38bd12STony Lindgren };
8184d38bd12STony Lindgren 
8190f3ccb24STony Lindgren /* CPSW on dm814x */
8200f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
8210f3ccb24STony Lindgren 	.rev_offs	= 0x0,
8220f3ccb24STony Lindgren 	.sysc_offs	= 0x8,
8230f3ccb24STony Lindgren 	.syss_offs	= 0x4,
8240f3ccb24STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
8250f3ccb24STony Lindgren 			  SYSS_HAS_RESET_STATUS,
8260f3ccb24STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
8270f3ccb24STony Lindgren 			  MSTANDBY_NO,
8280f3ccb24STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type3,
8290f3ccb24STony Lindgren };
8300f3ccb24STony Lindgren 
8310f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
8320f3ccb24STony Lindgren 	.name		= "cpgmac0",
8330f3ccb24STony Lindgren 	.sysc		= &dm814x_cpgmac_sysc,
8340f3ccb24STony Lindgren };
8350f3ccb24STony Lindgren 
83624da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = {
8370f3ccb24STony Lindgren 	.name		= "cpgmac0",
8380f3ccb24STony Lindgren 	.class		= &dm814x_cpgmac0_hwmod_class,
8390f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8400f3ccb24STony Lindgren 	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
8410f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8420f3ccb24STony Lindgren 	.prcm		= {
8430f3ccb24STony Lindgren 		.omap4	= {
8440f3ccb24STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
8450f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8460f3ccb24STony Lindgren 		},
8470f3ccb24STony Lindgren 	},
8480f3ccb24STony Lindgren };
8490f3ccb24STony Lindgren 
8500f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
8510f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8520f3ccb24STony Lindgren };
8530f3ccb24STony Lindgren 
85424da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = {
8550f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8560f3ccb24STony Lindgren 	.class		= &dm814x_mdio_hwmod_class,
8570f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8580f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8590f3ccb24STony Lindgren };
8600f3ccb24STony Lindgren 
8610f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
8620f3ccb24STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8630f3ccb24STony Lindgren 	.slave		= &dm814x_cpgmac0_hwmod,
8640f3ccb24STony Lindgren 	.clk		= "cpsw_125mhz_gclk",
8650f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8660f3ccb24STony Lindgren };
8670f3ccb24STony Lindgren 
86824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
8690f3ccb24STony Lindgren 	.master		= &dm814x_cpgmac0_hwmod,
8700f3ccb24STony Lindgren 	.slave		= &dm814x_mdio_hwmod,
8710f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8720f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8730f3ccb24STony Lindgren };
8740f3ccb24STony Lindgren 
8754d38bd12STony Lindgren /* EMAC Ethernet */
8764d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
8774d38bd12STony Lindgren 	.rev_offs	= 0x0,
8784d38bd12STony Lindgren 	.sysc_offs	= 0x4,
8794d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
8804d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
8814d38bd12STony Lindgren };
8824d38bd12STony Lindgren 
8834d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
8844d38bd12STony Lindgren 	.name		= "emac",
8854d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8864d38bd12STony Lindgren };
8874d38bd12STony Lindgren 
8884d38bd12STony Lindgren /*
8894d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
8904d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
8914d38bd12STony Lindgren  */
8924d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
8934d38bd12STony Lindgren 	.name		= "emac0",
8944d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8954d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
89629f5b34cSNeil Armstrong 	.flags		= HWMOD_NO_IDLEST,
8974d38bd12STony Lindgren };
8984d38bd12STony Lindgren 
8997e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
9007e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9014d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
9024d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
9034d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9044d38bd12STony Lindgren };
9054d38bd12STony Lindgren 
9067e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
9074d38bd12STony Lindgren 	.name		= "davinci_mdio",
9084d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
9094d38bd12STony Lindgren };
9104d38bd12STony Lindgren 
91124da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
9124d38bd12STony Lindgren 	.name		= "davinci_mdio",
9137e1b11d1STony Lindgren 	.class		= &dm81xx_mdio_hwmod_class,
9144d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
9154d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
9164d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
9174d38bd12STony Lindgren 	/*
9184d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
9194d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
9204d38bd12STony Lindgren 	 */
9214d38bd12STony Lindgren 	.prcm		= {
9224d38bd12STony Lindgren 		.omap4 = {
9237e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
9244d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9254d38bd12STony Lindgren 		},
9264d38bd12STony Lindgren 	},
9274d38bd12STony Lindgren };
9284d38bd12STony Lindgren 
92924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
9307e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9317e1b11d1STony Lindgren 	.slave		= &dm81xx_emac0_mdio_hwmod,
9324d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9334d38bd12STony Lindgren };
9344d38bd12STony Lindgren 
9354d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
9364d38bd12STony Lindgren 	.name		= "emac1",
9374d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
9384d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
9394d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
9404d38bd12STony Lindgren 	.prcm		= {
9414d38bd12STony Lindgren 		.omap4 = {
9424d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
9434d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9444d38bd12STony Lindgren 		},
9454d38bd12STony Lindgren 	},
9464d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
9474d38bd12STony Lindgren };
9484d38bd12STony Lindgren 
9494d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
9507e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9514d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
9524d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
9534d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9544d38bd12STony Lindgren };
9554d38bd12STony Lindgren 
95649e9e616SKevin Hilman static struct omap_hwmod_class_sysconfig dm81xx_sata_sysc = {
957103fd8e7STony Lindgren 	.rev_offs	= 0x00fc,
95849e9e616SKevin Hilman 	.sysc_offs	= 0x1100,
95949e9e616SKevin Hilman 	.sysc_flags	= SYSC_HAS_SIDLEMODE,
96049e9e616SKevin Hilman 	.idlemodes	= SIDLE_FORCE,
96149e9e616SKevin Hilman 	.sysc_fields	= &omap_hwmod_sysc_type3,
96249e9e616SKevin Hilman };
96349e9e616SKevin Hilman 
96449e9e616SKevin Hilman static struct omap_hwmod_class dm81xx_sata_hwmod_class = {
96549e9e616SKevin Hilman 	.name	= "sata",
96649e9e616SKevin Hilman 	.sysc	= &dm81xx_sata_sysc,
96749e9e616SKevin Hilman };
96849e9e616SKevin Hilman 
96949e9e616SKevin Hilman static struct omap_hwmod dm81xx_sata_hwmod = {
97049e9e616SKevin Hilman 	.name		= "sata",
97171d50393STero Kristo 	.clkdm_name	= "default_clkdm",
97249e9e616SKevin Hilman 	.flags		= HWMOD_NO_IDLEST,
97349e9e616SKevin Hilman 	.prcm = {
97449e9e616SKevin Hilman 		.omap4 = {
97549e9e616SKevin Hilman 			.clkctrl_offs = DM81XX_CM_DEFAULT_SATA_CLKCTRL,
97649e9e616SKevin Hilman 			.modulemode   = MODULEMODE_SWCTRL,
97749e9e616SKevin Hilman 		},
97849e9e616SKevin Hilman 	},
97949e9e616SKevin Hilman 	.class		= &dm81xx_sata_hwmod_class,
98049e9e616SKevin Hilman };
98149e9e616SKevin Hilman 
98249e9e616SKevin Hilman static struct omap_hwmod_ocp_if dm81xx_l4_hs__sata = {
98349e9e616SKevin Hilman 	.master		= &dm81xx_l4_hs_hwmod,
98449e9e616SKevin Hilman 	.slave		= &dm81xx_sata_hwmod,
98549e9e616SKevin Hilman 	.clk		= "sysclk5_ck",
98649e9e616SKevin Hilman 	.user		= OCP_USER_MPU,
98749e9e616SKevin Hilman };
98849e9e616SKevin Hilman 
989c757fda8STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = {
9904d38bd12STony Lindgren 	.rev_offs	= 0x0,
9914d38bd12STony Lindgren 	.sysc_offs	= 0x110,
9924d38bd12STony Lindgren 	.syss_offs	= 0x114,
9934d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
9944d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
9954d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
9964d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
9974d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
9984d38bd12STony Lindgren };
9994d38bd12STony Lindgren 
1000c757fda8STony Lindgren static struct omap_hwmod_class dm81xx_mmc_class = {
10014d38bd12STony Lindgren 	.name = "mmc",
1002c757fda8STony Lindgren 	.sysc = &dm81xx_mmc_sysc,
10034d38bd12STony Lindgren };
10044d38bd12STony Lindgren 
1005c757fda8STony Lindgren static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = {
10064d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
10074d38bd12STony Lindgren };
10084d38bd12STony Lindgren 
1009c757fda8STony Lindgren static struct omap_hsmmc_dev_attr mmc_dev_attr = {
1010c757fda8STony Lindgren };
1011c757fda8STony Lindgren 
1012c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc1_hwmod = {
1013c757fda8STony Lindgren 	.name		= "mmc1",
1014c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1015c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1016c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
1017c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
1018c757fda8STony Lindgren 	.prcm		= {
1019c757fda8STony Lindgren 		.omap4 = {
1020c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL,
1021c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1022c757fda8STony Lindgren 		},
1023c757fda8STony Lindgren 	},
1024c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1025c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
1026c757fda8STony Lindgren };
1027c757fda8STony Lindgren 
1028c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = {
1029c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
1030c757fda8STony Lindgren 	.slave		= &dm814x_mmc1_hwmod,
1031c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
1032c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
1033c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
1034c757fda8STony Lindgren };
1035c757fda8STony Lindgren 
1036c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc2_hwmod = {
1037c757fda8STony Lindgren 	.name		= "mmc2",
1038c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1039c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1040c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
1041c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
1042c757fda8STony Lindgren 	.prcm		= {
1043c757fda8STony Lindgren 		.omap4 = {
1044c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL,
1045c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1046c757fda8STony Lindgren 		},
1047c757fda8STony Lindgren 	},
1048c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1049c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
1050c757fda8STony Lindgren };
1051c757fda8STony Lindgren 
1052c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = {
1053c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
1054c757fda8STony Lindgren 	.slave		= &dm814x_mmc2_hwmod,
1055c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
1056c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
1057c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
1058c757fda8STony Lindgren };
1059c757fda8STony Lindgren 
1060c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc3_hwmod = {
1061c757fda8STony Lindgren 	.name		= "mmc3",
1062c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1063c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1064c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
1065c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
1066c757fda8STony Lindgren 	.prcm		= {
1067c757fda8STony Lindgren 		.omap4 = {
1068c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL,
1069c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1070c757fda8STony Lindgren 		},
1071c757fda8STony Lindgren 	},
1072c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1073c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
1074c757fda8STony Lindgren };
1075c757fda8STony Lindgren 
1076c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = {
1077c757fda8STony Lindgren 	.master		= &dm81xx_alwon_l3_med_hwmod,
1078c757fda8STony Lindgren 	.slave		= &dm814x_mmc3_hwmod,
1079c757fda8STony Lindgren 	.clk		= "sysclk4_ck",
1080c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
10814d38bd12STony Lindgren };
10824d38bd12STony Lindgren 
10834d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
10844d38bd12STony Lindgren 	.name		= "mmc1",
10854d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1086c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1087c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
10884d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
10894d38bd12STony Lindgren 	.prcm		= {
10904d38bd12STony Lindgren 		.omap4 = {
10914d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
10924d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10934d38bd12STony Lindgren 		},
10944d38bd12STony Lindgren 	},
1095c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1096c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
10974d38bd12STony Lindgren };
10984d38bd12STony Lindgren 
10994d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
11007e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
11014d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
11024d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
11034d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11044d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
11054d38bd12STony Lindgren };
11064d38bd12STony Lindgren 
11074d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
11084d38bd12STony Lindgren 	.rev_offs	= 0x0,
11094d38bd12STony Lindgren 	.sysc_offs	= 0x110,
11104d38bd12STony Lindgren 	.syss_offs	= 0x114,
11114d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11124d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
11134d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
11144d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11154d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
11164d38bd12STony Lindgren };
11174d38bd12STony Lindgren 
11184d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
11194d38bd12STony Lindgren 	.name = "mcspi",
11204d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
11214d38bd12STony Lindgren };
11224d38bd12STony Lindgren 
11237e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = {
11244d38bd12STony Lindgren 	.name		= "mcspi1",
11254d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11264d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
11274d38bd12STony Lindgren 	.prcm		= {
11284d38bd12STony Lindgren 		.omap4 = {
11297e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
11304d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
11314d38bd12STony Lindgren 		},
11324d38bd12STony Lindgren 	},
11334d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
11344d38bd12STony Lindgren };
11354d38bd12STony Lindgren 
11367e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
11377e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
11387e1b11d1STony Lindgren 	.slave		= &dm81xx_mcspi1_hwmod,
11394d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
11404d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11414d38bd12STony Lindgren };
11424d38bd12STony Lindgren 
11437e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
11444d38bd12STony Lindgren 	.rev_offs	= 0x000,
11454d38bd12STony Lindgren 	.sysc_offs	= 0x010,
11464d38bd12STony Lindgren 	.syss_offs	= 0x014,
11474d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11484d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
11494d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11504d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
11514d38bd12STony Lindgren };
11524d38bd12STony Lindgren 
11537e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
11544d38bd12STony Lindgren 	.name = "mailbox",
11557e1b11d1STony Lindgren 	.sysc = &dm81xx_mailbox_sysc,
11564d38bd12STony Lindgren };
11574d38bd12STony Lindgren 
11587e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = {
11594d38bd12STony Lindgren 	.name		= "mailbox",
11604d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11617e1b11d1STony Lindgren 	.class		= &dm81xx_mailbox_hwmod_class,
11624d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
11634d38bd12STony Lindgren 	.prcm		= {
11644d38bd12STony Lindgren 		.omap4 = {
11657e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
11664d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
11674d38bd12STony Lindgren 		},
11684d38bd12STony Lindgren 	},
11694d38bd12STony Lindgren };
11704d38bd12STony Lindgren 
11717e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
11727e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
11737e1b11d1STony Lindgren 	.slave		= &dm81xx_mailbox_hwmod,
11744f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
11754d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11764d38bd12STony Lindgren };
11774d38bd12STony Lindgren 
11781539569bSNeil Armstrong static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
11791539569bSNeil Armstrong 	.rev_offs	= 0x000,
11801539569bSNeil Armstrong 	.sysc_offs	= 0x010,
11811539569bSNeil Armstrong 	.syss_offs	= 0x014,
11821539569bSNeil Armstrong 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11831539569bSNeil Armstrong 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
11841539569bSNeil Armstrong 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11851539569bSNeil Armstrong 	.sysc_fields	= &omap_hwmod_sysc_type1,
11861539569bSNeil Armstrong };
11871539569bSNeil Armstrong 
11881539569bSNeil Armstrong static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
11891539569bSNeil Armstrong 	.name = "spinbox",
11901539569bSNeil Armstrong 	.sysc = &dm81xx_spinbox_sysc,
11911539569bSNeil Armstrong };
11921539569bSNeil Armstrong 
11931539569bSNeil Armstrong static struct omap_hwmod dm81xx_spinbox_hwmod = {
11941539569bSNeil Armstrong 	.name		= "spinbox",
11951539569bSNeil Armstrong 	.clkdm_name	= "alwon_l3s_clkdm",
11961539569bSNeil Armstrong 	.class		= &dm81xx_spinbox_hwmod_class,
11971539569bSNeil Armstrong 	.main_clk	= "sysclk6_ck",
11981539569bSNeil Armstrong 	.prcm		= {
11991539569bSNeil Armstrong 		.omap4 = {
12001539569bSNeil Armstrong 			.clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
12011539569bSNeil Armstrong 			.modulemode = MODULEMODE_SWCTRL,
12021539569bSNeil Armstrong 		},
12031539569bSNeil Armstrong 	},
12041539569bSNeil Armstrong };
12051539569bSNeil Armstrong 
12061539569bSNeil Armstrong static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
12071539569bSNeil Armstrong 	.master		= &dm81xx_l4_ls_hwmod,
12081539569bSNeil Armstrong 	.slave		= &dm81xx_spinbox_hwmod,
12094f5395f0STony Lindgren 	.clk		= "sysclk6_ck",
12101539569bSNeil Armstrong 	.user		= OCP_USER_MPU,
12111539569bSNeil Armstrong };
12121539569bSNeil Armstrong 
12137e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
12144d38bd12STony Lindgren 	.name		= "tpcc",
12154d38bd12STony Lindgren };
12164d38bd12STony Lindgren 
121724da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = {
12184d38bd12STony Lindgren 	.name		= "tpcc",
12197e1b11d1STony Lindgren 	.class		= &dm81xx_tpcc_hwmod_class,
12204d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12214d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12224d38bd12STony Lindgren 	.prcm		= {
12234d38bd12STony Lindgren 		.omap4	= {
12247e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPCC_CLKCTRL,
12254d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12264d38bd12STony Lindgren 		},
12274d38bd12STony Lindgren 	},
12284d38bd12STony Lindgren };
12294d38bd12STony Lindgren 
123024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
12317e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12327e1b11d1STony Lindgren 	.slave		= &dm81xx_tpcc_hwmod,
12334d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12344d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12354d38bd12STony Lindgren };
12364d38bd12STony Lindgren 
12377e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
12384d38bd12STony Lindgren 	.name		= "tptc0",
12394d38bd12STony Lindgren };
12404d38bd12STony Lindgren 
124124da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = {
12424d38bd12STony Lindgren 	.name		= "tptc0",
12437e1b11d1STony Lindgren 	.class		= &dm81xx_tptc0_hwmod_class,
12444d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12454d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12464d38bd12STony Lindgren 	.prcm		= {
12474d38bd12STony Lindgren 		.omap4	= {
12487e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC0_CLKCTRL,
12494d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12504d38bd12STony Lindgren 		},
12514d38bd12STony Lindgren 	},
12524d38bd12STony Lindgren };
12534d38bd12STony Lindgren 
125424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
12557e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12567e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc0_hwmod,
12574d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12584d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12594d38bd12STony Lindgren };
12604d38bd12STony Lindgren 
126124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
12627e1b11d1STony Lindgren 	.master		= &dm81xx_tptc0_hwmod,
12637e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12644d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12654d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12664d38bd12STony Lindgren };
12674d38bd12STony Lindgren 
12687e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
12694d38bd12STony Lindgren 	.name		= "tptc1",
12704d38bd12STony Lindgren };
12714d38bd12STony Lindgren 
127224da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = {
12734d38bd12STony Lindgren 	.name		= "tptc1",
12747e1b11d1STony Lindgren 	.class		= &dm81xx_tptc1_hwmod_class,
12754d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12764d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12774d38bd12STony Lindgren 	.prcm		= {
12784d38bd12STony Lindgren 		.omap4	= {
12797e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC1_CLKCTRL,
12804d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12814d38bd12STony Lindgren 		},
12824d38bd12STony Lindgren 	},
12834d38bd12STony Lindgren };
12844d38bd12STony Lindgren 
128524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
12867e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12877e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc1_hwmod,
12884d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12894d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12904d38bd12STony Lindgren };
12914d38bd12STony Lindgren 
129224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
12937e1b11d1STony Lindgren 	.master		= &dm81xx_tptc1_hwmod,
12947e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12954d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12964d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12974d38bd12STony Lindgren };
12984d38bd12STony Lindgren 
12997e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
13004d38bd12STony Lindgren 	.name		= "tptc2",
13014d38bd12STony Lindgren };
13024d38bd12STony Lindgren 
130324da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = {
13044d38bd12STony Lindgren 	.name		= "tptc2",
13057e1b11d1STony Lindgren 	.class		= &dm81xx_tptc2_hwmod_class,
13064d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
13074d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
13084d38bd12STony Lindgren 	.prcm		= {
13094d38bd12STony Lindgren 		.omap4	= {
13107e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC2_CLKCTRL,
13114d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
13124d38bd12STony Lindgren 		},
13134d38bd12STony Lindgren 	},
13144d38bd12STony Lindgren };
13154d38bd12STony Lindgren 
131624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
13177e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
13187e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc2_hwmod,
13194d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13204d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13214d38bd12STony Lindgren };
13224d38bd12STony Lindgren 
132324da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
13247e1b11d1STony Lindgren 	.master		= &dm81xx_tptc2_hwmod,
13257e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13264d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13274d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13284d38bd12STony Lindgren };
13294d38bd12STony Lindgren 
13307e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
13314d38bd12STony Lindgren 	.name		= "tptc3",
13324d38bd12STony Lindgren };
13334d38bd12STony Lindgren 
133424da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = {
13354d38bd12STony Lindgren 	.name		= "tptc3",
13367e1b11d1STony Lindgren 	.class		= &dm81xx_tptc3_hwmod_class,
13374d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
13384d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
13394d38bd12STony Lindgren 	.prcm		= {
13404d38bd12STony Lindgren 		.omap4	= {
13417e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC3_CLKCTRL,
13424d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
13434d38bd12STony Lindgren 		},
13444d38bd12STony Lindgren 	},
13454d38bd12STony Lindgren };
13464d38bd12STony Lindgren 
134724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
13487e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
13497e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc3_hwmod,
13504d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13514d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13524d38bd12STony Lindgren };
13534d38bd12STony Lindgren 
135424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
13557e1b11d1STony Lindgren 	.master		= &dm81xx_tptc3_hwmod,
13567e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13574d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13584d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13594d38bd12STony Lindgren };
13604d38bd12STony Lindgren 
13610f3ccb24STony Lindgren /*
13620f3ccb24STony Lindgren  * REVISIT: Test and enable the following once clocks work:
13630f3ccb24STony Lindgren  * dm81xx_l4_ls__mailbox
13640f3ccb24STony Lindgren  *
13650f3ccb24STony Lindgren  * Also note that some devices share a single clkctrl_offs..
13660f3ccb24STony Lindgren  * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
13670f3ccb24STony Lindgren  */
13680f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
13690f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_slow,
13700f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_med,
13710f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
13720f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
13730f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart1,
13740f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart2,
13750f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart3,
13760f3ccb24STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
13770f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c1,
13780f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c2,
13793022b29dSTony Lindgren 	&dm81xx_l4_ls__gpio1,
13803022b29dSTony Lindgren 	&dm81xx_l4_ls__gpio2,
13810f3ccb24STony Lindgren 	&dm81xx_l4_ls__elm,
13820f3ccb24STony Lindgren 	&dm81xx_l4_ls__mcspi1,
1383c757fda8STony Lindgren 	&dm814x_l4_ls__mmc1,
1384c757fda8STony Lindgren 	&dm814x_l4_ls__mmc2,
1385c5803246STony Lindgren 	&ti81xx_l4_ls__rtc,
13860f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
13870f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
13880f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
13890f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
13900f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
13910f3ccb24STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
13920f3ccb24STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
13930f3ccb24STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
13940f3ccb24STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
13950f3ccb24STony Lindgren 	&dm814x_l4_ls__timer1,
13960f3ccb24STony Lindgren 	&dm814x_l4_ls__timer2,
13970f3ccb24STony Lindgren 	&dm814x_l4_hs__cpgmac0,
13980f3ccb24STony Lindgren 	&dm814x_cpgmac0__mdio,
1399f53850b5STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1400f53850b5STony Lindgren 	&dm814x_default_l3_slow__usbss,
1401c757fda8STony Lindgren 	&dm814x_alwon_l3_med__mmc3,
14020f3ccb24STony Lindgren 	NULL,
14030f3ccb24STony Lindgren };
14040f3ccb24STony Lindgren 
14050f3ccb24STony Lindgren int __init dm814x_hwmod_init(void)
14060f3ccb24STony Lindgren {
14070f3ccb24STony Lindgren 	omap_hwmod_init();
14080f3ccb24STony Lindgren 	return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
14090f3ccb24STony Lindgren }
14100f3ccb24STony Lindgren 
14114d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
14124d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
14134d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
14147e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
14157e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
14167e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart1,
14177e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart2,
14187e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart3,
14197e1b11d1STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
14207e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c1,
14217e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c2,
14224d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
14234d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
14244d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
1425c5803246STony Lindgren 	&ti81xx_l4_ls__rtc,
14264d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
14274d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
14284d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
14294d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
14304d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
14314d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
14324d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
14334d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
14347e1b11d1STony Lindgren 	&dm81xx_l4_ls__mcspi1,
14357e1b11d1STony Lindgren 	&dm81xx_l4_ls__mailbox,
14361539569bSNeil Armstrong 	&dm81xx_l4_ls__spinbox,
14377e1b11d1STony Lindgren 	&dm81xx_l4_hs__emac0,
14387e1b11d1STony Lindgren 	&dm81xx_emac0__mdio,
14394d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
144049e9e616SKevin Hilman 	&dm81xx_l4_hs__sata,
14417e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
14427e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
14437e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
14447e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
14457e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
14467e1b11d1STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
14477e1b11d1STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
14487e1b11d1STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
14497e1b11d1STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
14504d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1451f53850b5STony Lindgren 	&dm816x_default_l3_slow__usbss,
14524d38bd12STony Lindgren 	NULL,
14534d38bd12STony Lindgren };
14544d38bd12STony Lindgren 
14550f3ccb24STony Lindgren int __init dm816x_hwmod_init(void)
14564d38bd12STony Lindgren {
14574d38bd12STony Lindgren 	omap_hwmod_init();
14584d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
14594d38bd12STony Lindgren }
1460