xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision 7e1b11d145b264fd7e7b4bf79d910272d4a1bd52)
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 /*
35*7e1b11d1STony Lindgren  * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
36*7e1b11d1STony Lindgren  * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
374d38bd12STony Lindgren  */
38*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP0_CLKCTRL		0x140
39*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP1_CLKCTRL		0x144
40*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP2_CLKCTRL		0x148
41*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCBSP_CLKCTRL		0x14c
42*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_0_CLKCTRL		0x150
43*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_1_CLKCTRL		0x154
44*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_2_CLKCTRL		0x158
45*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL		0x15c
46*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL		0x160
47*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_0_CLKCTRL		0x164
48*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_1_CLKCTRL		0x168
49*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL		0x18c
50*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPI_CLKCTRL		0x190
51*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL		0x194
52*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL		0x198
53*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL		0x19c
54*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL		0x1a8
55*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_CONTROL_CLKCTRL		0x1c4
56*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPMC_CLKCTRL		0x1d0
57*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL	0x1d4
58*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L3_CLKCTRL		0x1e4
59*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4HS_CLKCTRL		0x1e8
60*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4LS_CLKCTRL		0x1ec
61*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_RTC_CLKCTRL		0x1f0
62*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPCC_CLKCTRL		0x1f4
63*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC0_CLKCTRL		0x1f8
64*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC1_CLKCTRL		0x1fc
65*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC2_CLKCTRL		0x200
66*7e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC3_CLKCTRL		0x204
67*7e1b11d1STony Lindgren 
68*7e1b11d1STony Lindgren /* Registers specific to dm814x */
69*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL	0x16c
70*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_ATL_CLKCTRL		0x170
71*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MLB_CLKCTRL		0x174
72*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_PATA_CLKCTRL		0x178
73*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_3_CLKCTRL		0x180
74*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_4_CLKCTRL		0x184
75*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_5_CLKCTRL		0x188
76*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_OCM_0_CLKCTRL		0x1b4
77*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_VCP_CLKCTRL		0x1b8
78*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MPU_CLKCTRL		0x1dc
79*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL		0x1e0
80*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL	0x218
81*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL		0x21c
82*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL		0x220
83*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL		0x224
84*7e1b11d1STony Lindgren #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL	0x228
85*7e1b11d1STony Lindgren 
86*7e1b11d1STony Lindgren /* Registers specific to dm816x */
874d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE		0x1400
884d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL	(0x1570 - DM816X_DM_ALWON_BASE)
894d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL	(0x1574 - DM816X_DM_ALWON_BASE)
904d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL	(0x1578 - DM816X_DM_ALWON_BASE)
914d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL	(0x157c - DM816X_DM_ALWON_BASE)
924d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL	(0x1580 - DM816X_DM_ALWON_BASE)
934d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL	(0x1584 - DM816X_DM_ALWON_BASE)
944d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL	(0x1588 - DM816X_DM_ALWON_BASE)
954d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL	(0x15b0 - DM816X_DM_ALWON_BASE)
964d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL	(0x15b4 - DM816X_DM_ALWON_BASE)
974d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL	(0x15b8 - DM816X_DM_ALWON_BASE)
984d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
994d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL	(0x15dc - DM816X_DM_ALWON_BASE)
1004d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL	(0x1608 - DM816X_DM_ALWON_BASE)
1014d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL	(0x160c - DM816X_DM_ALWON_BASE)
1024d38bd12STony Lindgren 
1034d38bd12STony Lindgren /*
1044d38bd12STony Lindgren  * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
1054d38bd12STony Lindgren  * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
1064d38bd12STony Lindgren  */
1074d38bd12STony Lindgren #define DM816X_CM_DEFAULT_OFFSET	0x500
1084d38bd12STony Lindgren #define DM816X_CM_DEFAULT_USB_CLKCTRL	(0x558 - DM816X_CM_DEFAULT_OFFSET)
1094d38bd12STony Lindgren 
1104d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
111*7e1b11d1STony 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 
118*7e1b11d1STony 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 
125*7e1b11d1STony 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 
132*7e1b11d1STony 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  */
143*7e1b11d1STony 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  */
154*7e1b11d1STony 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 */
161*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = {
162*7e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_slow_hwmod,
163*7e1b11d1STony 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 */
168*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = {
169*7e1b11d1STony Lindgren 	.master	= &dm81xx_alwon_l3_med_hwmod,
170*7e1b11d1STony Lindgren 	.slave	= &dm81xx_l4_hs_hwmod,
1714d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1724d38bd12STony Lindgren };
1734d38bd12STony Lindgren 
1744d38bd12STony Lindgren /* MPU */
1754d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = {
1764d38bd12STony Lindgren 	.name		= "mpu",
1774d38bd12STony Lindgren 	.clkdm_name	= "alwon_mpu_clkdm",
1784d38bd12STony Lindgren 	.class		= &mpu_hwmod_class,
1794d38bd12STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
1804d38bd12STony Lindgren 	.main_clk	= "mpu_ck",
1814d38bd12STony Lindgren 	.prcm		= {
1824d38bd12STony Lindgren 		.omap4 = {
1834d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
1844d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1854d38bd12STony Lindgren 		},
1864d38bd12STony Lindgren 	},
1874d38bd12STony Lindgren };
1884d38bd12STony Lindgren 
1894d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
1904d38bd12STony Lindgren 	.master		= &dm816x_mpu_hwmod,
191*7e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_slow_hwmod,
1924d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
1934d38bd12STony Lindgren };
1944d38bd12STony Lindgren 
1954d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */
1964d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
1974d38bd12STony Lindgren 	.master	= &dm816x_mpu_hwmod,
198*7e1b11d1STony Lindgren 	.slave	= &dm81xx_alwon_l3_med_hwmod,
1994d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
2004d38bd12STony Lindgren };
2014d38bd12STony Lindgren 
2024d38bd12STony Lindgren /* UART common */
2034d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = {
2044d38bd12STony Lindgren 	.rev_offs	= 0x50,
2054d38bd12STony Lindgren 	.sysc_offs	= 0x54,
2064d38bd12STony Lindgren 	.syss_offs	= 0x58,
2074d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
2084d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
2094d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2104d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2114d38bd12STony Lindgren 				MSTANDBY_SMART_WKUP,
2124d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2134d38bd12STony Lindgren };
2144d38bd12STony Lindgren 
2154d38bd12STony Lindgren static struct omap_hwmod_class uart_class = {
2164d38bd12STony Lindgren 	.name = "uart",
2174d38bd12STony Lindgren 	.sysc = &uart_sysc,
2184d38bd12STony Lindgren };
2194d38bd12STony Lindgren 
220*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = {
2214d38bd12STony Lindgren 	.name		= "uart1",
2224d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2234d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2244d38bd12STony Lindgren 	.prcm		= {
2254d38bd12STony Lindgren 		.omap4 = {
226*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
2274d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2284d38bd12STony Lindgren 		},
2294d38bd12STony Lindgren 	},
2304d38bd12STony Lindgren 	.class		= &uart_class,
2314d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART1_FLAGS,
2324d38bd12STony Lindgren };
2334d38bd12STony Lindgren 
234*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
235*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
236*7e1b11d1STony Lindgren 	.slave		= &dm81xx_uart1_hwmod,
2374d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2384d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2394d38bd12STony Lindgren };
2404d38bd12STony Lindgren 
241*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = {
2424d38bd12STony Lindgren 	.name		= "uart2",
2434d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2444d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2454d38bd12STony Lindgren 	.prcm		= {
2464d38bd12STony Lindgren 		.omap4 = {
247*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
2484d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2494d38bd12STony Lindgren 		},
2504d38bd12STony Lindgren 	},
2514d38bd12STony Lindgren 	.class		= &uart_class,
2524d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART2_FLAGS,
2534d38bd12STony Lindgren };
2544d38bd12STony Lindgren 
255*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
256*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
257*7e1b11d1STony Lindgren 	.slave		= &dm81xx_uart2_hwmod,
2584d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2594d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2604d38bd12STony Lindgren };
2614d38bd12STony Lindgren 
262*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = {
2634d38bd12STony Lindgren 	.name		= "uart3",
2644d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2654d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2664d38bd12STony Lindgren 	.prcm		= {
2674d38bd12STony Lindgren 		.omap4 = {
268*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
2694d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2704d38bd12STony Lindgren 		},
2714d38bd12STony Lindgren 	},
2724d38bd12STony Lindgren 	.class		= &uart_class,
2734d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART3_FLAGS,
2744d38bd12STony Lindgren };
2754d38bd12STony Lindgren 
276*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
277*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
278*7e1b11d1STony Lindgren 	.slave		= &dm81xx_uart3_hwmod,
2794d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2804d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2814d38bd12STony Lindgren };
2824d38bd12STony Lindgren 
2834d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
2844d38bd12STony Lindgren 	.rev_offs	= 0x0,
2854d38bd12STony Lindgren 	.sysc_offs	= 0x10,
2864d38bd12STony Lindgren 	.syss_offs	= 0x14,
2874d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
2884d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2894d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2904d38bd12STony Lindgren };
2914d38bd12STony Lindgren 
2924d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = {
2934d38bd12STony Lindgren 	.name		= "wd_timer",
2944d38bd12STony Lindgren 	.sysc		= &wd_timer_sysc,
2954d38bd12STony Lindgren 	.pre_shutdown	= &omap2_wd_timer_disable,
2964d38bd12STony Lindgren 	.reset		= &omap2_wd_timer_reset,
2974d38bd12STony Lindgren };
2984d38bd12STony Lindgren 
299*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = {
3004d38bd12STony Lindgren 	.name		= "wd_timer",
3014d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3024d38bd12STony Lindgren 	.main_clk	= "sysclk18_ck",
3034d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
3044d38bd12STony Lindgren 	.prcm		= {
3054d38bd12STony Lindgren 		.omap4 = {
306*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
3074d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3084d38bd12STony Lindgren 		},
3094d38bd12STony Lindgren 	},
3104d38bd12STony Lindgren 	.class		= &wd_timer_class,
3114d38bd12STony Lindgren };
3124d38bd12STony Lindgren 
313*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
314*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
315*7e1b11d1STony Lindgren 	.slave		= &dm81xx_wd_timer_hwmod,
3164d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3174d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3184d38bd12STony Lindgren };
3194d38bd12STony Lindgren 
3204d38bd12STony Lindgren /* I2C common */
3214d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = {
3224d38bd12STony Lindgren 	.rev_offs	= 0x0,
3234d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3244d38bd12STony Lindgren 	.syss_offs	= 0x90,
3254d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE |
3264d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3274d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE,
3284d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3294d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3304d38bd12STony Lindgren };
3314d38bd12STony Lindgren 
3324d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = {
3334d38bd12STony Lindgren 	.name = "i2c",
3344d38bd12STony Lindgren 	.sysc = &i2c_sysc,
3354d38bd12STony Lindgren };
3364d38bd12STony Lindgren 
3374d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = {
3384d38bd12STony Lindgren 	.name		= "i2c1",
3394d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3404d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3414d38bd12STony Lindgren 	.prcm		= {
3424d38bd12STony Lindgren 		.omap4 = {
343*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
3444d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3454d38bd12STony Lindgren 		},
3464d38bd12STony Lindgren 	},
3474d38bd12STony Lindgren 	.class		= &i2c_class,
3484d38bd12STony Lindgren };
3494d38bd12STony Lindgren 
350*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
351*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
3524d38bd12STony Lindgren 	.slave		= &dm81xx_i2c1_hwmod,
3534d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3544d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3554d38bd12STony Lindgren };
3564d38bd12STony Lindgren 
357*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = {
3584d38bd12STony Lindgren 	.name		= "i2c2",
3594d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3604d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3614d38bd12STony Lindgren 	.prcm		= {
3624d38bd12STony Lindgren 		.omap4 = {
363*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
3644d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3654d38bd12STony Lindgren 		},
3664d38bd12STony Lindgren 	},
3674d38bd12STony Lindgren 	.class		= &i2c_class,
3684d38bd12STony Lindgren };
3694d38bd12STony Lindgren 
3704d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
3714d38bd12STony Lindgren 	.rev_offs	= 0x0000,
3724d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
3734d38bd12STony Lindgren 	.syss_offs	= 0x0014,
3744d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3754d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET |
3764d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3774d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3784d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3794d38bd12STony Lindgren };
3804d38bd12STony Lindgren 
381*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
382*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
383*7e1b11d1STony Lindgren 	.slave		= &dm81xx_i2c2_hwmod,
3844d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3854d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3864d38bd12STony Lindgren };
3874d38bd12STony Lindgren 
3884d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
3894d38bd12STony Lindgren 	.name = "elm",
3904d38bd12STony Lindgren 	.sysc = &dm81xx_elm_sysc,
3914d38bd12STony Lindgren };
3924d38bd12STony Lindgren 
3934d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = {
3944d38bd12STony Lindgren 	.name		= "elm",
3954d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3964d38bd12STony Lindgren 	.class		= &dm81xx_elm_hwmod_class,
3974d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
3984d38bd12STony Lindgren };
3994d38bd12STony Lindgren 
4004d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
401*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4024d38bd12STony Lindgren 	.slave		= &dm81xx_elm_hwmod,
4034d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4044d38bd12STony Lindgren };
4054d38bd12STony Lindgren 
4064d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
4074d38bd12STony Lindgren 	.rev_offs	= 0x0000,
4084d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
4094d38bd12STony Lindgren 	.syss_offs	= 0x0114,
4104d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
4114d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4124d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
4134d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
4144d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
4154d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4164d38bd12STony Lindgren };
4174d38bd12STony Lindgren 
4184d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
4194d38bd12STony Lindgren 	.name	= "gpio",
4204d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4214d38bd12STony Lindgren 	.rev	= 2,
4224d38bd12STony Lindgren };
4234d38bd12STony Lindgren 
4244d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = {
4254d38bd12STony Lindgren 	.bank_width	= 32,
4264d38bd12STony Lindgren 	.dbck_flag	= true,
4274d38bd12STony Lindgren };
4284d38bd12STony Lindgren 
4294d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4304d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4314d38bd12STony Lindgren };
4324d38bd12STony Lindgren 
4334d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4344d38bd12STony Lindgren 	.name		= "gpio1",
4354d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4364d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4374d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4384d38bd12STony Lindgren 	.prcm = {
4394d38bd12STony Lindgren 		.omap4 = {
440*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
4414d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4424d38bd12STony Lindgren 		},
4434d38bd12STony Lindgren 	},
4444d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
4454d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
4464d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4474d38bd12STony Lindgren };
4484d38bd12STony Lindgren 
4494d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
450*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4514d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
4524d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4534d38bd12STony Lindgren };
4544d38bd12STony Lindgren 
4554d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
4564d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4574d38bd12STony Lindgren };
4584d38bd12STony Lindgren 
4594d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
4604d38bd12STony Lindgren 	.name		= "gpio2",
4614d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4624d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4634d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4644d38bd12STony Lindgren 	.prcm = {
4654d38bd12STony Lindgren 		.omap4 = {
466*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
4674d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4684d38bd12STony Lindgren 		},
4694d38bd12STony Lindgren 	},
4704d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
4714d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
4724d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4734d38bd12STony Lindgren };
4744d38bd12STony Lindgren 
4754d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
476*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
4774d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
4784d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4794d38bd12STony Lindgren };
4804d38bd12STony Lindgren 
4814d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
4824d38bd12STony Lindgren 	.rev_offs	= 0x0,
4834d38bd12STony Lindgren 	.sysc_offs	= 0x10,
4844d38bd12STony Lindgren 	.syss_offs	= 0x14,
4854d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4864d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
4874d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
4884d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4894d38bd12STony Lindgren };
4904d38bd12STony Lindgren 
4914d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
4924d38bd12STony Lindgren 	.name	= "gpmc",
4934d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
4944d38bd12STony Lindgren };
4954d38bd12STony Lindgren 
4964d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
4974d38bd12STony Lindgren 	.name		= "gpmc",
4984d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4994d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
5004d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
50163aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
50263aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
5034d38bd12STony Lindgren 	.prcm = {
5044d38bd12STony Lindgren 		.omap4 = {
505*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
5064d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5074d38bd12STony Lindgren 		},
5084d38bd12STony Lindgren 	},
5094d38bd12STony Lindgren };
5104d38bd12STony Lindgren 
5114d38bd12STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
512*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_slow_hwmod,
5134d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
5144d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5154d38bd12STony Lindgren };
5164d38bd12STony Lindgren 
5174d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
5184d38bd12STony Lindgren 	.rev_offs	= 0x0,
5194d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5204d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5214d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5224d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5234d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5244d38bd12STony Lindgren };
5254d38bd12STony Lindgren 
5264d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5274d38bd12STony Lindgren 	.name = "usbotg",
5284d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5294d38bd12STony Lindgren };
5304d38bd12STony Lindgren 
5314d38bd12STony Lindgren static struct omap_hwmod dm81xx_usbss_hwmod = {
5324d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5334d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
5344d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
5354d38bd12STony Lindgren 	.prcm		= {
5364d38bd12STony Lindgren 		.omap4 = {
5374d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_DEFAULT_USB_CLKCTRL,
5384d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5394d38bd12STony Lindgren 		},
5404d38bd12STony Lindgren 	},
5414d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
5424d38bd12STony Lindgren };
5434d38bd12STony Lindgren 
5444d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_default_l3_slow__usbss = {
545*7e1b11d1STony Lindgren 	.master		= &dm81xx_default_l3_slow_hwmod,
5464d38bd12STony Lindgren 	.slave		= &dm81xx_usbss_hwmod,
5474d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5484d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5494d38bd12STony Lindgren };
5504d38bd12STony Lindgren 
5514d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
5524d38bd12STony Lindgren 	.rev_offs	= 0x0000,
5534d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
5544d38bd12STony Lindgren 	.syss_offs	= 0x0014,
5554d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
5564d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5574d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
5584d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5594d38bd12STony Lindgren };
5604d38bd12STony Lindgren 
5614d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
5624d38bd12STony Lindgren 	.name = "timer",
5634d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
5644d38bd12STony Lindgren };
5654d38bd12STony Lindgren 
5664d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
5674d38bd12STony Lindgren 	.timer_capability	= OMAP_TIMER_ALWON,
5684d38bd12STony Lindgren };
5694d38bd12STony Lindgren 
5704d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
5714d38bd12STony Lindgren 	.name		= "timer1",
5724d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5734d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
5744d38bd12STony Lindgren 	.prcm		= {
5754d38bd12STony Lindgren 		.omap4 = {
5764d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
5774d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5784d38bd12STony Lindgren 		},
5794d38bd12STony Lindgren 	},
5804d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
5814d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
5824d38bd12STony Lindgren };
5834d38bd12STony Lindgren 
5844d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
585*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
5864d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
5874d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5884d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5894d38bd12STony Lindgren };
5904d38bd12STony Lindgren 
5914d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
5924d38bd12STony Lindgren 	.name		= "timer2",
5934d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5944d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
5954d38bd12STony Lindgren 	.prcm		= {
5964d38bd12STony Lindgren 		.omap4 = {
5974d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
5984d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5994d38bd12STony Lindgren 		},
6004d38bd12STony Lindgren 	},
6014d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6024d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6034d38bd12STony Lindgren };
6044d38bd12STony Lindgren 
6054d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
606*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6074d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
6084d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6094d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6104d38bd12STony Lindgren };
6114d38bd12STony Lindgren 
6124d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
6134d38bd12STony Lindgren 	.name		= "timer3",
6144d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6154d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
6164d38bd12STony Lindgren 	.prcm		= {
6174d38bd12STony Lindgren 		.omap4 = {
6184d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
6194d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6204d38bd12STony Lindgren 		},
6214d38bd12STony Lindgren 	},
6224d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6234d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6244d38bd12STony Lindgren };
6254d38bd12STony Lindgren 
6264d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
627*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6284d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
6294d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6304d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6314d38bd12STony Lindgren };
6324d38bd12STony Lindgren 
6334d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
6344d38bd12STony Lindgren 	.name		= "timer4",
6354d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6364d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
6374d38bd12STony Lindgren 	.prcm		= {
6384d38bd12STony Lindgren 		.omap4 = {
6394d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_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__timer4 = {
648*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6494d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
6504d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6514d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6524d38bd12STony Lindgren };
6534d38bd12STony Lindgren 
6544d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
6554d38bd12STony Lindgren 	.name		= "timer5",
6564d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6574d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
6584d38bd12STony Lindgren 	.prcm		= {
6594d38bd12STony Lindgren 		.omap4 = {
6604d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
6614d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6624d38bd12STony Lindgren 		},
6634d38bd12STony Lindgren 	},
6644d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6654d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6664d38bd12STony Lindgren };
6674d38bd12STony Lindgren 
6684d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
669*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6704d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
6714d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6724d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6734d38bd12STony Lindgren };
6744d38bd12STony Lindgren 
6754d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
6764d38bd12STony Lindgren 	.name		= "timer6",
6774d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6784d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
6794d38bd12STony Lindgren 	.prcm		= {
6804d38bd12STony Lindgren 		.omap4 = {
6814d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
6824d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6834d38bd12STony Lindgren 		},
6844d38bd12STony Lindgren 	},
6854d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6864d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6874d38bd12STony Lindgren };
6884d38bd12STony Lindgren 
6894d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
690*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
6914d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
6924d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6934d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6944d38bd12STony Lindgren };
6954d38bd12STony Lindgren 
6964d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
6974d38bd12STony Lindgren 	.name		= "timer7",
6984d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6994d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
7004d38bd12STony Lindgren 	.prcm		= {
7014d38bd12STony Lindgren 		.omap4 = {
7024d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
7034d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7044d38bd12STony Lindgren 		},
7054d38bd12STony Lindgren 	},
7064d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
7074d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
7084d38bd12STony Lindgren };
7094d38bd12STony Lindgren 
7104d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
711*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
7124d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
7134d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
7144d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7154d38bd12STony Lindgren };
7164d38bd12STony Lindgren 
7174d38bd12STony Lindgren /* EMAC Ethernet */
7184d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
7194d38bd12STony Lindgren 	.rev_offs	= 0x0,
7204d38bd12STony Lindgren 	.sysc_offs	= 0x4,
7214d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
7224d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
7234d38bd12STony Lindgren };
7244d38bd12STony Lindgren 
7254d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
7264d38bd12STony Lindgren 	.name		= "emac",
7274d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
7284d38bd12STony Lindgren };
7294d38bd12STony Lindgren 
7304d38bd12STony Lindgren /*
7314d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
7324d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
7334d38bd12STony Lindgren  */
7344d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
7354d38bd12STony Lindgren 	.name		= "emac0",
7364d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7374d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
7384d38bd12STony Lindgren };
7394d38bd12STony Lindgren 
740*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
741*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
7424d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
7434d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
7444d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7454d38bd12STony Lindgren };
7464d38bd12STony Lindgren 
747*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
7484d38bd12STony Lindgren 	.name		= "davinci_mdio",
7494d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
7504d38bd12STony Lindgren };
7514d38bd12STony Lindgren 
752*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
7534d38bd12STony Lindgren 	.name		= "davinci_mdio",
754*7e1b11d1STony Lindgren 	.class		= &dm81xx_mdio_hwmod_class,
7554d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7564d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
7574d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
7584d38bd12STony Lindgren 	/*
7594d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
7604d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
7614d38bd12STony Lindgren 	 */
7624d38bd12STony Lindgren 	.prcm		= {
7634d38bd12STony Lindgren 		.omap4 = {
764*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
7654d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7664d38bd12STony Lindgren 		},
7674d38bd12STony Lindgren 	},
7684d38bd12STony Lindgren };
7694d38bd12STony Lindgren 
770*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
771*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
772*7e1b11d1STony Lindgren 	.slave		= &dm81xx_emac0_mdio_hwmod,
7734d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7744d38bd12STony Lindgren };
7754d38bd12STony Lindgren 
7764d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
7774d38bd12STony Lindgren 	.name		= "emac1",
7784d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7794d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
7804d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
7814d38bd12STony Lindgren 	.prcm		= {
7824d38bd12STony Lindgren 		.omap4 = {
7834d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
7844d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7854d38bd12STony Lindgren 		},
7864d38bd12STony Lindgren 	},
7874d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
7884d38bd12STony Lindgren };
7894d38bd12STony Lindgren 
7904d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
791*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_hs_hwmod,
7924d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
7934d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
7944d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7954d38bd12STony Lindgren };
7964d38bd12STony Lindgren 
7974d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = {
7984d38bd12STony Lindgren 	.rev_offs	= 0x0,
7994d38bd12STony Lindgren 	.sysc_offs	= 0x110,
8004d38bd12STony Lindgren 	.syss_offs	= 0x114,
8014d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
8024d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
8034d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
8044d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
8054d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
8064d38bd12STony Lindgren };
8074d38bd12STony Lindgren 
8084d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mmc_class = {
8094d38bd12STony Lindgren 	.name = "mmc",
8104d38bd12STony Lindgren 	.sysc = &dm816x_mmc_sysc,
8114d38bd12STony Lindgren };
8124d38bd12STony Lindgren 
8134d38bd12STony Lindgren static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = {
8144d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
8154d38bd12STony Lindgren };
8164d38bd12STony Lindgren 
8174d38bd12STony Lindgren static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
8184d38bd12STony Lindgren 	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
8194d38bd12STony Lindgren };
8204d38bd12STony Lindgren 
8214d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
8224d38bd12STony Lindgren 	.name		= "mmc1",
8234d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8244d38bd12STony Lindgren 	.opt_clks	= dm816x_mmc1_opt_clks,
8254d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm816x_mmc1_opt_clks),
8264d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
8274d38bd12STony Lindgren 	.prcm		= {
8284d38bd12STony Lindgren 		.omap4 = {
8294d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
8304d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8314d38bd12STony Lindgren 		},
8324d38bd12STony Lindgren 	},
8334d38bd12STony Lindgren 	.dev_attr	= &mmc1_dev_attr,
8344d38bd12STony Lindgren 	.class		= &dm816x_mmc_class,
8354d38bd12STony Lindgren };
8364d38bd12STony Lindgren 
8374d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
838*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
8394d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
8404d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
8414d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8424d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
8434d38bd12STony Lindgren };
8444d38bd12STony Lindgren 
8454d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
8464d38bd12STony Lindgren 	.rev_offs	= 0x0,
8474d38bd12STony Lindgren 	.sysc_offs	= 0x110,
8484d38bd12STony Lindgren 	.syss_offs	= 0x114,
8494d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
8504d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
8514d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
8524d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
8534d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
8544d38bd12STony Lindgren };
8554d38bd12STony Lindgren 
8564d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
8574d38bd12STony Lindgren 	.name = "mcspi",
8584d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
8594d38bd12STony Lindgren 	.rev = OMAP3_MCSPI_REV,
8604d38bd12STony Lindgren };
8614d38bd12STony Lindgren 
8624d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
8634d38bd12STony Lindgren 	.num_chipselect = 4,
8644d38bd12STony Lindgren };
8654d38bd12STony Lindgren 
866*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = {
8674d38bd12STony Lindgren 	.name		= "mcspi1",
8684d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8694d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
8704d38bd12STony Lindgren 	.prcm		= {
8714d38bd12STony Lindgren 		.omap4 = {
872*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
8734d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8744d38bd12STony Lindgren 		},
8754d38bd12STony Lindgren 	},
8764d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
8774d38bd12STony Lindgren 	.dev_attr	= &dm816x_mcspi1_dev_attr,
8784d38bd12STony Lindgren };
8794d38bd12STony Lindgren 
880*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
881*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
882*7e1b11d1STony Lindgren 	.slave		= &dm81xx_mcspi1_hwmod,
8834d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
8844d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8854d38bd12STony Lindgren };
8864d38bd12STony Lindgren 
887*7e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
8884d38bd12STony Lindgren 	.rev_offs	= 0x000,
8894d38bd12STony Lindgren 	.sysc_offs	= 0x010,
8904d38bd12STony Lindgren 	.syss_offs	= 0x014,
8914d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
8924d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
8934d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
8944d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
8954d38bd12STony Lindgren };
8964d38bd12STony Lindgren 
897*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
8984d38bd12STony Lindgren 	.name = "mailbox",
899*7e1b11d1STony Lindgren 	.sysc = &dm81xx_mailbox_sysc,
9004d38bd12STony Lindgren };
9014d38bd12STony Lindgren 
902*7e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = {
9034d38bd12STony Lindgren 	.name		= "mailbox",
9044d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
905*7e1b11d1STony Lindgren 	.class		= &dm81xx_mailbox_hwmod_class,
9064d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
9074d38bd12STony Lindgren 	.prcm		= {
9084d38bd12STony Lindgren 		.omap4 = {
909*7e1b11d1STony Lindgren 			.clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
9104d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
9114d38bd12STony Lindgren 		},
9124d38bd12STony Lindgren 	},
9134d38bd12STony Lindgren };
9144d38bd12STony Lindgren 
915*7e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
916*7e1b11d1STony Lindgren 	.master		= &dm81xx_l4_ls_hwmod,
917*7e1b11d1STony Lindgren 	.slave		= &dm81xx_mailbox_hwmod,
9184d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9194d38bd12STony Lindgren };
9204d38bd12STony Lindgren 
921*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
9224d38bd12STony Lindgren 	.name		= "tpcc",
9234d38bd12STony Lindgren };
9244d38bd12STony Lindgren 
925*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_tpcc_hwmod = {
9264d38bd12STony Lindgren 	.name		= "tpcc",
927*7e1b11d1STony Lindgren 	.class		= &dm81xx_tpcc_hwmod_class,
9284d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9294d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
9304d38bd12STony Lindgren 	.prcm		= {
9314d38bd12STony Lindgren 		.omap4	= {
932*7e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPCC_CLKCTRL,
9334d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
9344d38bd12STony Lindgren 		},
9354d38bd12STony Lindgren 	},
9364d38bd12STony Lindgren };
9374d38bd12STony Lindgren 
938*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
939*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
940*7e1b11d1STony Lindgren 	.slave		= &dm81xx_tpcc_hwmod,
9414d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
9424d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9434d38bd12STony Lindgren };
9444d38bd12STony Lindgren 
945*7e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space[] = {
9464d38bd12STony Lindgren 	{
9474d38bd12STony Lindgren 		.pa_start	= 0x49800000,
9484d38bd12STony Lindgren 		.pa_end		= 0x49800000 + SZ_8K - 1,
9494d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
9504d38bd12STony Lindgren 	},
9514d38bd12STony Lindgren 	{ },
9524d38bd12STony Lindgren };
9534d38bd12STony Lindgren 
954*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
9554d38bd12STony Lindgren 	.name		= "tptc0",
9564d38bd12STony Lindgren };
9574d38bd12STony Lindgren 
958*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_tptc0_hwmod = {
9594d38bd12STony Lindgren 	.name		= "tptc0",
960*7e1b11d1STony Lindgren 	.class		= &dm81xx_tptc0_hwmod_class,
9614d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9624d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
9634d38bd12STony Lindgren 	.prcm		= {
9644d38bd12STony Lindgren 		.omap4	= {
965*7e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC0_CLKCTRL,
9664d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
9674d38bd12STony Lindgren 		},
9684d38bd12STony Lindgren 	},
9694d38bd12STony Lindgren };
9704d38bd12STony Lindgren 
971*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
972*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
973*7e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc0_hwmod,
9744d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
975*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
9764d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9774d38bd12STony Lindgren };
9784d38bd12STony Lindgren 
979*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
980*7e1b11d1STony Lindgren 	.master		= &dm81xx_tptc0_hwmod,
981*7e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
9824d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
983*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc0_addr_space,
9844d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9854d38bd12STony Lindgren };
9864d38bd12STony Lindgren 
987*7e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space[] = {
9884d38bd12STony Lindgren 	{
9894d38bd12STony Lindgren 		.pa_start	= 0x49900000,
9904d38bd12STony Lindgren 		.pa_end		= 0x49900000 + SZ_8K - 1,
9914d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
9924d38bd12STony Lindgren 	},
9934d38bd12STony Lindgren 	{ },
9944d38bd12STony Lindgren };
9954d38bd12STony Lindgren 
996*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
9974d38bd12STony Lindgren 	.name		= "tptc1",
9984d38bd12STony Lindgren };
9994d38bd12STony Lindgren 
1000*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_tptc1_hwmod = {
10014d38bd12STony Lindgren 	.name		= "tptc1",
1002*7e1b11d1STony Lindgren 	.class		= &dm81xx_tptc1_hwmod_class,
10034d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10044d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10054d38bd12STony Lindgren 	.prcm		= {
10064d38bd12STony Lindgren 		.omap4	= {
1007*7e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC1_CLKCTRL,
10084d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10094d38bd12STony Lindgren 		},
10104d38bd12STony Lindgren 	},
10114d38bd12STony Lindgren };
10124d38bd12STony Lindgren 
1013*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
1014*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
1015*7e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc1_hwmod,
10164d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1017*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
10184d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10194d38bd12STony Lindgren };
10204d38bd12STony Lindgren 
1021*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
1022*7e1b11d1STony Lindgren 	.master		= &dm81xx_tptc1_hwmod,
1023*7e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
10244d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1025*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc1_addr_space,
10264d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10274d38bd12STony Lindgren };
10284d38bd12STony Lindgren 
1029*7e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space[] = {
10304d38bd12STony Lindgren 	{
10314d38bd12STony Lindgren 		.pa_start	= 0x49a00000,
10324d38bd12STony Lindgren 		.pa_end		= 0x49a00000 + SZ_8K - 1,
10334d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
10344d38bd12STony Lindgren 	},
10354d38bd12STony Lindgren 	{ },
10364d38bd12STony Lindgren };
10374d38bd12STony Lindgren 
1038*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
10394d38bd12STony Lindgren 	.name		= "tptc2",
10404d38bd12STony Lindgren };
10414d38bd12STony Lindgren 
1042*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_tptc2_hwmod = {
10434d38bd12STony Lindgren 	.name		= "tptc2",
1044*7e1b11d1STony Lindgren 	.class		= &dm81xx_tptc2_hwmod_class,
10454d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10464d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10474d38bd12STony Lindgren 	.prcm		= {
10484d38bd12STony Lindgren 		.omap4	= {
1049*7e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC2_CLKCTRL,
10504d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10514d38bd12STony Lindgren 		},
10524d38bd12STony Lindgren 	},
10534d38bd12STony Lindgren };
10544d38bd12STony Lindgren 
1055*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
1056*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
1057*7e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc2_hwmod,
10584d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1059*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
10604d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10614d38bd12STony Lindgren };
10624d38bd12STony Lindgren 
1063*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
1064*7e1b11d1STony Lindgren 	.master		= &dm81xx_tptc2_hwmod,
1065*7e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
10664d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1067*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc2_addr_space,
10684d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10694d38bd12STony Lindgren };
10704d38bd12STony Lindgren 
1071*7e1b11d1STony Lindgren static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space[] = {
10724d38bd12STony Lindgren 	{
10734d38bd12STony Lindgren 		.pa_start	= 0x49b00000,
10744d38bd12STony Lindgren 		.pa_end		= 0x49b00000 + SZ_8K - 1,
10754d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
10764d38bd12STony Lindgren 	},
10774d38bd12STony Lindgren 	{ },
10784d38bd12STony Lindgren };
10794d38bd12STony Lindgren 
1080*7e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
10814d38bd12STony Lindgren 	.name		= "tptc3",
10824d38bd12STony Lindgren };
10834d38bd12STony Lindgren 
1084*7e1b11d1STony Lindgren struct omap_hwmod dm81xx_tptc3_hwmod = {
10854d38bd12STony Lindgren 	.name		= "tptc3",
1086*7e1b11d1STony Lindgren 	.class		= &dm81xx_tptc3_hwmod_class,
10874d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10884d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10894d38bd12STony Lindgren 	.prcm		= {
10904d38bd12STony Lindgren 		.omap4	= {
1091*7e1b11d1STony Lindgren 			.clkctrl_offs	= DM81XX_CM_ALWON_TPTC3_CLKCTRL,
10924d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10934d38bd12STony Lindgren 		},
10944d38bd12STony Lindgren 	},
10954d38bd12STony Lindgren };
10964d38bd12STony Lindgren 
1097*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
1098*7e1b11d1STony Lindgren 	.master		= &dm81xx_alwon_l3_fast_hwmod,
1099*7e1b11d1STony Lindgren 	.slave		= &dm81xx_tptc3_hwmod,
11004d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1101*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
11024d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11034d38bd12STony Lindgren };
11044d38bd12STony Lindgren 
1105*7e1b11d1STony Lindgren struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
1106*7e1b11d1STony Lindgren 	.master		= &dm81xx_tptc3_hwmod,
1107*7e1b11d1STony Lindgren 	.slave		= &dm81xx_alwon_l3_fast_hwmod,
11084d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
1109*7e1b11d1STony Lindgren 	.addr		= dm81xx_tptc3_addr_space,
11104d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
11114d38bd12STony Lindgren };
11124d38bd12STony Lindgren 
11134d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
11144d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
11154d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
1116*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_ls,
1117*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_slow__l4_hs,
1118*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart1,
1119*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart2,
1120*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__uart3,
1121*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__wd_timer1,
1122*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c1,
1123*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__i2c2,
11244d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
11254d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
11264d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
11274d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
11284d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
11294d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
11304d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
11314d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
11324d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
11334d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
11344d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
1135*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__mcspi1,
1136*7e1b11d1STony Lindgren 	&dm81xx_l4_ls__mailbox,
1137*7e1b11d1STony Lindgren 	&dm81xx_l4_hs__emac0,
1138*7e1b11d1STony Lindgren 	&dm81xx_emac0__mdio,
11394d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
1140*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tpcc,
1141*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc0,
1142*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc1,
1143*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc2,
1144*7e1b11d1STony Lindgren 	&dm81xx_alwon_l3_fast__tptc3,
1145*7e1b11d1STony Lindgren 	&dm81xx_tptc0__alwon_l3_fast,
1146*7e1b11d1STony Lindgren 	&dm81xx_tptc1__alwon_l3_fast,
1147*7e1b11d1STony Lindgren 	&dm81xx_tptc2__alwon_l3_fast,
1148*7e1b11d1STony Lindgren 	&dm81xx_tptc3__alwon_l3_fast,
11494d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
11504d38bd12STony Lindgren 	&dm81xx_default_l3_slow__usbss,
11514d38bd12STony Lindgren 	NULL,
11524d38bd12STony Lindgren };
11534d38bd12STony Lindgren 
11544d38bd12STony Lindgren int __init ti81xx_hwmod_init(void)
11554d38bd12STony Lindgren {
11564d38bd12STony Lindgren 	omap_hwmod_init();
11574d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
11584d38bd12STony Lindgren }
1159