xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision f53850b5dc625ca37ae84b47f4f92b1d55df2aa0)
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  */
107*f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_OFFSET	0x500
108*f53850b5STony 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,
1474d38bd12STony Lindgren };
1484d38bd12STony Lindgren 
1494d38bd12STony Lindgren /*
1504d38bd12STony Lindgren  * L4 high-speed peripherals. For devices using this, please see the TRM
1514d38bd12STony Lindgren  * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
1524d38bd12STony Lindgren  * table 1-73 for devices using 250MHz SYSCLK5 clock.
1534d38bd12STony Lindgren  */
1547e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_hs_hwmod = {
1554d38bd12STony Lindgren 	.name		= "l4_hs",
1564d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1574d38bd12STony Lindgren 	.class		= &l4_hwmod_class,
1584d38bd12STony Lindgren };
1594d38bd12STony Lindgren 
1604d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */
1617e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = {
1627e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_slow_hwmod,
1637e1b11d1STony Lindgren 	.slave	= &dm81xx_l4_ls_hwmod,
1644d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1654d38bd12STony Lindgren };
1664d38bd12STony Lindgren 
1674d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */
1687e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = {
1697e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_med_hwmod,
1707e1b11d1STony Lindgren 	.slave	= &dm81xx_l4_hs_hwmod,
1714d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1724d38bd12STony Lindgren };
1734d38bd12STony Lindgren 
1744d38bd12STony Lindgren /* MPU */
1750f3ccb24STony Lindgren static struct omap_hwmod dm814x_mpu_hwmod = {
1760f3ccb24STony Lindgren 	.name		= "mpu",
1770f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1780f3ccb24STony Lindgren 	.class		= &mpu_hwmod_class,
1790f3ccb24STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
1800f3ccb24STony Lindgren 	.main_clk	= "mpu_ck",
1810f3ccb24STony Lindgren 	.prcm		= {
1820f3ccb24STony Lindgren 		.omap4 = {
1830f3ccb24STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL,
1840f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1850f3ccb24STony Lindgren 		},
1860f3ccb24STony Lindgren 	},
1870f3ccb24STony Lindgren };
1880f3ccb24STony Lindgren 
1890f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = {
1900f3ccb24STony Lindgren 	.master		= &dm814x_mpu_hwmod,
1910f3ccb24STony Lindgren 	.slave		= &dm81xx_alwon_l3_slow_hwmod,
1920f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
1930f3ccb24STony Lindgren };
1940f3ccb24STony Lindgren 
1950f3ccb24STony Lindgren /* L3 med peripheral interface running at 200MHz */
1960f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = {
1970f3ccb24STony Lindgren 	.master	= &dm814x_mpu_hwmod,
1980f3ccb24STony Lindgren 	.slave	= &dm81xx_alwon_l3_med_hwmod,
1990f3ccb24STony Lindgren 	.user	= OCP_USER_MPU,
2000f3ccb24STony Lindgren };
2010f3ccb24STony Lindgren 
2024d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = {
2034d38bd12STony Lindgren 	.name		= "mpu",
2044d38bd12STony Lindgren 	.clkdm_name	= "alwon_mpu_clkdm",
2054d38bd12STony Lindgren 	.class		= &mpu_hwmod_class,
2064d38bd12STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
2074d38bd12STony Lindgren 	.main_clk	= "mpu_ck",
2084d38bd12STony Lindgren 	.prcm		= {
2094d38bd12STony Lindgren 		.omap4 = {
2104d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
2114d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2124d38bd12STony Lindgren 		},
2134d38bd12STony Lindgren 	},
2144d38bd12STony Lindgren };
2154d38bd12STony Lindgren 
2164d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
2174d38bd12STony Lindgren 	.master		= &dm816x_mpu_hwmod,
2187e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_slow_hwmod,
2194d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2204d38bd12STony Lindgren };
2214d38bd12STony Lindgren 
2224d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */
2234d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
2244d38bd12STony Lindgren 	.master	= &dm816x_mpu_hwmod,
2257e1b11d1STony Lindgren 	.slave	= &dm81xx_alwon_l3_med_hwmod,
2264d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
2274d38bd12STony Lindgren };
2284d38bd12STony Lindgren 
2294d38bd12STony Lindgren /* UART common */
2304d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = {
2314d38bd12STony Lindgren 	.rev_offs	= 0x50,
2324d38bd12STony Lindgren 	.sysc_offs	= 0x54,
2334d38bd12STony Lindgren 	.syss_offs	= 0x58,
2344d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
2354d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
2364d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2374d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2384d38bd12STony Lindgren 				MSTANDBY_SMART_WKUP,
2394d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2404d38bd12STony Lindgren };
2414d38bd12STony Lindgren 
2424d38bd12STony Lindgren static struct omap_hwmod_class uart_class = {
2434d38bd12STony Lindgren 	.name = "uart",
2444d38bd12STony Lindgren 	.sysc = &uart_sysc,
2454d38bd12STony Lindgren };
2464d38bd12STony Lindgren 
2477e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = {
2484d38bd12STony Lindgren 	.name		= "uart1",
2494d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2504d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2514d38bd12STony Lindgren 	.prcm		= {
2524d38bd12STony Lindgren 		.omap4 = {
2537e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
2544d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2554d38bd12STony Lindgren 		},
2564d38bd12STony Lindgren 	},
2574d38bd12STony Lindgren 	.class		= &uart_class,
2584d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART1_FLAGS,
2594d38bd12STony Lindgren };
2604d38bd12STony Lindgren 
2617e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
2627e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
2637e1b11d1STony Lindgren 	.slave		= &dm81xx_uart1_hwmod,
2644d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2654d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2664d38bd12STony Lindgren };
2674d38bd12STony Lindgren 
2687e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = {
2694d38bd12STony Lindgren 	.name		= "uart2",
2704d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2714d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2724d38bd12STony Lindgren 	.prcm		= {
2734d38bd12STony Lindgren 		.omap4 = {
2747e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
2754d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2764d38bd12STony Lindgren 		},
2774d38bd12STony Lindgren 	},
2784d38bd12STony Lindgren 	.class		= &uart_class,
2794d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART2_FLAGS,
2804d38bd12STony Lindgren };
2814d38bd12STony Lindgren 
2827e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
2837e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
2847e1b11d1STony Lindgren 	.slave		= &dm81xx_uart2_hwmod,
2854d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2864d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2874d38bd12STony Lindgren };
2884d38bd12STony Lindgren 
2897e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = {
2904d38bd12STony Lindgren 	.name		= "uart3",
2914d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2924d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2934d38bd12STony Lindgren 	.prcm		= {
2944d38bd12STony Lindgren 		.omap4 = {
2957e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
2964d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2974d38bd12STony Lindgren 		},
2984d38bd12STony Lindgren 	},
2994d38bd12STony Lindgren 	.class		= &uart_class,
3004d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART3_FLAGS,
3014d38bd12STony Lindgren };
3024d38bd12STony Lindgren 
3037e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
3047e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3057e1b11d1STony Lindgren 	.slave		= &dm81xx_uart3_hwmod,
3064d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3074d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3084d38bd12STony Lindgren };
3094d38bd12STony Lindgren 
3104d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
3114d38bd12STony Lindgren 	.rev_offs	= 0x0,
3124d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3134d38bd12STony Lindgren 	.syss_offs	= 0x14,
3144d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
3154d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3164d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3174d38bd12STony Lindgren };
3184d38bd12STony Lindgren 
3194d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = {
3204d38bd12STony Lindgren 	.name		= "wd_timer",
3214d38bd12STony Lindgren 	.sysc		= &wd_timer_sysc,
3224d38bd12STony Lindgren 	.pre_shutdown	= &omap2_wd_timer_disable,
3234d38bd12STony Lindgren 	.reset		= &omap2_wd_timer_reset,
3244d38bd12STony Lindgren };
3254d38bd12STony Lindgren 
3267e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = {
3274d38bd12STony Lindgren 	.name		= "wd_timer",
3284d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3294d38bd12STony Lindgren 	.main_clk	= "sysclk18_ck",
3304d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
3314d38bd12STony Lindgren 	.prcm		= {
3324d38bd12STony Lindgren 		.omap4 = {
3337e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
3344d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3354d38bd12STony Lindgren 		},
3364d38bd12STony Lindgren 	},
3374d38bd12STony Lindgren 	.class		= &wd_timer_class,
3384d38bd12STony Lindgren };
3394d38bd12STony Lindgren 
3407e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
3417e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3427e1b11d1STony Lindgren 	.slave		= &dm81xx_wd_timer_hwmod,
3434d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3444d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3454d38bd12STony Lindgren };
3464d38bd12STony Lindgren 
3474d38bd12STony Lindgren /* I2C common */
3484d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = {
3494d38bd12STony Lindgren 	.rev_offs	= 0x0,
3504d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3514d38bd12STony Lindgren 	.syss_offs	= 0x90,
3524d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE |
3534d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3544d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE,
3554d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3564d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3574d38bd12STony Lindgren };
3584d38bd12STony Lindgren 
3594d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = {
3604d38bd12STony Lindgren 	.name = "i2c",
3614d38bd12STony Lindgren 	.sysc = &i2c_sysc,
3624d38bd12STony Lindgren };
3634d38bd12STony Lindgren 
3644d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = {
3654d38bd12STony Lindgren 	.name		= "i2c1",
3664d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3674d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3684d38bd12STony Lindgren 	.prcm		= {
3694d38bd12STony Lindgren 		.omap4 = {
3707e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
3714d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3724d38bd12STony Lindgren 		},
3734d38bd12STony Lindgren 	},
3744d38bd12STony Lindgren 	.class		= &i2c_class,
3754d38bd12STony Lindgren };
3764d38bd12STony Lindgren 
3777e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
3787e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3794d38bd12STony Lindgren 	.slave		= &dm81xx_i2c1_hwmod,
3804d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3814d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3824d38bd12STony Lindgren };
3834d38bd12STony Lindgren 
3847e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = {
3854d38bd12STony Lindgren 	.name		= "i2c2",
3864d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3874d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3884d38bd12STony Lindgren 	.prcm		= {
3894d38bd12STony Lindgren 		.omap4 = {
3907e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
3914d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3924d38bd12STony Lindgren 		},
3934d38bd12STony Lindgren 	},
3944d38bd12STony Lindgren 	.class		= &i2c_class,
3954d38bd12STony Lindgren };
3964d38bd12STony Lindgren 
3974d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
3984d38bd12STony Lindgren 	.rev_offs	= 0x0000,
3994d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4004d38bd12STony Lindgren 	.syss_offs	= 0x0014,
4014d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
4024d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET |
4034d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4044d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
4054d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4064d38bd12STony Lindgren };
4074d38bd12STony Lindgren 
4087e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
4097e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4107e1b11d1STony Lindgren 	.slave		= &dm81xx_i2c2_hwmod,
4114d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
4124d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4134d38bd12STony Lindgren };
4144d38bd12STony Lindgren 
4154d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
4164d38bd12STony Lindgren 	.name = "elm",
4174d38bd12STony Lindgren 	.sysc = &dm81xx_elm_sysc,
4184d38bd12STony Lindgren };
4194d38bd12STony Lindgren 
4204d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = {
4214d38bd12STony Lindgren 	.name		= "elm",
4224d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4234d38bd12STony Lindgren 	.class		= &dm81xx_elm_hwmod_class,
4244d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4254d38bd12STony Lindgren };
4264d38bd12STony Lindgren 
4274d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
4287e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4294d38bd12STony Lindgren 	.slave		= &dm81xx_elm_hwmod,
4304d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4314d38bd12STony Lindgren };
4324d38bd12STony Lindgren 
4334d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
4344d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4354d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4364d38bd12STony Lindgren 	.syss_offs	= 0x0114,
4374d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4384d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4394d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4404d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4414d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
4424d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4434d38bd12STony Lindgren };
4444d38bd12STony Lindgren 
4454d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
4464d38bd12STony Lindgren 	.name	= "gpio",
4474d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4484d38bd12STony Lindgren 	.rev	= 2,
4494d38bd12STony Lindgren };
4504d38bd12STony Lindgren 
4514d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = {
4524d38bd12STony Lindgren 	.bank_width	= 32,
4534d38bd12STony Lindgren 	.dbck_flag	= true,
4544d38bd12STony Lindgren };
4554d38bd12STony Lindgren 
4564d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4574d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4584d38bd12STony Lindgren };
4594d38bd12STony Lindgren 
4604d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4614d38bd12STony Lindgren 	.name		= "gpio1",
4624d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4634d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4644d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4654d38bd12STony Lindgren 	.prcm = {
4664d38bd12STony Lindgren 		.omap4 = {
4677e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
4684d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4694d38bd12STony Lindgren 		},
4704d38bd12STony Lindgren 	},
4714d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
4724d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
4734d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4744d38bd12STony Lindgren };
4754d38bd12STony Lindgren 
4764d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
4777e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4784d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
4794d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4804d38bd12STony Lindgren };
4814d38bd12STony Lindgren 
4824d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
4834d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4844d38bd12STony Lindgren };
4854d38bd12STony Lindgren 
4864d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
4874d38bd12STony Lindgren 	.name		= "gpio2",
4884d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4894d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4904d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4914d38bd12STony Lindgren 	.prcm = {
4924d38bd12STony Lindgren 		.omap4 = {
4937e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
4944d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4954d38bd12STony Lindgren 		},
4964d38bd12STony Lindgren 	},
4974d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
4984d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
4994d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
5004d38bd12STony Lindgren };
5014d38bd12STony Lindgren 
5024d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
5037e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5044d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
5054d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5064d38bd12STony Lindgren };
5074d38bd12STony Lindgren 
5084d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
5094d38bd12STony Lindgren 	.rev_offs	= 0x0,
5104d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5114d38bd12STony Lindgren 	.syss_offs	= 0x14,
5124d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
5134d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
5144d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
5154d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
5164d38bd12STony Lindgren };
5174d38bd12STony Lindgren 
5184d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
5194d38bd12STony Lindgren 	.name	= "gpmc",
5204d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
5214d38bd12STony Lindgren };
5224d38bd12STony Lindgren 
5234d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
5244d38bd12STony Lindgren 	.name		= "gpmc",
5254d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5264d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
5274d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
52863aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
52963aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
5304d38bd12STony Lindgren 	.prcm = {
5314d38bd12STony Lindgren 		.omap4 = {
5327e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
5334d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5344d38bd12STony Lindgren 		},
5354d38bd12STony Lindgren 	},
5364d38bd12STony Lindgren };
5374d38bd12STony Lindgren 
538f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
5397e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_slow_hwmod,
5404d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
5414d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5424d38bd12STony Lindgren };
5434d38bd12STony Lindgren 
5444d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
5454d38bd12STony Lindgren 	.rev_offs	= 0x0,
5464d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5474d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5484d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5494d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5504d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5514d38bd12STony Lindgren };
5524d38bd12STony Lindgren 
5534d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5544d38bd12STony Lindgren 	.name = "usbotg",
5554d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5564d38bd12STony Lindgren };
5574d38bd12STony Lindgren 
558*f53850b5STony Lindgren static struct omap_hwmod dm814x_usbss_hwmod = {
5594d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5604d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
561*f53850b5STony Lindgren 	.main_clk	= "pll260dcoclkldo",	/* 481c5260.adpll.dcoclkldo */
5624d38bd12STony Lindgren 	.prcm		= {
5634d38bd12STony Lindgren 		.omap4 = {
564*f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
5654d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5664d38bd12STony Lindgren 		},
5674d38bd12STony Lindgren 	},
5684d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
5694d38bd12STony Lindgren };
5704d38bd12STony Lindgren 
571*f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = {
5727e1b11d1STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
573*f53850b5STony Lindgren 	.slave		= &dm814x_usbss_hwmod,
574*f53850b5STony Lindgren 	.clk		= "sysclk6_ck",
575*f53850b5STony Lindgren 	.user		= OCP_USER_MPU,
576*f53850b5STony Lindgren };
577*f53850b5STony Lindgren 
578*f53850b5STony Lindgren static struct omap_hwmod dm816x_usbss_hwmod = {
579*f53850b5STony Lindgren 	.name		= "usb_otg_hs",
580*f53850b5STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
581*f53850b5STony Lindgren 	.main_clk	= "sysclk6_ck",
582*f53850b5STony Lindgren 	.prcm		= {
583*f53850b5STony Lindgren 		.omap4 = {
584*f53850b5STony Lindgren 			.clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
585*f53850b5STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
586*f53850b5STony Lindgren 		},
587*f53850b5STony Lindgren 	},
588*f53850b5STony Lindgren 	.class		= &dm81xx_usbotg_class,
589*f53850b5STony Lindgren };
590*f53850b5STony Lindgren 
591*f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = {
592*f53850b5STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
593*f53850b5STony Lindgren 	.slave		= &dm816x_usbss_hwmod,
5944d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5954d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5964d38bd12STony Lindgren };
5974d38bd12STony Lindgren 
5984d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
5994d38bd12STony Lindgren 	.rev_offs	= 0x0000,
6004d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
6014d38bd12STony Lindgren 	.syss_offs	= 0x0014,
6024d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
6034d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
6044d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
6054d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
6064d38bd12STony Lindgren };
6074d38bd12STony Lindgren 
6084d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
6094d38bd12STony Lindgren 	.name = "timer",
6104d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
6114d38bd12STony Lindgren };
6124d38bd12STony Lindgren 
6134d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
6144d38bd12STony Lindgren 	.timer_capability	= OMAP_TIMER_ALWON,
6154d38bd12STony Lindgren };
6164d38bd12STony Lindgren 
6170f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = {
6180f3ccb24STony Lindgren 	.name		= "timer1",
6190f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6200f3ccb24STony Lindgren 	.main_clk	= "timer_sys_ck",
6210f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6220f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6230f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6240f3ccb24STony Lindgren };
6250f3ccb24STony Lindgren 
6260f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
6270f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6280f3ccb24STony Lindgren 	.slave		= &dm814x_timer1_hwmod,
6290f3ccb24STony Lindgren 	.clk		= "timer_sys_ck",
6300f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6310f3ccb24STony Lindgren };
6320f3ccb24STony Lindgren 
6334d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
6344d38bd12STony Lindgren 	.name		= "timer1",
6354d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6364d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
6374d38bd12STony Lindgren 	.prcm		= {
6384d38bd12STony Lindgren 		.omap4 = {
6394d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
6404d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6414d38bd12STony Lindgren 		},
6424d38bd12STony Lindgren 	},
6434d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6444d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6454d38bd12STony Lindgren };
6464d38bd12STony Lindgren 
6474d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
6487e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6494d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
6504d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6514d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6524d38bd12STony Lindgren };
6534d38bd12STony Lindgren 
6540f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = {
6550f3ccb24STony Lindgren 	.name		= "timer2",
6560f3ccb24STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6570f3ccb24STony Lindgren 	.main_clk	= "timer_sys_ck",
6580f3ccb24STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6590f3ccb24STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6600f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
6610f3ccb24STony Lindgren };
6620f3ccb24STony Lindgren 
6630f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
6640f3ccb24STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6650f3ccb24STony Lindgren 	.slave		= &dm814x_timer2_hwmod,
6660f3ccb24STony Lindgren 	.clk		= "timer_sys_ck",
6670f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
6680f3ccb24STony Lindgren };
6690f3ccb24STony Lindgren 
6704d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
6714d38bd12STony Lindgren 	.name		= "timer2",
6724d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6734d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
6744d38bd12STony Lindgren 	.prcm		= {
6754d38bd12STony Lindgren 		.omap4 = {
6764d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
6774d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6784d38bd12STony Lindgren 		},
6794d38bd12STony Lindgren 	},
6804d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6814d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6824d38bd12STony Lindgren };
6834d38bd12STony Lindgren 
6844d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
6857e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6864d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
6874d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6884d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6894d38bd12STony Lindgren };
6904d38bd12STony Lindgren 
6914d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
6924d38bd12STony Lindgren 	.name		= "timer3",
6934d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6944d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
6954d38bd12STony Lindgren 	.prcm		= {
6964d38bd12STony Lindgren 		.omap4 = {
6974d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
6984d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6994d38bd12STony Lindgren 		},
7004d38bd12STony Lindgren 	},
7014d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7024d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7034d38bd12STony Lindgren };
7044d38bd12STony Lindgren 
7054d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
7067e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7074d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
7084d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7094d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7104d38bd12STony Lindgren };
7114d38bd12STony Lindgren 
7124d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
7134d38bd12STony Lindgren 	.name		= "timer4",
7144d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7154d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
7164d38bd12STony Lindgren 	.prcm		= {
7174d38bd12STony Lindgren 		.omap4 = {
7184d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
7194d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7204d38bd12STony Lindgren 		},
7214d38bd12STony Lindgren 	},
7224d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7234d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7244d38bd12STony Lindgren };
7254d38bd12STony Lindgren 
7264d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
7277e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7284d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
7294d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7304d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7314d38bd12STony Lindgren };
7324d38bd12STony Lindgren 
7334d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
7344d38bd12STony Lindgren 	.name		= "timer5",
7354d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7364d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
7374d38bd12STony Lindgren 	.prcm		= {
7384d38bd12STony Lindgren 		.omap4 = {
7394d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
7404d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7414d38bd12STony Lindgren 		},
7424d38bd12STony Lindgren 	},
7434d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7444d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7454d38bd12STony Lindgren };
7464d38bd12STony Lindgren 
7474d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
7487e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7494d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
7504d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7514d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7524d38bd12STony Lindgren };
7534d38bd12STony Lindgren 
7544d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
7554d38bd12STony Lindgren 	.name		= "timer6",
7564d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7574d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
7584d38bd12STony Lindgren 	.prcm		= {
7594d38bd12STony Lindgren 		.omap4 = {
7604d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
7614d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7624d38bd12STony Lindgren 		},
7634d38bd12STony Lindgren 	},
7644d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7654d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7664d38bd12STony Lindgren };
7674d38bd12STony Lindgren 
7684d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
7697e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7704d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
7714d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7724d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7734d38bd12STony Lindgren };
7744d38bd12STony Lindgren 
7754d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
7764d38bd12STony Lindgren 	.name		= "timer7",
7774d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
7784d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
7794d38bd12STony Lindgren 	.prcm		= {
7804d38bd12STony Lindgren 		.omap4 = {
7814d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
7824d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7834d38bd12STony Lindgren 		},
7844d38bd12STony Lindgren 	},
7854d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7864d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7874d38bd12STony Lindgren };
7884d38bd12STony Lindgren 
7894d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
7907e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7914d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
7924d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7934d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7944d38bd12STony Lindgren };
7954d38bd12STony Lindgren 
7960f3ccb24STony Lindgren /* CPSW on dm814x */
7970f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
7980f3ccb24STony Lindgren 	.rev_offs	= 0x0,
7990f3ccb24STony Lindgren 	.sysc_offs	= 0x8,
8000f3ccb24STony Lindgren 	.syss_offs	= 0x4,
8010f3ccb24STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
8020f3ccb24STony Lindgren 			  SYSS_HAS_RESET_STATUS,
8030f3ccb24STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
8040f3ccb24STony Lindgren 			  MSTANDBY_NO,
8050f3ccb24STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type3,
8060f3ccb24STony Lindgren };
8070f3ccb24STony Lindgren 
8080f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
8090f3ccb24STony Lindgren 	.name		= "cpgmac0",
8100f3ccb24STony Lindgren 	.sysc		= &dm814x_cpgmac_sysc,
8110f3ccb24STony Lindgren };
8120f3ccb24STony Lindgren 
81324da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = {
8140f3ccb24STony Lindgren 	.name		= "cpgmac0",
8150f3ccb24STony Lindgren 	.class		= &dm814x_cpgmac0_hwmod_class,
8160f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8170f3ccb24STony Lindgren 	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
8180f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8190f3ccb24STony Lindgren 	.prcm		= {
8200f3ccb24STony Lindgren 		.omap4	= {
8210f3ccb24STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
8220f3ccb24STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8230f3ccb24STony Lindgren 		},
8240f3ccb24STony Lindgren 	},
8250f3ccb24STony Lindgren };
8260f3ccb24STony Lindgren 
8270f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
8280f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8290f3ccb24STony Lindgren };
8300f3ccb24STony Lindgren 
83124da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = {
8320f3ccb24STony Lindgren 	.name		= "davinci_mdio",
8330f3ccb24STony Lindgren 	.class		= &dm814x_mdio_hwmod_class,
8340f3ccb24STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8350f3ccb24STony Lindgren 	.main_clk	= "cpsw_125mhz_gclk",
8360f3ccb24STony Lindgren };
8370f3ccb24STony Lindgren 
8380f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
8390f3ccb24STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8400f3ccb24STony Lindgren 	.slave		= &dm814x_cpgmac0_hwmod,
8410f3ccb24STony Lindgren 	.clk		= "cpsw_125mhz_gclk",
8420f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8430f3ccb24STony Lindgren };
8440f3ccb24STony Lindgren 
84524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
8460f3ccb24STony Lindgren 	.master		= &dm814x_cpgmac0_hwmod,
8470f3ccb24STony Lindgren 	.slave		= &dm814x_mdio_hwmod,
8480f3ccb24STony Lindgren 	.user		= OCP_USER_MPU,
8490f3ccb24STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8500f3ccb24STony Lindgren };
8510f3ccb24STony Lindgren 
8524d38bd12STony Lindgren /* EMAC Ethernet */
8534d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
8544d38bd12STony Lindgren 	.rev_offs	= 0x0,
8554d38bd12STony Lindgren 	.sysc_offs	= 0x4,
8564d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
8574d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
8584d38bd12STony Lindgren };
8594d38bd12STony Lindgren 
8604d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
8614d38bd12STony Lindgren 	.name		= "emac",
8624d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8634d38bd12STony Lindgren };
8644d38bd12STony Lindgren 
8654d38bd12STony Lindgren /*
8664d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
8674d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
8684d38bd12STony Lindgren  */
8694d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
8704d38bd12STony Lindgren 	.name		= "emac0",
8714d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8724d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
8734d38bd12STony Lindgren };
8744d38bd12STony Lindgren 
8757e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
8767e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
8774d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
8784d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
8794d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8804d38bd12STony Lindgren };
8814d38bd12STony Lindgren 
8827e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
8834d38bd12STony Lindgren 	.name		= "davinci_mdio",
8844d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
8854d38bd12STony Lindgren };
8864d38bd12STony Lindgren 
88724da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
8884d38bd12STony Lindgren 	.name		= "davinci_mdio",
8897e1b11d1STony Lindgren 	.class		= &dm81xx_mdio_hwmod_class,
8904d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
8914d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
8924d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
8934d38bd12STony Lindgren 	/*
8944d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
8954d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
8964d38bd12STony Lindgren 	 */
8974d38bd12STony Lindgren 	.prcm		= {
8984d38bd12STony Lindgren 		.omap4 = {
8997e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
9004d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9014d38bd12STony Lindgren 		},
9024d38bd12STony Lindgren 	},
9034d38bd12STony Lindgren };
9044d38bd12STony Lindgren 
90524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
9067e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9077e1b11d1STony Lindgren 	.slave		= &dm81xx_emac0_mdio_hwmod,
9084d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9094d38bd12STony Lindgren };
9104d38bd12STony Lindgren 
9114d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
9124d38bd12STony Lindgren 	.name		= "emac1",
9134d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
9144d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
9154d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
9164d38bd12STony Lindgren 	.prcm		= {
9174d38bd12STony Lindgren 		.omap4 = {
9184d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
9194d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9204d38bd12STony Lindgren 		},
9214d38bd12STony Lindgren 	},
9224d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
9234d38bd12STony Lindgren };
9244d38bd12STony Lindgren 
9254d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
9267e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
9274d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
9284d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
9294d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9304d38bd12STony Lindgren };
9314d38bd12STony Lindgren 
932c757fda8STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = {
9334d38bd12STony Lindgren 	.rev_offs	= 0x0,
9344d38bd12STony Lindgren 	.sysc_offs	= 0x110,
9354d38bd12STony Lindgren 	.syss_offs	= 0x114,
9364d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
9374d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
9384d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
9394d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
9404d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
9414d38bd12STony Lindgren };
9424d38bd12STony Lindgren 
943c757fda8STony Lindgren static struct omap_hwmod_class dm81xx_mmc_class = {
9444d38bd12STony Lindgren 	.name = "mmc",
945c757fda8STony Lindgren 	.sysc = &dm81xx_mmc_sysc,
9464d38bd12STony Lindgren };
9474d38bd12STony Lindgren 
948c757fda8STony Lindgren static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = {
9494d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
9504d38bd12STony Lindgren };
9514d38bd12STony Lindgren 
952c757fda8STony Lindgren static struct omap_hsmmc_dev_attr mmc_dev_attr = {
953c757fda8STony Lindgren };
954c757fda8STony Lindgren 
955c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc1_hwmod = {
956c757fda8STony Lindgren 	.name		= "mmc1",
957c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
958c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
959c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
960c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
961c757fda8STony Lindgren 	.prcm		= {
962c757fda8STony Lindgren 		.omap4 = {
963c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL,
964c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
965c757fda8STony Lindgren 		},
966c757fda8STony Lindgren 	},
967c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
968c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
969c757fda8STony Lindgren };
970c757fda8STony Lindgren 
971c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = {
972c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
973c757fda8STony Lindgren 	.slave		= &dm814x_mmc1_hwmod,
974c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
975c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
976c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
977c757fda8STony Lindgren };
978c757fda8STony Lindgren 
979c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc2_hwmod = {
980c757fda8STony Lindgren 	.name		= "mmc2",
981c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
982c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
983c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
984c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
985c757fda8STony Lindgren 	.prcm		= {
986c757fda8STony Lindgren 		.omap4 = {
987c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL,
988c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
989c757fda8STony Lindgren 		},
990c757fda8STony Lindgren 	},
991c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
992c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
993c757fda8STony Lindgren };
994c757fda8STony Lindgren 
995c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = {
996c757fda8STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
997c757fda8STony Lindgren 	.slave		= &dm814x_mmc2_hwmod,
998c757fda8STony Lindgren 	.clk		= "sysclk6_ck",
999c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
1000c757fda8STony Lindgren 	.flags		= OMAP_FIREWALL_L4
1001c757fda8STony Lindgren };
1002c757fda8STony Lindgren 
1003c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc3_hwmod = {
1004c757fda8STony Lindgren 	.name		= "mmc3",
1005c757fda8STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1006c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1007c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
1008c757fda8STony Lindgren 	.main_clk	= "sysclk8_ck",
1009c757fda8STony Lindgren 	.prcm		= {
1010c757fda8STony Lindgren 		.omap4 = {
1011c757fda8STony Lindgren 			.clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL,
1012c757fda8STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1013c757fda8STony Lindgren 		},
1014c757fda8STony Lindgren 	},
1015c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1016c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
1017c757fda8STony Lindgren };
1018c757fda8STony Lindgren 
1019c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = {
1020c757fda8STony Lindgren 	.master		= &dm81xx_alwon_l3_med_hwmod,
1021c757fda8STony Lindgren 	.slave		= &dm814x_mmc3_hwmod,
1022c757fda8STony Lindgren 	.clk		= "sysclk4_ck",
1023c757fda8STony Lindgren 	.user		= OCP_USER_MPU,
10244d38bd12STony Lindgren };
10254d38bd12STony Lindgren 
10264d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
10274d38bd12STony Lindgren 	.name		= "mmc1",
10284d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1029c757fda8STony Lindgren 	.opt_clks	= dm81xx_mmc_opt_clks,
1030c757fda8STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm81xx_mmc_opt_clks),
10314d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
10324d38bd12STony Lindgren 	.prcm		= {
10334d38bd12STony Lindgren 		.omap4 = {
10344d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
10354d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10364d38bd12STony Lindgren 		},
10374d38bd12STony Lindgren 	},
1038c757fda8STony Lindgren 	.dev_attr	= &mmc_dev_attr,
1039c757fda8STony Lindgren 	.class		= &dm81xx_mmc_class,
10404d38bd12STony Lindgren };
10414d38bd12STony Lindgren 
10424d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
10437e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10444d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
10454d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
10464d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10474d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
10484d38bd12STony Lindgren };
10494d38bd12STony Lindgren 
10504d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
10514d38bd12STony Lindgren 	.rev_offs	= 0x0,
10524d38bd12STony Lindgren 	.sysc_offs	= 0x110,
10534d38bd12STony Lindgren 	.syss_offs	= 0x114,
10544d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
10554d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
10564d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
10574d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
10584d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
10594d38bd12STony Lindgren };
10604d38bd12STony Lindgren 
10614d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
10624d38bd12STony Lindgren 	.name = "mcspi",
10634d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
10644d38bd12STony Lindgren 	.rev = OMAP3_MCSPI_REV,
10654d38bd12STony Lindgren };
10664d38bd12STony Lindgren 
10674d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
10684d38bd12STony Lindgren 	.num_chipselect = 4,
10694d38bd12STony Lindgren };
10704d38bd12STony Lindgren 
10717e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = {
10724d38bd12STony Lindgren 	.name		= "mcspi1",
10734d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10744d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
10754d38bd12STony Lindgren 	.prcm		= {
10764d38bd12STony Lindgren 		.omap4 = {
10777e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
10784d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
10794d38bd12STony Lindgren 		},
10804d38bd12STony Lindgren 	},
10814d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
10824d38bd12STony Lindgren 	.dev_attr	= &dm816x_mcspi1_dev_attr,
10834d38bd12STony Lindgren };
10844d38bd12STony Lindgren 
10857e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
10867e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
10877e1b11d1STony Lindgren 	.slave		= &dm81xx_mcspi1_hwmod,
10884d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
10894d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10904d38bd12STony Lindgren };
10914d38bd12STony Lindgren 
10927e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
10934d38bd12STony Lindgren 	.rev_offs	= 0x000,
10944d38bd12STony Lindgren 	.sysc_offs	= 0x010,
10954d38bd12STony Lindgren 	.syss_offs	= 0x014,
10964d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
10974d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
10984d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
10994d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
11004d38bd12STony Lindgren };
11014d38bd12STony Lindgren 
11027e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
11034d38bd12STony Lindgren 	.name = "mailbox",
11047e1b11d1STony Lindgren 	.sysc = &dm81xx_mailbox_sysc,
11054d38bd12STony Lindgren };
11064d38bd12STony Lindgren 
11077e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = {
11084d38bd12STony Lindgren 	.name		= "mailbox",
11094d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11107e1b11d1STony Lindgren 	.class		= &dm81xx_mailbox_hwmod_class,
11114d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
11124d38bd12STony Lindgren 	.prcm		= {
11134d38bd12STony Lindgren 		.omap4 = {
11147e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
11154d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
11164d38bd12STony Lindgren 		},
11174d38bd12STony Lindgren 	},
11184d38bd12STony Lindgren };
11194d38bd12STony Lindgren 
11207e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
11217e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
11227e1b11d1STony Lindgren 	.slave		= &dm81xx_mailbox_hwmod,
11234d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11244d38bd12STony Lindgren };
11254d38bd12STony Lindgren 
11261539569bSNeil Armstrong static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
11271539569bSNeil Armstrong 	.rev_offs	= 0x000,
11281539569bSNeil Armstrong 	.sysc_offs	= 0x010,
11291539569bSNeil Armstrong 	.syss_offs	= 0x014,
11301539569bSNeil Armstrong 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
11311539569bSNeil Armstrong 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
11321539569bSNeil Armstrong 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
11331539569bSNeil Armstrong 	.sysc_fields	= &omap_hwmod_sysc_type1,
11341539569bSNeil Armstrong };
11351539569bSNeil Armstrong 
11361539569bSNeil Armstrong static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
11371539569bSNeil Armstrong 	.name = "spinbox",
11381539569bSNeil Armstrong 	.sysc = &dm81xx_spinbox_sysc,
11391539569bSNeil Armstrong };
11401539569bSNeil Armstrong 
11411539569bSNeil Armstrong static struct omap_hwmod dm81xx_spinbox_hwmod = {
11421539569bSNeil Armstrong 	.name		= "spinbox",
11431539569bSNeil Armstrong 	.clkdm_name	= "alwon_l3s_clkdm",
11441539569bSNeil Armstrong 	.class		= &dm81xx_spinbox_hwmod_class,
11451539569bSNeil Armstrong 	.main_clk	= "sysclk6_ck",
11461539569bSNeil Armstrong 	.prcm		= {
11471539569bSNeil Armstrong 		.omap4 = {
11481539569bSNeil Armstrong 			.clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
11491539569bSNeil Armstrong 			.modulemode = MODULEMODE_SWCTRL,
11501539569bSNeil Armstrong 		},
11511539569bSNeil Armstrong 	},
11521539569bSNeil Armstrong };
11531539569bSNeil Armstrong 
11541539569bSNeil Armstrong static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
11551539569bSNeil Armstrong 	.master		= &dm81xx_l4_ls_hwmod,
11561539569bSNeil Armstrong 	.slave		= &dm81xx_spinbox_hwmod,
11571539569bSNeil Armstrong 	.user		= OCP_USER_MPU,
11581539569bSNeil Armstrong };
11591539569bSNeil Armstrong 
11607e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
11614d38bd12STony Lindgren 	.name		= "tpcc",
11624d38bd12STony Lindgren };
11634d38bd12STony Lindgren 
116424da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = {
11654d38bd12STony Lindgren 	.name		= "tpcc",
11667e1b11d1STony Lindgren 	.class		= &dm81xx_tpcc_hwmod_class,
11674d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
11684d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
11694d38bd12STony Lindgren 	.prcm		= {
11704d38bd12STony Lindgren 		.omap4	= {
11717e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPCC_CLKCTRL,
11724d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
11734d38bd12STony Lindgren 		},
11744d38bd12STony Lindgren 	},
11754d38bd12STony Lindgren };
11764d38bd12STony Lindgren 
117724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
11787e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
11797e1b11d1STony Lindgren 	.slave		= &dm81xx_tpcc_hwmod,
11804d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
11814d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11824d38bd12STony Lindgren };
11834d38bd12STony Lindgren 
11847e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space[] = {
11854d38bd12STony Lindgren 	{
11864d38bd12STony Lindgren 		.pa_start	= 0x49800000,
11874d38bd12STony Lindgren 		.pa_end		= 0x49800000 + SZ_8K - 1,
11884d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
11894d38bd12STony Lindgren 	},
11904d38bd12STony Lindgren 	{ },
11914d38bd12STony Lindgren };
11924d38bd12STony Lindgren 
11937e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
11944d38bd12STony Lindgren 	.name		= "tptc0",
11954d38bd12STony Lindgren };
11964d38bd12STony Lindgren 
119724da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = {
11984d38bd12STony Lindgren 	.name		= "tptc0",
11997e1b11d1STony Lindgren 	.class		= &dm81xx_tptc0_hwmod_class,
12004d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12014d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12024d38bd12STony Lindgren 	.prcm		= {
12034d38bd12STony Lindgren 		.omap4	= {
12047e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC0_CLKCTRL,
12054d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12064d38bd12STony Lindgren 		},
12074d38bd12STony Lindgren 	},
12084d38bd12STony Lindgren };
12094d38bd12STony Lindgren 
121024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
12117e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12127e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc0_hwmod,
12134d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12147e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
12154d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12164d38bd12STony Lindgren };
12174d38bd12STony Lindgren 
121824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
12197e1b11d1STony Lindgren 	.master		= &dm81xx_tptc0_hwmod,
12207e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12214d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12227e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
12234d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12244d38bd12STony Lindgren };
12254d38bd12STony Lindgren 
12267e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space[] = {
12274d38bd12STony Lindgren 	{
12284d38bd12STony Lindgren 		.pa_start	= 0x49900000,
12294d38bd12STony Lindgren 		.pa_end		= 0x49900000 + SZ_8K - 1,
12304d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
12314d38bd12STony Lindgren 	},
12324d38bd12STony Lindgren 	{ },
12334d38bd12STony Lindgren };
12344d38bd12STony Lindgren 
12357e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
12364d38bd12STony Lindgren 	.name		= "tptc1",
12374d38bd12STony Lindgren };
12384d38bd12STony Lindgren 
123924da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = {
12404d38bd12STony Lindgren 	.name		= "tptc1",
12417e1b11d1STony Lindgren 	.class		= &dm81xx_tptc1_hwmod_class,
12424d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12434d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12444d38bd12STony Lindgren 	.prcm		= {
12454d38bd12STony Lindgren 		.omap4	= {
12467e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC1_CLKCTRL,
12474d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12484d38bd12STony Lindgren 		},
12494d38bd12STony Lindgren 	},
12504d38bd12STony Lindgren };
12514d38bd12STony Lindgren 
125224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
12537e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12547e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc1_hwmod,
12554d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12567e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
12574d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12584d38bd12STony Lindgren };
12594d38bd12STony Lindgren 
126024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
12617e1b11d1STony Lindgren 	.master		= &dm81xx_tptc1_hwmod,
12627e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
12634d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12647e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
12654d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
12664d38bd12STony Lindgren };
12674d38bd12STony Lindgren 
12687e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space[] = {
12694d38bd12STony Lindgren 	{
12704d38bd12STony Lindgren 		.pa_start	= 0x49a00000,
12714d38bd12STony Lindgren 		.pa_end		= 0x49a00000 + SZ_8K - 1,
12724d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
12734d38bd12STony Lindgren 	},
12744d38bd12STony Lindgren 	{ },
12754d38bd12STony Lindgren };
12764d38bd12STony Lindgren 
12777e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
12784d38bd12STony Lindgren 	.name		= "tptc2",
12794d38bd12STony Lindgren };
12804d38bd12STony Lindgren 
128124da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = {
12824d38bd12STony Lindgren 	.name		= "tptc2",
12837e1b11d1STony Lindgren 	.class		= &dm81xx_tptc2_hwmod_class,
12844d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
12854d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
12864d38bd12STony Lindgren 	.prcm		= {
12874d38bd12STony Lindgren 		.omap4	= {
12887e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC2_CLKCTRL,
12894d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
12904d38bd12STony Lindgren 		},
12914d38bd12STony Lindgren 	},
12924d38bd12STony Lindgren };
12934d38bd12STony Lindgren 
129424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
12957e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
12967e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc2_hwmod,
12974d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
12987e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
12994d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13004d38bd12STony Lindgren };
13014d38bd12STony Lindgren 
130224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
13037e1b11d1STony Lindgren 	.master		= &dm81xx_tptc2_hwmod,
13047e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13054d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13067e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
13074d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13084d38bd12STony Lindgren };
13094d38bd12STony Lindgren 
13107e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space[] = {
13114d38bd12STony Lindgren 	{
13124d38bd12STony Lindgren 		.pa_start	= 0x49b00000,
13134d38bd12STony Lindgren 		.pa_end		= 0x49b00000 + SZ_8K - 1,
13144d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
13154d38bd12STony Lindgren 	},
13164d38bd12STony Lindgren 	{ },
13174d38bd12STony Lindgren };
13184d38bd12STony Lindgren 
13197e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
13204d38bd12STony Lindgren 	.name		= "tptc3",
13214d38bd12STony Lindgren };
13224d38bd12STony Lindgren 
132324da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = {
13244d38bd12STony Lindgren 	.name		= "tptc3",
13257e1b11d1STony Lindgren 	.class		= &dm81xx_tptc3_hwmod_class,
13264d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
13274d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
13284d38bd12STony Lindgren 	.prcm		= {
13294d38bd12STony Lindgren 		.omap4	= {
13307e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC3_CLKCTRL,
13314d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
13324d38bd12STony Lindgren 		},
13334d38bd12STony Lindgren 	},
13344d38bd12STony Lindgren };
13354d38bd12STony Lindgren 
133624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
13377e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
13387e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc3_hwmod,
13394d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13407e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
13414d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13424d38bd12STony Lindgren };
13434d38bd12STony Lindgren 
134424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
13457e1b11d1STony Lindgren 	.master		= &dm81xx_tptc3_hwmod,
13467e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
13474d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
13487e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
13494d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
13504d38bd12STony Lindgren };
13514d38bd12STony Lindgren 
13520f3ccb24STony Lindgren /*
13530f3ccb24STony Lindgren  * REVISIT: Test and enable the following once clocks work:
13540f3ccb24STony Lindgren  * dm81xx_l4_ls__gpio1
13550f3ccb24STony Lindgren  * dm81xx_l4_ls__gpio2
13560f3ccb24STony Lindgren  * dm81xx_l4_ls__mailbox
13570f3ccb24STony Lindgren  *
13580f3ccb24STony Lindgren  * Also note that some devices share a single clkctrl_offs..
13590f3ccb24STony Lindgren  * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
13600f3ccb24STony Lindgren  */
13610f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
13620f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_slow,
13630f3ccb24STony Lindgren 	&dm814x_mpu__alwon_l3_med,
13640f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
13650f3ccb24STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
13660f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart1,
13670f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart2,
13680f3ccb24STony Lindgren 	&dm81xx_l4_ls__uart3,
13690f3ccb24STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
13700f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c1,
13710f3ccb24STony Lindgren 	&dm81xx_l4_ls__i2c2,
13720f3ccb24STony Lindgren 	&dm81xx_l4_ls__elm,
13730f3ccb24STony Lindgren 	&dm81xx_l4_ls__mcspi1,
1374c757fda8STony Lindgren 	&dm814x_l4_ls__mmc1,
1375c757fda8STony Lindgren 	&dm814x_l4_ls__mmc2,
13760f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
13770f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
13780f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
13790f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
13800f3ccb24STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
13810f3ccb24STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
13820f3ccb24STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
13830f3ccb24STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
13840f3ccb24STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
13850f3ccb24STony Lindgren 	&dm814x_l4_ls__timer1,
13860f3ccb24STony Lindgren 	&dm814x_l4_ls__timer2,
13870f3ccb24STony Lindgren 	&dm814x_l4_hs__cpgmac0,
13880f3ccb24STony Lindgren 	&dm814x_cpgmac0__mdio,
1389*f53850b5STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1390*f53850b5STony Lindgren 	&dm814x_default_l3_slow__usbss,
1391c757fda8STony Lindgren 	&dm814x_alwon_l3_med__mmc3,
13920f3ccb24STony Lindgren 	NULL,
13930f3ccb24STony Lindgren };
13940f3ccb24STony Lindgren 
13950f3ccb24STony Lindgren int __init dm814x_hwmod_init(void)
13960f3ccb24STony Lindgren {
13970f3ccb24STony Lindgren 	omap_hwmod_init();
13980f3ccb24STony Lindgren 	return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
13990f3ccb24STony Lindgren }
14000f3ccb24STony Lindgren 
14014d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
14024d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
14034d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
14047e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
14057e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
14067e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart1,
14077e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart2,
14087e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart3,
14097e1b11d1STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
14107e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c1,
14117e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c2,
14124d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
14134d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
14144d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
14154d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
14164d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
14174d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
14184d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
14194d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
14204d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
14214d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
14224d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
14237e1b11d1STony Lindgren 	&dm81xx_l4_ls__mcspi1,
14247e1b11d1STony Lindgren 	&dm81xx_l4_ls__mailbox,
14251539569bSNeil Armstrong 	&dm81xx_l4_ls__spinbox,
14267e1b11d1STony Lindgren 	&dm81xx_l4_hs__emac0,
14277e1b11d1STony Lindgren 	&dm81xx_emac0__mdio,
14284d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
14297e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
14307e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
14317e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
14327e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
14337e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
14347e1b11d1STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
14357e1b11d1STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
14367e1b11d1STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
14377e1b11d1STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
14384d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
1439*f53850b5STony Lindgren 	&dm816x_default_l3_slow__usbss,
14404d38bd12STony Lindgren 	NULL,
14414d38bd12STony Lindgren };
14424d38bd12STony Lindgren 
14430f3ccb24STony Lindgren int __init dm816x_hwmod_init(void)
14444d38bd12STony Lindgren {
14454d38bd12STony Lindgren 	omap_hwmod_init();
14464d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
14474d38bd12STony Lindgren }
1448