xref: /linux/arch/arm/mach-omap2/omap_hwmod_81xx_data.c (revision f734a9b3b19e01d598d03a336de32a59a52c1575)
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 /*
354d38bd12STony Lindgren  * The alwon .clkctrl_offs field is offset from the CM_ALWON, that's
364d38bd12STony Lindgren  * TRM 18.7.17 CM_ALWON device register values minus 0x1400.
374d38bd12STony Lindgren  */
384d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE		0x1400
394d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP0_CLKCTRL	(0x1540 - DM816X_DM_ALWON_BASE)
404d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP1_CLKCTRL	(0x1544 - DM816X_DM_ALWON_BASE)
414d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP2_CLKCTRL	(0x1548 - DM816X_DM_ALWON_BASE)
424d38bd12STony Lindgren #define DM816X_CM_ALWON_MCBSP_CLKCTRL	(0x154c - DM816X_DM_ALWON_BASE)
434d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_0_CLKCTRL	(0x1550 - DM816X_DM_ALWON_BASE)
444d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_1_CLKCTRL	(0x1554 - DM816X_DM_ALWON_BASE)
454d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_2_CLKCTRL	(0x1558 - DM816X_DM_ALWON_BASE)
464d38bd12STony Lindgren #define DM816X_CM_ALWON_GPIO_0_CLKCTRL	(0x155c - DM816X_DM_ALWON_BASE)
474d38bd12STony Lindgren #define DM816X_CM_ALWON_GPIO_1_CLKCTRL	(0x1560 - DM816X_DM_ALWON_BASE)
484d38bd12STony Lindgren #define DM816X_CM_ALWON_I2C_0_CLKCTRL	(0x1564 - DM816X_DM_ALWON_BASE)
494d38bd12STony Lindgren #define DM816X_CM_ALWON_I2C_1_CLKCTRL	(0x1568 - DM816X_DM_ALWON_BASE)
504d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL	(0x1570 - DM816X_DM_ALWON_BASE)
514d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL	(0x1574 - DM816X_DM_ALWON_BASE)
524d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL	(0x1578 - DM816X_DM_ALWON_BASE)
534d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL	(0x157c - DM816X_DM_ALWON_BASE)
544d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL	(0x1580 - DM816X_DM_ALWON_BASE)
554d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL	(0x1584 - DM816X_DM_ALWON_BASE)
564d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL	(0x1588 - DM816X_DM_ALWON_BASE)
574d38bd12STony Lindgren #define DM816X_CM_ALWON_WDTIMER_CLKCTRL	(0x158c - DM816X_DM_ALWON_BASE)
584d38bd12STony Lindgren #define DM816X_CM_ALWON_SPI_CLKCTRL	(0x1590 - DM816X_DM_ALWON_BASE)
594d38bd12STony Lindgren #define DM816X_CM_ALWON_MAILBOX_CLKCTRL	(0x1594 - DM816X_DM_ALWON_BASE)
604d38bd12STony Lindgren #define DM816X_CM_ALWON_SPINBOX_CLKCTRL	(0x1598 - DM816X_DM_ALWON_BASE)
614d38bd12STony Lindgren #define DM816X_CM_ALWON_MMUDATA_CLKCTRL	(0x159c - DM816X_DM_ALWON_BASE)
624d38bd12STony Lindgren #define DM816X_CM_ALWON_MMUCFG_CLKCTRL	(0x15a8 - DM816X_DM_ALWON_BASE)
634d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL	(0x15b0 - DM816X_DM_ALWON_BASE)
644d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL	(0x15b4 - DM816X_DM_ALWON_BASE)
654d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL	(0x15b8 - DM816X_DM_ALWON_BASE)
664d38bd12STony Lindgren #define DM816X_CM_ALWON_CONTRL_CLKCTRL	(0x15c4 - DM816X_DM_ALWON_BASE)
674d38bd12STony Lindgren #define DM816X_CM_ALWON_GPMC_CLKCTRL	(0x15d0 - DM816X_DM_ALWON_BASE)
684d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_0_CLKCTRL (0x15d4 - DM816X_DM_ALWON_BASE)
694d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
704d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL	(0x15dc - DM816X_DM_ALWON_BASE)
714d38bd12STony Lindgren #define DM816X_CM_ALWON_L3_CLKCTRL	(0x15e4 - DM816X_DM_ALWON_BASE)
724d38bd12STony Lindgren #define DM816X_CM_ALWON_L4HS_CLKCTRL	(0x15e8 - DM816X_DM_ALWON_BASE)
734d38bd12STony Lindgren #define DM816X_CM_ALWON_L4LS_CLKCTRL	(0x15ec - DM816X_DM_ALWON_BASE)
744d38bd12STony Lindgren #define DM816X_CM_ALWON_RTC_CLKCTRL	(0x15f0 - DM816X_DM_ALWON_BASE)
754d38bd12STony Lindgren #define DM816X_CM_ALWON_TPCC_CLKCTRL	(0x15f4 - DM816X_DM_ALWON_BASE)
764d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC0_CLKCTRL	(0x15f8 - DM816X_DM_ALWON_BASE)
774d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC1_CLKCTRL	(0x15fc - DM816X_DM_ALWON_BASE)
784d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC2_CLKCTRL	(0x1600 - DM816X_DM_ALWON_BASE)
794d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC3_CLKCTRL	(0x1604 - DM816X_DM_ALWON_BASE)
804d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL	(0x1608 - DM816X_DM_ALWON_BASE)
814d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL	(0x160c - DM816X_DM_ALWON_BASE)
824d38bd12STony Lindgren 
834d38bd12STony Lindgren /*
844d38bd12STony Lindgren  * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
854d38bd12STony Lindgren  * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
864d38bd12STony Lindgren  */
874d38bd12STony Lindgren #define DM816X_CM_DEFAULT_OFFSET	0x500
884d38bd12STony Lindgren #define DM816X_CM_DEFAULT_USB_CLKCTRL	(0x558 - DM816X_CM_DEFAULT_OFFSET)
894d38bd12STony Lindgren 
904d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
914d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_slow_hwmod = {
924d38bd12STony Lindgren 	.name		= "alwon_l3_slow",
934d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
944d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
954d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
964d38bd12STony Lindgren };
974d38bd12STony Lindgren 
984d38bd12STony Lindgren static struct omap_hwmod dm816x_default_l3_slow_hwmod = {
994d38bd12STony Lindgren 	.name		= "default_l3_slow",
1004d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
1014d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1024d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1034d38bd12STony Lindgren };
1044d38bd12STony Lindgren 
1054d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_med_hwmod = {
1064d38bd12STony Lindgren 	.name		= "l3_med",
1074d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1084d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1094d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1104d38bd12STony Lindgren };
1114d38bd12STony Lindgren 
1124d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_fast_hwmod = {
1134d38bd12STony Lindgren 	.name		= "l3_fast",
1144d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_fast_clkdm",
1154d38bd12STony Lindgren 	.class		= &l3_hwmod_class,
1164d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
1174d38bd12STony Lindgren };
1184d38bd12STony Lindgren 
1194d38bd12STony Lindgren /*
1204d38bd12STony Lindgren  * L4 standard peripherals, see TRM table 1-12 for devices using this.
1214d38bd12STony Lindgren  * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock.
1224d38bd12STony Lindgren  */
1234d38bd12STony Lindgren static struct omap_hwmod dm816x_l4_ls_hwmod = {
1244d38bd12STony Lindgren 	.name		= "l4_ls",
1254d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
1264d38bd12STony Lindgren 	.class		= &l4_hwmod_class,
1274d38bd12STony Lindgren };
1284d38bd12STony Lindgren 
1294d38bd12STony Lindgren /*
1304d38bd12STony Lindgren  * L4 high-speed peripherals. For devices using this, please see the TRM
1314d38bd12STony Lindgren  * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
1324d38bd12STony Lindgren  * table 1-73 for devices using 250MHz SYSCLK5 clock.
1334d38bd12STony Lindgren  */
1344d38bd12STony Lindgren static struct omap_hwmod dm816x_l4_hs_hwmod = {
1354d38bd12STony Lindgren 	.name		= "l4_hs",
1364d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3_med_clkdm",
1374d38bd12STony Lindgren 	.class		= &l4_hwmod_class,
1384d38bd12STony Lindgren };
1394d38bd12STony Lindgren 
1404d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */
1414d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_alwon_l3_slow__l4_ls = {
1424d38bd12STony Lindgren 	.master	= &dm816x_alwon_l3_slow_hwmod,
1434d38bd12STony Lindgren 	.slave	= &dm816x_l4_ls_hwmod,
1444d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1454d38bd12STony Lindgren };
1464d38bd12STony Lindgren 
1474d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */
1484d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_alwon_l3_slow__l4_hs = {
1494d38bd12STony Lindgren 	.master	= &dm816x_alwon_l3_med_hwmod,
1504d38bd12STony Lindgren 	.slave	= &dm816x_l4_hs_hwmod,
1514d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1524d38bd12STony Lindgren };
1534d38bd12STony Lindgren 
1544d38bd12STony Lindgren /* MPU */
1554d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = {
1564d38bd12STony Lindgren 	.name		= "mpu",
1574d38bd12STony Lindgren 	.clkdm_name	= "alwon_mpu_clkdm",
1584d38bd12STony Lindgren 	.class		= &mpu_hwmod_class,
1594d38bd12STony Lindgren 	.flags		= HWMOD_INIT_NO_IDLE,
1604d38bd12STony Lindgren 	.main_clk	= "mpu_ck",
1614d38bd12STony Lindgren 	.prcm		= {
1624d38bd12STony Lindgren 		.omap4 = {
1634d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
1644d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
1654d38bd12STony Lindgren 		},
1664d38bd12STony Lindgren 	},
1674d38bd12STony Lindgren };
1684d38bd12STony Lindgren 
1694d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
1704d38bd12STony Lindgren 	.master		= &dm816x_mpu_hwmod,
1714d38bd12STony Lindgren 	.slave		= &dm816x_alwon_l3_slow_hwmod,
1724d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
1734d38bd12STony Lindgren };
1744d38bd12STony Lindgren 
1754d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */
1764d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
1774d38bd12STony Lindgren 	.master	= &dm816x_mpu_hwmod,
1784d38bd12STony Lindgren 	.slave	= &dm816x_alwon_l3_med_hwmod,
1794d38bd12STony Lindgren 	.user	= OCP_USER_MPU,
1804d38bd12STony Lindgren };
1814d38bd12STony Lindgren 
1824d38bd12STony Lindgren /* UART common */
1834d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = {
1844d38bd12STony Lindgren 	.rev_offs	= 0x50,
1854d38bd12STony Lindgren 	.sysc_offs	= 0x54,
1864d38bd12STony Lindgren 	.syss_offs	= 0x58,
1874d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1884d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1894d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
1904d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1914d38bd12STony Lindgren 				MSTANDBY_SMART_WKUP,
1924d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
1934d38bd12STony Lindgren };
1944d38bd12STony Lindgren 
1954d38bd12STony Lindgren static struct omap_hwmod_class uart_class = {
1964d38bd12STony Lindgren 	.name = "uart",
1974d38bd12STony Lindgren 	.sysc = &uart_sysc,
1984d38bd12STony Lindgren };
1994d38bd12STony Lindgren 
2004d38bd12STony Lindgren static struct omap_hwmod dm816x_uart1_hwmod = {
2014d38bd12STony Lindgren 	.name		= "uart1",
2024d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2034d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2044d38bd12STony Lindgren 	.prcm		= {
2054d38bd12STony Lindgren 		.omap4 = {
2064d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_UART_0_CLKCTRL,
2074d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2084d38bd12STony Lindgren 		},
2094d38bd12STony Lindgren 	},
2104d38bd12STony Lindgren 	.class		= &uart_class,
2114d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART1_FLAGS,
2124d38bd12STony Lindgren };
2134d38bd12STony Lindgren 
2144d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart1 = {
2154d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
2164d38bd12STony Lindgren 	.slave		= &dm816x_uart1_hwmod,
2174d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2184d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2194d38bd12STony Lindgren };
2204d38bd12STony Lindgren 
2214d38bd12STony Lindgren static struct omap_hwmod dm816x_uart2_hwmod = {
2224d38bd12STony Lindgren 	.name		= "uart2",
2234d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2244d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2254d38bd12STony Lindgren 	.prcm		= {
2264d38bd12STony Lindgren 		.omap4 = {
2274d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_UART_1_CLKCTRL,
2284d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2294d38bd12STony Lindgren 		},
2304d38bd12STony Lindgren 	},
2314d38bd12STony Lindgren 	.class		= &uart_class,
2324d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART2_FLAGS,
2334d38bd12STony Lindgren };
2344d38bd12STony Lindgren 
2354d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart2 = {
2364d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
2374d38bd12STony Lindgren 	.slave		= &dm816x_uart2_hwmod,
2384d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2394d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2404d38bd12STony Lindgren };
2414d38bd12STony Lindgren 
2424d38bd12STony Lindgren static struct omap_hwmod dm816x_uart3_hwmod = {
2434d38bd12STony Lindgren 	.name		= "uart3",
2444d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2454d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
2464d38bd12STony Lindgren 	.prcm		= {
2474d38bd12STony Lindgren 		.omap4 = {
2484d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_UART_2_CLKCTRL,
2494d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2504d38bd12STony Lindgren 		},
2514d38bd12STony Lindgren 	},
2524d38bd12STony Lindgren 	.class		= &uart_class,
2534d38bd12STony Lindgren 	.flags		= DEBUG_TI81XXUART3_FLAGS,
2544d38bd12STony Lindgren };
2554d38bd12STony Lindgren 
2564d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart3 = {
2574d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
2584d38bd12STony Lindgren 	.slave		= &dm816x_uart3_hwmod,
2594d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2604d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2614d38bd12STony Lindgren };
2624d38bd12STony Lindgren 
2634d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
2644d38bd12STony Lindgren 	.rev_offs	= 0x0,
2654d38bd12STony Lindgren 	.sysc_offs	= 0x10,
2664d38bd12STony Lindgren 	.syss_offs	= 0x14,
2674d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
2684d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
2694d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
2704d38bd12STony Lindgren };
2714d38bd12STony Lindgren 
2724d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = {
2734d38bd12STony Lindgren 	.name		= "wd_timer",
2744d38bd12STony Lindgren 	.sysc		= &wd_timer_sysc,
2754d38bd12STony Lindgren 	.pre_shutdown	= &omap2_wd_timer_disable,
2764d38bd12STony Lindgren 	.reset		= &omap2_wd_timer_reset,
2774d38bd12STony Lindgren };
2784d38bd12STony Lindgren 
2794d38bd12STony Lindgren static struct omap_hwmod dm816x_wd_timer_hwmod = {
2804d38bd12STony Lindgren 	.name		= "wd_timer",
2814d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
2824d38bd12STony Lindgren 	.main_clk	= "sysclk18_ck",
2834d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
2844d38bd12STony Lindgren 	.prcm		= {
2854d38bd12STony Lindgren 		.omap4 = {
2864d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_WDTIMER_CLKCTRL,
2874d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
2884d38bd12STony Lindgren 		},
2894d38bd12STony Lindgren 	},
2904d38bd12STony Lindgren 	.class		= &wd_timer_class,
2914d38bd12STony Lindgren };
2924d38bd12STony Lindgren 
2934d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__wd_timer1 = {
2944d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
2954d38bd12STony Lindgren 	.slave		= &dm816x_wd_timer_hwmod,
2964d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
2974d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
2984d38bd12STony Lindgren };
2994d38bd12STony Lindgren 
3004d38bd12STony Lindgren /* I2C common */
3014d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = {
3024d38bd12STony Lindgren 	.rev_offs	= 0x0,
3034d38bd12STony Lindgren 	.sysc_offs	= 0x10,
3044d38bd12STony Lindgren 	.syss_offs	= 0x90,
3054d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE |
3064d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
3074d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE,
3084d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3094d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3104d38bd12STony Lindgren };
3114d38bd12STony Lindgren 
3124d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = {
3134d38bd12STony Lindgren 	.name = "i2c",
3144d38bd12STony Lindgren 	.sysc = &i2c_sysc,
3154d38bd12STony Lindgren };
3164d38bd12STony Lindgren 
3174d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = {
3184d38bd12STony Lindgren 	.name		= "i2c1",
3194d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3204d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3214d38bd12STony Lindgren 	.prcm		= {
3224d38bd12STony Lindgren 		.omap4 = {
3234d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_I2C_0_CLKCTRL,
3244d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3254d38bd12STony Lindgren 		},
3264d38bd12STony Lindgren 	},
3274d38bd12STony Lindgren 	.class		= &i2c_class,
3284d38bd12STony Lindgren };
3294d38bd12STony Lindgren 
3304d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__i2c1 = {
3314d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
3324d38bd12STony Lindgren 	.slave		= &dm81xx_i2c1_hwmod,
3334d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3344d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3354d38bd12STony Lindgren };
3364d38bd12STony Lindgren 
3374d38bd12STony Lindgren static struct omap_hwmod dm816x_i2c2_hwmod = {
3384d38bd12STony Lindgren 	.name		= "i2c2",
3394d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3404d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
3414d38bd12STony Lindgren 	.prcm		= {
3424d38bd12STony Lindgren 		.omap4 = {
3434d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_I2C_1_CLKCTRL,
3444d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
3454d38bd12STony Lindgren 		},
3464d38bd12STony Lindgren 	},
3474d38bd12STony Lindgren 	.class		= &i2c_class,
3484d38bd12STony Lindgren };
3494d38bd12STony Lindgren 
3504d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
3514d38bd12STony Lindgren 	.rev_offs	= 0x0000,
3524d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
3534d38bd12STony Lindgren 	.syss_offs	= 0x0014,
3544d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
3554d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET |
3564d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3574d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
3584d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3594d38bd12STony Lindgren };
3604d38bd12STony Lindgren 
3614d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__i2c2 = {
3624d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
3634d38bd12STony Lindgren 	.slave		= &dm816x_i2c2_hwmod,
3644d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
3654d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3664d38bd12STony Lindgren };
3674d38bd12STony Lindgren 
3684d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
3694d38bd12STony Lindgren 	.name = "elm",
3704d38bd12STony Lindgren 	.sysc = &dm81xx_elm_sysc,
3714d38bd12STony Lindgren };
3724d38bd12STony Lindgren 
3734d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = {
3744d38bd12STony Lindgren 	.name		= "elm",
3754d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
3764d38bd12STony Lindgren 	.class		= &dm81xx_elm_hwmod_class,
3774d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
3784d38bd12STony Lindgren };
3794d38bd12STony Lindgren 
3804d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
3814d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
3824d38bd12STony Lindgren 	.slave		= &dm81xx_elm_hwmod,
3834d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
3844d38bd12STony Lindgren };
3854d38bd12STony Lindgren 
3864d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
3874d38bd12STony Lindgren 	.rev_offs	= 0x0000,
3884d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
3894d38bd12STony Lindgren 	.syss_offs	= 0x0114,
3904d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
3914d38bd12STony Lindgren 				SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
3924d38bd12STony Lindgren 				SYSS_HAS_RESET_STATUS,
3934d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3944d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
3954d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
3964d38bd12STony Lindgren };
3974d38bd12STony Lindgren 
3984d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
3994d38bd12STony Lindgren 	.name	= "gpio",
4004d38bd12STony Lindgren 	.sysc	= &dm81xx_gpio_sysc,
4014d38bd12STony Lindgren 	.rev	= 2,
4024d38bd12STony Lindgren };
4034d38bd12STony Lindgren 
4044d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = {
4054d38bd12STony Lindgren 	.bank_width	= 32,
4064d38bd12STony Lindgren 	.dbck_flag	= true,
4074d38bd12STony Lindgren };
4084d38bd12STony Lindgren 
4094d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
4104d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4114d38bd12STony Lindgren };
4124d38bd12STony Lindgren 
4134d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = {
4144d38bd12STony Lindgren 	.name		= "gpio1",
4154d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4164d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4174d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4184d38bd12STony Lindgren 	.prcm = {
4194d38bd12STony Lindgren 		.omap4 = {
4204d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_GPIO_0_CLKCTRL,
4214d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4224d38bd12STony Lindgren 		},
4234d38bd12STony Lindgren 	},
4244d38bd12STony Lindgren 	.opt_clks	= gpio1_opt_clks,
4254d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
4264d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4274d38bd12STony Lindgren };
4284d38bd12STony Lindgren 
4294d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
4304d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
4314d38bd12STony Lindgren 	.slave		= &dm81xx_gpio1_hwmod,
4324d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4334d38bd12STony Lindgren };
4344d38bd12STony Lindgren 
4354d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
4364d38bd12STony Lindgren 	{ .role = "dbclk", .clk = "sysclk18_ck" },
4374d38bd12STony Lindgren };
4384d38bd12STony Lindgren 
4394d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = {
4404d38bd12STony Lindgren 	.name		= "gpio2",
4414d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4424d38bd12STony Lindgren 	.class		= &dm81xx_gpio_hwmod_class,
4434d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
4444d38bd12STony Lindgren 	.prcm = {
4454d38bd12STony Lindgren 		.omap4 = {
4464d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_GPIO_1_CLKCTRL,
4474d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4484d38bd12STony Lindgren 		},
4494d38bd12STony Lindgren 	},
4504d38bd12STony Lindgren 	.opt_clks	= gpio2_opt_clks,
4514d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(gpio2_opt_clks),
4524d38bd12STony Lindgren 	.dev_attr	= &gpio_dev_attr,
4534d38bd12STony Lindgren };
4544d38bd12STony Lindgren 
4554d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
4564d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
4574d38bd12STony Lindgren 	.slave		= &dm81xx_gpio2_hwmod,
4584d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4594d38bd12STony Lindgren };
4604d38bd12STony Lindgren 
4614d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
4624d38bd12STony Lindgren 	.rev_offs	= 0x0,
4634d38bd12STony Lindgren 	.sysc_offs	= 0x10,
4644d38bd12STony Lindgren 	.syss_offs	= 0x14,
4654d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
4664d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
4674d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
4684d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
4694d38bd12STony Lindgren };
4704d38bd12STony Lindgren 
4714d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
4724d38bd12STony Lindgren 	.name	= "gpmc",
4734d38bd12STony Lindgren 	.sysc	= &dm81xx_gpmc_sysc,
4744d38bd12STony Lindgren };
4754d38bd12STony Lindgren 
4764d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = {
4774d38bd12STony Lindgren 	.name		= "gpmc",
4784d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
4794d38bd12STony Lindgren 	.class		= &dm81xx_gpmc_hwmod_class,
4804d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
48163aa945bSTony Lindgren 	/* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
48263aa945bSTony Lindgren 	.flags		= DEBUG_OMAP_GPMC_HWMOD_FLAGS,
4834d38bd12STony Lindgren 	.prcm = {
4844d38bd12STony Lindgren 		.omap4 = {
4854d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL,
4864d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
4874d38bd12STony Lindgren 		},
4884d38bd12STony Lindgren 	},
4894d38bd12STony Lindgren };
4904d38bd12STony Lindgren 
491*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
4924d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_slow_hwmod,
4934d38bd12STony Lindgren 	.slave		= &dm81xx_gpmc_hwmod,
4944d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
4954d38bd12STony Lindgren };
4964d38bd12STony Lindgren 
4974d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
4984d38bd12STony Lindgren 	.rev_offs	= 0x0,
4994d38bd12STony Lindgren 	.sysc_offs	= 0x10,
5004d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
5014d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET,
5024d38bd12STony Lindgren 	.idlemodes	= SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
5034d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5044d38bd12STony Lindgren };
5054d38bd12STony Lindgren 
5064d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = {
5074d38bd12STony Lindgren 	.name = "usbotg",
5084d38bd12STony Lindgren 	.sysc = &dm81xx_usbhsotg_sysc,
5094d38bd12STony Lindgren };
5104d38bd12STony Lindgren 
5114d38bd12STony Lindgren static struct omap_hwmod dm81xx_usbss_hwmod = {
5124d38bd12STony Lindgren 	.name		= "usb_otg_hs",
5134d38bd12STony Lindgren 	.clkdm_name	= "default_l3_slow_clkdm",
5144d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
5154d38bd12STony Lindgren 	.prcm		= {
5164d38bd12STony Lindgren 		.omap4 = {
5174d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_DEFAULT_USB_CLKCTRL,
5184d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5194d38bd12STony Lindgren 		},
5204d38bd12STony Lindgren 	},
5214d38bd12STony Lindgren 	.class		= &dm81xx_usbotg_class,
5224d38bd12STony Lindgren };
5234d38bd12STony Lindgren 
5244d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_default_l3_slow__usbss = {
5254d38bd12STony Lindgren 	.master		= &dm816x_default_l3_slow_hwmod,
5264d38bd12STony Lindgren 	.slave		= &dm81xx_usbss_hwmod,
5274d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5284d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5294d38bd12STony Lindgren };
5304d38bd12STony Lindgren 
5314d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
5324d38bd12STony Lindgren 	.rev_offs	= 0x0000,
5334d38bd12STony Lindgren 	.sysc_offs	= 0x0010,
5344d38bd12STony Lindgren 	.syss_offs	= 0x0014,
5354d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
5364d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
5374d38bd12STony Lindgren 				SIDLE_SMART_WKUP,
5384d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
5394d38bd12STony Lindgren };
5404d38bd12STony Lindgren 
5414d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = {
5424d38bd12STony Lindgren 	.name = "timer",
5434d38bd12STony Lindgren 	.sysc = &dm816x_timer_sysc,
5444d38bd12STony Lindgren };
5454d38bd12STony Lindgren 
5464d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
5474d38bd12STony Lindgren 	.timer_capability	= OMAP_TIMER_ALWON,
5484d38bd12STony Lindgren };
5494d38bd12STony Lindgren 
5504d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = {
5514d38bd12STony Lindgren 	.name		= "timer1",
5524d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5534d38bd12STony Lindgren 	.main_clk	= "timer1_fck",
5544d38bd12STony Lindgren 	.prcm		= {
5554d38bd12STony Lindgren 		.omap4 = {
5564d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
5574d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5584d38bd12STony Lindgren 		},
5594d38bd12STony Lindgren 	},
5604d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
5614d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
5624d38bd12STony Lindgren };
5634d38bd12STony Lindgren 
5644d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
5654d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
5664d38bd12STony Lindgren 	.slave		= &dm816x_timer1_hwmod,
5674d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5684d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5694d38bd12STony Lindgren };
5704d38bd12STony Lindgren 
5714d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = {
5724d38bd12STony Lindgren 	.name		= "timer2",
5734d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5744d38bd12STony Lindgren 	.main_clk	= "timer2_fck",
5754d38bd12STony Lindgren 	.prcm		= {
5764d38bd12STony Lindgren 		.omap4 = {
5774d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
5784d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
5794d38bd12STony Lindgren 		},
5804d38bd12STony Lindgren 	},
5814d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
5824d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
5834d38bd12STony Lindgren };
5844d38bd12STony Lindgren 
5854d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
5864d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
5874d38bd12STony Lindgren 	.slave		= &dm816x_timer2_hwmod,
5884d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
5894d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
5904d38bd12STony Lindgren };
5914d38bd12STony Lindgren 
5924d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = {
5934d38bd12STony Lindgren 	.name		= "timer3",
5944d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
5954d38bd12STony Lindgren 	.main_clk	= "timer3_fck",
5964d38bd12STony Lindgren 	.prcm		= {
5974d38bd12STony Lindgren 		.omap4 = {
5984d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
5994d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6004d38bd12STony Lindgren 		},
6014d38bd12STony Lindgren 	},
6024d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6034d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6044d38bd12STony Lindgren };
6054d38bd12STony Lindgren 
6064d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
6074d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
6084d38bd12STony Lindgren 	.slave		= &dm816x_timer3_hwmod,
6094d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6104d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6114d38bd12STony Lindgren };
6124d38bd12STony Lindgren 
6134d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = {
6144d38bd12STony Lindgren 	.name		= "timer4",
6154d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6164d38bd12STony Lindgren 	.main_clk	= "timer4_fck",
6174d38bd12STony Lindgren 	.prcm		= {
6184d38bd12STony Lindgren 		.omap4 = {
6194d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
6204d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6214d38bd12STony Lindgren 		},
6224d38bd12STony Lindgren 	},
6234d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6244d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6254d38bd12STony Lindgren };
6264d38bd12STony Lindgren 
6274d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
6284d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
6294d38bd12STony Lindgren 	.slave		= &dm816x_timer4_hwmod,
6304d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6314d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6324d38bd12STony Lindgren };
6334d38bd12STony Lindgren 
6344d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = {
6354d38bd12STony Lindgren 	.name		= "timer5",
6364d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6374d38bd12STony Lindgren 	.main_clk	= "timer5_fck",
6384d38bd12STony Lindgren 	.prcm		= {
6394d38bd12STony Lindgren 		.omap4 = {
6404d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
6414d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6424d38bd12STony Lindgren 		},
6434d38bd12STony Lindgren 	},
6444d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6454d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6464d38bd12STony Lindgren };
6474d38bd12STony Lindgren 
6484d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
6494d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
6504d38bd12STony Lindgren 	.slave		= &dm816x_timer5_hwmod,
6514d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6524d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6534d38bd12STony Lindgren };
6544d38bd12STony Lindgren 
6554d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = {
6564d38bd12STony Lindgren 	.name		= "timer6",
6574d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6584d38bd12STony Lindgren 	.main_clk	= "timer6_fck",
6594d38bd12STony Lindgren 	.prcm		= {
6604d38bd12STony Lindgren 		.omap4 = {
6614d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
6624d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6634d38bd12STony Lindgren 		},
6644d38bd12STony Lindgren 	},
6654d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6664d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6674d38bd12STony Lindgren };
6684d38bd12STony Lindgren 
6694d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
6704d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
6714d38bd12STony Lindgren 	.slave		= &dm816x_timer6_hwmod,
6724d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6734d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6744d38bd12STony Lindgren };
6754d38bd12STony Lindgren 
6764d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = {
6774d38bd12STony Lindgren 	.name		= "timer7",
6784d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
6794d38bd12STony Lindgren 	.main_clk	= "timer7_fck",
6804d38bd12STony Lindgren 	.prcm		= {
6814d38bd12STony Lindgren 		.omap4 = {
6824d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
6834d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
6844d38bd12STony Lindgren 		},
6854d38bd12STony Lindgren 	},
6864d38bd12STony Lindgren 	.dev_attr	= &capability_alwon_dev_attr,
6874d38bd12STony Lindgren 	.class		= &dm816x_timer_hwmod_class,
6884d38bd12STony Lindgren };
6894d38bd12STony Lindgren 
6904d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
6914d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
6924d38bd12STony Lindgren 	.slave		= &dm816x_timer7_hwmod,
6934d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
6944d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
6954d38bd12STony Lindgren };
6964d38bd12STony Lindgren 
6974d38bd12STony Lindgren /* EMAC Ethernet */
6984d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
6994d38bd12STony Lindgren 	.rev_offs	= 0x0,
7004d38bd12STony Lindgren 	.sysc_offs	= 0x4,
7014d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_SOFTRESET,
7024d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type2,
7034d38bd12STony Lindgren };
7044d38bd12STony Lindgren 
7054d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = {
7064d38bd12STony Lindgren 	.name		= "emac",
7074d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
7084d38bd12STony Lindgren };
7094d38bd12STony Lindgren 
7104d38bd12STony Lindgren /*
7114d38bd12STony Lindgren  * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
7124d38bd12STony Lindgren  * driver probed before EMAC0, we let MDIO do the clock idling.
7134d38bd12STony Lindgren  */
7144d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = {
7154d38bd12STony Lindgren 	.name		= "emac0",
7164d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7174d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
7184d38bd12STony Lindgren };
7194d38bd12STony Lindgren 
7204d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac0 = {
7214d38bd12STony Lindgren 	.master		= &dm816x_l4_hs_hwmod,
7224d38bd12STony Lindgren 	.slave		= &dm816x_emac0_hwmod,
7234d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
7244d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7254d38bd12STony Lindgren };
7264d38bd12STony Lindgren 
7274d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mdio_hwmod_class = {
7284d38bd12STony Lindgren 	.name		= "davinci_mdio",
7294d38bd12STony Lindgren 	.sysc		= &dm816x_emac_sysc,
7304d38bd12STony Lindgren };
7314d38bd12STony Lindgren 
732*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_emac0_mdio_hwmod = {
7334d38bd12STony Lindgren 	.name		= "davinci_mdio",
7344d38bd12STony Lindgren 	.class		= &dm816x_mdio_hwmod_class,
7354d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7364d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
7374d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
7384d38bd12STony Lindgren 	/*
7394d38bd12STony Lindgren 	 * REVISIT: This should be moved to the emac0_hwmod
7404d38bd12STony Lindgren 	 * once we have a better way to handle device slaves.
7414d38bd12STony Lindgren 	 */
7424d38bd12STony Lindgren 	.prcm		= {
7434d38bd12STony Lindgren 		.omap4 = {
7444d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_0_CLKCTRL,
7454d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7464d38bd12STony Lindgren 		},
7474d38bd12STony Lindgren 	},
7484d38bd12STony Lindgren };
7494d38bd12STony Lindgren 
750*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_emac0__mdio = {
7514d38bd12STony Lindgren 	.master		= &dm816x_l4_hs_hwmod,
7524d38bd12STony Lindgren 	.slave		= &dm816x_emac0_mdio_hwmod,
7534d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7544d38bd12STony Lindgren };
7554d38bd12STony Lindgren 
7564d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = {
7574d38bd12STony Lindgren 	.name		= "emac1",
7584d38bd12STony Lindgren 	.clkdm_name	= "alwon_ethernet_clkdm",
7594d38bd12STony Lindgren 	.main_clk	= "sysclk24_ck",
7604d38bd12STony Lindgren 	.flags		= HWMOD_NO_IDLEST,
7614d38bd12STony Lindgren 	.prcm		= {
7624d38bd12STony Lindgren 		.omap4 = {
7634d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
7644d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
7654d38bd12STony Lindgren 		},
7664d38bd12STony Lindgren 	},
7674d38bd12STony Lindgren 	.class		= &dm816x_emac_hwmod_class,
7684d38bd12STony Lindgren };
7694d38bd12STony Lindgren 
7704d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
7714d38bd12STony Lindgren 	.master		= &dm816x_l4_hs_hwmod,
7724d38bd12STony Lindgren 	.slave		= &dm816x_emac1_hwmod,
7734d38bd12STony Lindgren 	.clk		= "sysclk5_ck",
7744d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
7754d38bd12STony Lindgren };
7764d38bd12STony Lindgren 
7774d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = {
7784d38bd12STony Lindgren 	.rev_offs	= 0x0,
7794d38bd12STony Lindgren 	.sysc_offs	= 0x110,
7804d38bd12STony Lindgren 	.syss_offs	= 0x114,
7814d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
7824d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
7834d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
7844d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
7854d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
7864d38bd12STony Lindgren };
7874d38bd12STony Lindgren 
7884d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mmc_class = {
7894d38bd12STony Lindgren 	.name = "mmc",
7904d38bd12STony Lindgren 	.sysc = &dm816x_mmc_sysc,
7914d38bd12STony Lindgren };
7924d38bd12STony Lindgren 
7934d38bd12STony Lindgren static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = {
7944d38bd12STony Lindgren 	{ .role = "dbck", .clk = "sysclk18_ck", },
7954d38bd12STony Lindgren };
7964d38bd12STony Lindgren 
7974d38bd12STony Lindgren static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
7984d38bd12STony Lindgren 	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
7994d38bd12STony Lindgren };
8004d38bd12STony Lindgren 
8014d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = {
8024d38bd12STony Lindgren 	.name		= "mmc1",
8034d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8044d38bd12STony Lindgren 	.opt_clks	= dm816x_mmc1_opt_clks,
8054d38bd12STony Lindgren 	.opt_clks_cnt	= ARRAY_SIZE(dm816x_mmc1_opt_clks),
8064d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
8074d38bd12STony Lindgren 	.prcm		= {
8084d38bd12STony Lindgren 		.omap4 = {
8094d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
8104d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8114d38bd12STony Lindgren 		},
8124d38bd12STony Lindgren 	},
8134d38bd12STony Lindgren 	.dev_attr	= &mmc1_dev_attr,
8144d38bd12STony Lindgren 	.class		= &dm816x_mmc_class,
8154d38bd12STony Lindgren };
8164d38bd12STony Lindgren 
8174d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
8184d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
8194d38bd12STony Lindgren 	.slave		= &dm816x_mmc1_hwmod,
8204d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
8214d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8224d38bd12STony Lindgren 	.flags		= OMAP_FIREWALL_L4
8234d38bd12STony Lindgren };
8244d38bd12STony Lindgren 
8254d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
8264d38bd12STony Lindgren 	.rev_offs	= 0x0,
8274d38bd12STony Lindgren 	.sysc_offs	= 0x110,
8284d38bd12STony Lindgren 	.syss_offs	= 0x114,
8294d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
8304d38bd12STony Lindgren 				SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
8314d38bd12STony Lindgren 				SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
8324d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
8334d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
8344d38bd12STony Lindgren };
8354d38bd12STony Lindgren 
8364d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = {
8374d38bd12STony Lindgren 	.name = "mcspi",
8384d38bd12STony Lindgren 	.sysc = &dm816x_mcspi_sysc,
8394d38bd12STony Lindgren 	.rev = OMAP3_MCSPI_REV,
8404d38bd12STony Lindgren };
8414d38bd12STony Lindgren 
8424d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
8434d38bd12STony Lindgren 	.num_chipselect = 4,
8444d38bd12STony Lindgren };
8454d38bd12STony Lindgren 
8464d38bd12STony Lindgren static struct omap_hwmod dm816x_mcspi1_hwmod = {
8474d38bd12STony Lindgren 	.name		= "mcspi1",
8484d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8494d38bd12STony Lindgren 	.main_clk	= "sysclk10_ck",
8504d38bd12STony Lindgren 	.prcm		= {
8514d38bd12STony Lindgren 		.omap4 = {
8524d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_SPI_CLKCTRL,
8534d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8544d38bd12STony Lindgren 		},
8554d38bd12STony Lindgren 	},
8564d38bd12STony Lindgren 	.class		= &dm816x_mcspi_class,
8574d38bd12STony Lindgren 	.dev_attr	= &dm816x_mcspi1_dev_attr,
8584d38bd12STony Lindgren };
8594d38bd12STony Lindgren 
8604d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mcspi1 = {
8614d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
8624d38bd12STony Lindgren 	.slave		= &dm816x_mcspi1_hwmod,
8634d38bd12STony Lindgren 	.clk		= "sysclk6_ck",
8644d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8654d38bd12STony Lindgren };
8664d38bd12STony Lindgren 
8674d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mailbox_sysc = {
8684d38bd12STony Lindgren 	.rev_offs	= 0x000,
8694d38bd12STony Lindgren 	.sysc_offs	= 0x010,
8704d38bd12STony Lindgren 	.syss_offs	= 0x014,
8714d38bd12STony Lindgren 	.sysc_flags	= SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
8724d38bd12STony Lindgren 				SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
8734d38bd12STony Lindgren 	.idlemodes	= SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
8744d38bd12STony Lindgren 	.sysc_fields	= &omap_hwmod_sysc_type1,
8754d38bd12STony Lindgren };
8764d38bd12STony Lindgren 
8774d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mailbox_hwmod_class = {
8784d38bd12STony Lindgren 	.name = "mailbox",
8794d38bd12STony Lindgren 	.sysc = &dm816x_mailbox_sysc,
8804d38bd12STony Lindgren };
8814d38bd12STony Lindgren 
8824d38bd12STony Lindgren static struct omap_hwmod dm816x_mailbox_hwmod = {
8834d38bd12STony Lindgren 	.name		= "mailbox",
8844d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
8854d38bd12STony Lindgren 	.class		= &dm816x_mailbox_hwmod_class,
8864d38bd12STony Lindgren 	.main_clk	= "sysclk6_ck",
8874d38bd12STony Lindgren 	.prcm		= {
8884d38bd12STony Lindgren 		.omap4 = {
8894d38bd12STony Lindgren 			.clkctrl_offs = DM816X_CM_ALWON_MAILBOX_CLKCTRL,
8904d38bd12STony Lindgren 			.modulemode = MODULEMODE_SWCTRL,
8914d38bd12STony Lindgren 		},
8924d38bd12STony Lindgren 	},
8934d38bd12STony Lindgren };
8944d38bd12STony Lindgren 
8954d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mailbox = {
8964d38bd12STony Lindgren 	.master		= &dm816x_l4_ls_hwmod,
8974d38bd12STony Lindgren 	.slave		= &dm816x_mailbox_hwmod,
8984d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
8994d38bd12STony Lindgren };
9004d38bd12STony Lindgren 
9014d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tpcc_hwmod_class = {
9024d38bd12STony Lindgren 	.name		= "tpcc",
9034d38bd12STony Lindgren };
9044d38bd12STony Lindgren 
905*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_tpcc_hwmod = {
9064d38bd12STony Lindgren 	.name		= "tpcc",
9074d38bd12STony Lindgren 	.class		= &dm816x_tpcc_hwmod_class,
9084d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9094d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
9104d38bd12STony Lindgren 	.prcm		= {
9114d38bd12STony Lindgren 		.omap4	= {
9124d38bd12STony Lindgren 			.clkctrl_offs	= DM816X_CM_ALWON_TPCC_CLKCTRL,
9134d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
9144d38bd12STony Lindgren 		},
9154d38bd12STony Lindgren 	},
9164d38bd12STony Lindgren };
9174d38bd12STony Lindgren 
918*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tpcc = {
9194d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_fast_hwmod,
9204d38bd12STony Lindgren 	.slave		= &dm816x_tpcc_hwmod,
9214d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
9224d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9234d38bd12STony Lindgren };
9244d38bd12STony Lindgren 
9254d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc0_addr_space[] = {
9264d38bd12STony Lindgren 	{
9274d38bd12STony Lindgren 		.pa_start	= 0x49800000,
9284d38bd12STony Lindgren 		.pa_end		= 0x49800000 + SZ_8K - 1,
9294d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
9304d38bd12STony Lindgren 	},
9314d38bd12STony Lindgren 	{ },
9324d38bd12STony Lindgren };
9334d38bd12STony Lindgren 
9344d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc0_hwmod_class = {
9354d38bd12STony Lindgren 	.name		= "tptc0",
9364d38bd12STony Lindgren };
9374d38bd12STony Lindgren 
938*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_tptc0_hwmod = {
9394d38bd12STony Lindgren 	.name		= "tptc0",
9404d38bd12STony Lindgren 	.class		= &dm816x_tptc0_hwmod_class,
9414d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9424d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
9434d38bd12STony Lindgren 	.prcm		= {
9444d38bd12STony Lindgren 		.omap4	= {
9454d38bd12STony Lindgren 			.clkctrl_offs	= DM816X_CM_ALWON_TPTC0_CLKCTRL,
9464d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
9474d38bd12STony Lindgren 		},
9484d38bd12STony Lindgren 	},
9494d38bd12STony Lindgren };
9504d38bd12STony Lindgren 
951*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc0 = {
9524d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_fast_hwmod,
9534d38bd12STony Lindgren 	.slave		= &dm816x_tptc0_hwmod,
9544d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
9554d38bd12STony Lindgren 	.addr		= dm816x_tptc0_addr_space,
9564d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9574d38bd12STony Lindgren };
9584d38bd12STony Lindgren 
959*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_tptc0__alwon_l3_fast = {
9604d38bd12STony Lindgren 	.master		= &dm816x_tptc0_hwmod,
9614d38bd12STony Lindgren 	.slave		= &dm816x_alwon_l3_fast_hwmod,
9624d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
9634d38bd12STony Lindgren 	.addr		= dm816x_tptc0_addr_space,
9644d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9654d38bd12STony Lindgren };
9664d38bd12STony Lindgren 
9674d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc1_addr_space[] = {
9684d38bd12STony Lindgren 	{
9694d38bd12STony Lindgren 		.pa_start	= 0x49900000,
9704d38bd12STony Lindgren 		.pa_end		= 0x49900000 + SZ_8K - 1,
9714d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
9724d38bd12STony Lindgren 	},
9734d38bd12STony Lindgren 	{ },
9744d38bd12STony Lindgren };
9754d38bd12STony Lindgren 
9764d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc1_hwmod_class = {
9774d38bd12STony Lindgren 	.name		= "tptc1",
9784d38bd12STony Lindgren };
9794d38bd12STony Lindgren 
980*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_tptc1_hwmod = {
9814d38bd12STony Lindgren 	.name		= "tptc1",
9824d38bd12STony Lindgren 	.class		= &dm816x_tptc1_hwmod_class,
9834d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
9844d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
9854d38bd12STony Lindgren 	.prcm		= {
9864d38bd12STony Lindgren 		.omap4	= {
9874d38bd12STony Lindgren 			.clkctrl_offs	= DM816X_CM_ALWON_TPTC1_CLKCTRL,
9884d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
9894d38bd12STony Lindgren 		},
9904d38bd12STony Lindgren 	},
9914d38bd12STony Lindgren };
9924d38bd12STony Lindgren 
993*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc1 = {
9944d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_fast_hwmod,
9954d38bd12STony Lindgren 	.slave		= &dm816x_tptc1_hwmod,
9964d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
9974d38bd12STony Lindgren 	.addr		= dm816x_tptc1_addr_space,
9984d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
9994d38bd12STony Lindgren };
10004d38bd12STony Lindgren 
1001*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_tptc1__alwon_l3_fast = {
10024d38bd12STony Lindgren 	.master		= &dm816x_tptc1_hwmod,
10034d38bd12STony Lindgren 	.slave		= &dm816x_alwon_l3_fast_hwmod,
10044d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10054d38bd12STony Lindgren 	.addr		= dm816x_tptc1_addr_space,
10064d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10074d38bd12STony Lindgren };
10084d38bd12STony Lindgren 
10094d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc2_addr_space[] = {
10104d38bd12STony Lindgren 	{
10114d38bd12STony Lindgren 		.pa_start	= 0x49a00000,
10124d38bd12STony Lindgren 		.pa_end		= 0x49a00000 + SZ_8K - 1,
10134d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
10144d38bd12STony Lindgren 	},
10154d38bd12STony Lindgren 	{ },
10164d38bd12STony Lindgren };
10174d38bd12STony Lindgren 
10184d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc2_hwmod_class = {
10194d38bd12STony Lindgren 	.name		= "tptc2",
10204d38bd12STony Lindgren };
10214d38bd12STony Lindgren 
1022*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_tptc2_hwmod = {
10234d38bd12STony Lindgren 	.name		= "tptc2",
10244d38bd12STony Lindgren 	.class		= &dm816x_tptc2_hwmod_class,
10254d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10264d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10274d38bd12STony Lindgren 	.prcm		= {
10284d38bd12STony Lindgren 		.omap4	= {
10294d38bd12STony Lindgren 			.clkctrl_offs	= DM816X_CM_ALWON_TPTC2_CLKCTRL,
10304d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10314d38bd12STony Lindgren 		},
10324d38bd12STony Lindgren 	},
10334d38bd12STony Lindgren };
10344d38bd12STony Lindgren 
1035*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc2 = {
10364d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_fast_hwmod,
10374d38bd12STony Lindgren 	.slave		= &dm816x_tptc2_hwmod,
10384d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10394d38bd12STony Lindgren 	.addr		= dm816x_tptc2_addr_space,
10404d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10414d38bd12STony Lindgren };
10424d38bd12STony Lindgren 
1043*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_tptc2__alwon_l3_fast = {
10444d38bd12STony Lindgren 	.master		= &dm816x_tptc2_hwmod,
10454d38bd12STony Lindgren 	.slave		= &dm816x_alwon_l3_fast_hwmod,
10464d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10474d38bd12STony Lindgren 	.addr		= dm816x_tptc2_addr_space,
10484d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10494d38bd12STony Lindgren };
10504d38bd12STony Lindgren 
10514d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc3_addr_space[] = {
10524d38bd12STony Lindgren 	{
10534d38bd12STony Lindgren 		.pa_start	= 0x49b00000,
10544d38bd12STony Lindgren 		.pa_end		= 0x49b00000 + SZ_8K - 1,
10554d38bd12STony Lindgren 		.flags		= ADDR_TYPE_RT,
10564d38bd12STony Lindgren 	},
10574d38bd12STony Lindgren 	{ },
10584d38bd12STony Lindgren };
10594d38bd12STony Lindgren 
10604d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc3_hwmod_class = {
10614d38bd12STony Lindgren 	.name		= "tptc3",
10624d38bd12STony Lindgren };
10634d38bd12STony Lindgren 
1064*f734a9b3SSekhar Nori static struct omap_hwmod dm816x_tptc3_hwmod = {
10654d38bd12STony Lindgren 	.name		= "tptc3",
10664d38bd12STony Lindgren 	.class		= &dm816x_tptc3_hwmod_class,
10674d38bd12STony Lindgren 	.clkdm_name	= "alwon_l3s_clkdm",
10684d38bd12STony Lindgren 	.main_clk	= "sysclk4_ck",
10694d38bd12STony Lindgren 	.prcm		= {
10704d38bd12STony Lindgren 		.omap4	= {
10714d38bd12STony Lindgren 			.clkctrl_offs	= DM816X_CM_ALWON_TPTC3_CLKCTRL,
10724d38bd12STony Lindgren 			.modulemode	= MODULEMODE_SWCTRL,
10734d38bd12STony Lindgren 		},
10744d38bd12STony Lindgren 	},
10754d38bd12STony Lindgren };
10764d38bd12STony Lindgren 
1077*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc3 = {
10784d38bd12STony Lindgren 	.master		= &dm816x_alwon_l3_fast_hwmod,
10794d38bd12STony Lindgren 	.slave		= &dm816x_tptc3_hwmod,
10804d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10814d38bd12STony Lindgren 	.addr		= dm816x_tptc3_addr_space,
10824d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10834d38bd12STony Lindgren };
10844d38bd12STony Lindgren 
1085*f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm816x_tptc3__alwon_l3_fast = {
10864d38bd12STony Lindgren 	.master		= &dm816x_tptc3_hwmod,
10874d38bd12STony Lindgren 	.slave		= &dm816x_alwon_l3_fast_hwmod,
10884d38bd12STony Lindgren 	.clk		= "sysclk4_ck",
10894d38bd12STony Lindgren 	.addr		= dm816x_tptc3_addr_space,
10904d38bd12STony Lindgren 	.user		= OCP_USER_MPU,
10914d38bd12STony Lindgren };
10924d38bd12STony Lindgren 
10934d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
10944d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_slow,
10954d38bd12STony Lindgren 	&dm816x_mpu__alwon_l3_med,
10964d38bd12STony Lindgren 	&dm816x_alwon_l3_slow__l4_ls,
10974d38bd12STony Lindgren 	&dm816x_alwon_l3_slow__l4_hs,
10984d38bd12STony Lindgren 	&dm816x_l4_ls__uart1,
10994d38bd12STony Lindgren 	&dm816x_l4_ls__uart2,
11004d38bd12STony Lindgren 	&dm816x_l4_ls__uart3,
11014d38bd12STony Lindgren 	&dm816x_l4_ls__wd_timer1,
11024d38bd12STony Lindgren 	&dm816x_l4_ls__i2c1,
11034d38bd12STony Lindgren 	&dm816x_l4_ls__i2c2,
11044d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio1,
11054d38bd12STony Lindgren 	&dm81xx_l4_ls__gpio2,
11064d38bd12STony Lindgren 	&dm81xx_l4_ls__elm,
11074d38bd12STony Lindgren 	&dm816x_l4_ls__mmc1,
11084d38bd12STony Lindgren 	&dm816x_l4_ls__timer1,
11094d38bd12STony Lindgren 	&dm816x_l4_ls__timer2,
11104d38bd12STony Lindgren 	&dm816x_l4_ls__timer3,
11114d38bd12STony Lindgren 	&dm816x_l4_ls__timer4,
11124d38bd12STony Lindgren 	&dm816x_l4_ls__timer5,
11134d38bd12STony Lindgren 	&dm816x_l4_ls__timer6,
11144d38bd12STony Lindgren 	&dm816x_l4_ls__timer7,
11154d38bd12STony Lindgren 	&dm816x_l4_ls__mcspi1,
11164d38bd12STony Lindgren 	&dm816x_l4_ls__mailbox,
11174d38bd12STony Lindgren 	&dm816x_l4_hs__emac0,
11184d38bd12STony Lindgren 	&dm816x_emac0__mdio,
11194d38bd12STony Lindgren 	&dm816x_l4_hs__emac1,
11204d38bd12STony Lindgren 	&dm816x_alwon_l3_fast__tpcc,
11214d38bd12STony Lindgren 	&dm816x_alwon_l3_fast__tptc0,
11224d38bd12STony Lindgren 	&dm816x_alwon_l3_fast__tptc1,
11234d38bd12STony Lindgren 	&dm816x_alwon_l3_fast__tptc2,
11244d38bd12STony Lindgren 	&dm816x_alwon_l3_fast__tptc3,
11254d38bd12STony Lindgren 	&dm816x_tptc0__alwon_l3_fast,
11264d38bd12STony Lindgren 	&dm816x_tptc1__alwon_l3_fast,
11274d38bd12STony Lindgren 	&dm816x_tptc2__alwon_l3_fast,
11284d38bd12STony Lindgren 	&dm816x_tptc3__alwon_l3_fast,
11294d38bd12STony Lindgren 	&dm81xx_alwon_l3_slow__gpmc,
11304d38bd12STony Lindgren 	&dm81xx_default_l3_slow__usbss,
11314d38bd12STony Lindgren 	NULL,
11324d38bd12STony Lindgren };
11334d38bd12STony Lindgren 
11344d38bd12STony Lindgren int __init ti81xx_hwmod_init(void)
11354d38bd12STony Lindgren {
11364d38bd12STony Lindgren 	omap_hwmod_init();
11374d38bd12STony Lindgren 	return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
11384d38bd12STony Lindgren }
1139