14d38bd12STony Lindgren /* 24d38bd12STony Lindgren * DM81xx hwmod data. 34d38bd12STony Lindgren * 44d38bd12STony Lindgren * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ 54d38bd12STony Lindgren * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/ 64d38bd12STony Lindgren * 74d38bd12STony Lindgren * This program is free software; you can redistribute it and/or 84d38bd12STony Lindgren * modify it under the terms of the GNU General Public License as 94d38bd12STony Lindgren * published by the Free Software Foundation version 2. 104d38bd12STony Lindgren * 114d38bd12STony Lindgren * This program is distributed "as is" WITHOUT ANY WARRANTY of any 124d38bd12STony Lindgren * kind, whether express or implied; without even the implied warranty 134d38bd12STony Lindgren * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 144d38bd12STony Lindgren * GNU General Public License for more details. 154d38bd12STony Lindgren * 164d38bd12STony Lindgren */ 174d38bd12STony Lindgren 184d38bd12STony Lindgren #include <linux/platform_data/gpio-omap.h> 194d38bd12STony Lindgren #include <linux/platform_data/hsmmc-omap.h> 204d38bd12STony Lindgren #include <linux/platform_data/spi-omap2-mcspi.h> 214d38bd12STony Lindgren #include <plat/dmtimer.h> 224d38bd12STony Lindgren 234d38bd12STony Lindgren #include "omap_hwmod_common_data.h" 244d38bd12STony Lindgren #include "cm81xx.h" 254d38bd12STony Lindgren #include "ti81xx.h" 264d38bd12STony Lindgren #include "wd_timer.h" 274d38bd12STony Lindgren 284d38bd12STony Lindgren /* 294d38bd12STony Lindgren * DM816X hardware modules integration data 304d38bd12STony Lindgren * 314d38bd12STony Lindgren * Note: This is incomplete and at present, not generated from h/w database. 324d38bd12STony Lindgren */ 334d38bd12STony Lindgren 344d38bd12STony Lindgren /* 357e1b11d1STony Lindgren * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS" 367e1b11d1STony Lindgren * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400. 374d38bd12STony Lindgren */ 387e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP0_CLKCTRL 0x140 397e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP1_CLKCTRL 0x144 407e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP2_CLKCTRL 0x148 417e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCBSP_CLKCTRL 0x14c 427e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_0_CLKCTRL 0x150 437e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_1_CLKCTRL 0x154 447e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_2_CLKCTRL 0x158 457e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL 0x15c 467e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL 0x160 477e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_0_CLKCTRL 0x164 487e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_1_CLKCTRL 0x168 497e1b11d1STony Lindgren #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL 0x18c 507e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPI_CLKCTRL 0x190 517e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL 0x194 527e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL 0x198 537e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL 0x19c 547e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL 0x1a8 557e1b11d1STony Lindgren #define DM81XX_CM_ALWON_CONTROL_CLKCTRL 0x1c4 567e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPMC_CLKCTRL 0x1d0 577e1b11d1STony Lindgren #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL 0x1d4 587e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L3_CLKCTRL 0x1e4 597e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4HS_CLKCTRL 0x1e8 607e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4LS_CLKCTRL 0x1ec 617e1b11d1STony Lindgren #define DM81XX_CM_ALWON_RTC_CLKCTRL 0x1f0 627e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPCC_CLKCTRL 0x1f4 637e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC0_CLKCTRL 0x1f8 647e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC1_CLKCTRL 0x1fc 657e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC2_CLKCTRL 0x200 667e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC3_CLKCTRL 0x204 677e1b11d1STony Lindgren 687e1b11d1STony Lindgren /* Registers specific to dm814x */ 697e1b11d1STony Lindgren #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL 0x16c 707e1b11d1STony Lindgren #define DM814X_CM_ALWON_ATL_CLKCTRL 0x170 717e1b11d1STony Lindgren #define DM814X_CM_ALWON_MLB_CLKCTRL 0x174 727e1b11d1STony Lindgren #define DM814X_CM_ALWON_PATA_CLKCTRL 0x178 737e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_3_CLKCTRL 0x180 747e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_4_CLKCTRL 0x184 757e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_5_CLKCTRL 0x188 767e1b11d1STony Lindgren #define DM814X_CM_ALWON_OCM_0_CLKCTRL 0x1b4 777e1b11d1STony Lindgren #define DM814X_CM_ALWON_VCP_CLKCTRL 0x1b8 787e1b11d1STony Lindgren #define DM814X_CM_ALWON_MPU_CLKCTRL 0x1dc 797e1b11d1STony Lindgren #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL 0x1e0 807e1b11d1STony Lindgren #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL 0x218 817e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL 0x21c 827e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL 0x220 837e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL 0x224 847e1b11d1STony Lindgren #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL 0x228 857e1b11d1STony Lindgren 867e1b11d1STony Lindgren /* Registers specific to dm816x */ 874d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE 0x1400 884d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE) 894d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE) 904d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE) 914d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE) 924d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE) 934d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE) 944d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE) 954d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE) 964d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE) 974d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE) 984d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE) 994d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE) 1004d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE) 1014d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE) 1024d38bd12STony Lindgren 1034d38bd12STony Lindgren /* 1044d38bd12STony Lindgren * The default .clkctrl_offs field is offset from CM_DEFAULT, that's 1054d38bd12STony Lindgren * TRM 18.7.6 CM_DEFAULT device register values minus 0x500 1064d38bd12STony Lindgren */ 107f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_OFFSET 0x500 108f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET) 10949e9e616SKevin Hilman #define DM81XX_CM_DEFAULT_SATA_CLKCTRL (0x560 - DM81XX_CM_DEFAULT_OFFSET) 1104d38bd12STony Lindgren 1114d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */ 1127e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = { 1134d38bd12STony Lindgren .name = "alwon_l3_slow", 1144d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1154d38bd12STony Lindgren .class = &l3_hwmod_class, 1164d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1174d38bd12STony Lindgren }; 1184d38bd12STony Lindgren 1197e1b11d1STony Lindgren static struct omap_hwmod dm81xx_default_l3_slow_hwmod = { 1204d38bd12STony Lindgren .name = "default_l3_slow", 1214d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 1224d38bd12STony Lindgren .class = &l3_hwmod_class, 1234d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1244d38bd12STony Lindgren }; 1254d38bd12STony Lindgren 1267e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_med_hwmod = { 1274d38bd12STony Lindgren .name = "l3_med", 1284d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1294d38bd12STony Lindgren .class = &l3_hwmod_class, 1304d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1314d38bd12STony Lindgren }; 1324d38bd12STony Lindgren 1337e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod = { 1344d38bd12STony Lindgren .name = "l3_fast", 1354d38bd12STony Lindgren .clkdm_name = "alwon_l3_fast_clkdm", 1364d38bd12STony Lindgren .class = &l3_hwmod_class, 1374d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1384d38bd12STony Lindgren }; 1394d38bd12STony Lindgren 1404d38bd12STony Lindgren /* 1414d38bd12STony Lindgren * L4 standard peripherals, see TRM table 1-12 for devices using this. 1424d38bd12STony Lindgren * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock. 1434d38bd12STony Lindgren */ 1447e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_ls_hwmod = { 1454d38bd12STony Lindgren .name = "l4_ls", 1464d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1474d38bd12STony Lindgren .class = &l4_hwmod_class, 14829f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 1494d38bd12STony Lindgren }; 1504d38bd12STony Lindgren 1514d38bd12STony Lindgren /* 1524d38bd12STony Lindgren * L4 high-speed peripherals. For devices using this, please see the TRM 1534d38bd12STony Lindgren * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM 1544d38bd12STony Lindgren * table 1-73 for devices using 250MHz SYSCLK5 clock. 1554d38bd12STony Lindgren */ 1567e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_hs_hwmod = { 1574d38bd12STony Lindgren .name = "l4_hs", 1584d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1594d38bd12STony Lindgren .class = &l4_hwmod_class, 16029f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 1614d38bd12STony Lindgren }; 1624d38bd12STony Lindgren 1634d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */ 1647e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = { 1657e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_slow_hwmod, 1667e1b11d1STony Lindgren .slave = &dm81xx_l4_ls_hwmod, 1674d38bd12STony Lindgren .user = OCP_USER_MPU, 1684d38bd12STony Lindgren }; 1694d38bd12STony Lindgren 1704d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */ 1717e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = { 1727e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_med_hwmod, 1737e1b11d1STony Lindgren .slave = &dm81xx_l4_hs_hwmod, 1744d38bd12STony Lindgren .user = OCP_USER_MPU, 1754d38bd12STony Lindgren }; 1764d38bd12STony Lindgren 1774d38bd12STony Lindgren /* MPU */ 1780f3ccb24STony Lindgren static struct omap_hwmod dm814x_mpu_hwmod = { 1790f3ccb24STony Lindgren .name = "mpu", 1800f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1810f3ccb24STony Lindgren .class = &mpu_hwmod_class, 1820f3ccb24STony Lindgren .flags = HWMOD_INIT_NO_IDLE, 1830f3ccb24STony Lindgren .main_clk = "mpu_ck", 1840f3ccb24STony Lindgren .prcm = { 1850f3ccb24STony Lindgren .omap4 = { 1860f3ccb24STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL, 1870f3ccb24STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1880f3ccb24STony Lindgren }, 1890f3ccb24STony Lindgren }, 1900f3ccb24STony Lindgren }; 1910f3ccb24STony Lindgren 1920f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = { 1930f3ccb24STony Lindgren .master = &dm814x_mpu_hwmod, 1940f3ccb24STony Lindgren .slave = &dm81xx_alwon_l3_slow_hwmod, 1950f3ccb24STony Lindgren .user = OCP_USER_MPU, 1960f3ccb24STony Lindgren }; 1970f3ccb24STony Lindgren 1980f3ccb24STony Lindgren /* L3 med peripheral interface running at 200MHz */ 1990f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = { 2000f3ccb24STony Lindgren .master = &dm814x_mpu_hwmod, 2010f3ccb24STony Lindgren .slave = &dm81xx_alwon_l3_med_hwmod, 2020f3ccb24STony Lindgren .user = OCP_USER_MPU, 2030f3ccb24STony Lindgren }; 2040f3ccb24STony Lindgren 2054d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = { 2064d38bd12STony Lindgren .name = "mpu", 2074d38bd12STony Lindgren .clkdm_name = "alwon_mpu_clkdm", 2084d38bd12STony Lindgren .class = &mpu_hwmod_class, 2094d38bd12STony Lindgren .flags = HWMOD_INIT_NO_IDLE, 2104d38bd12STony Lindgren .main_clk = "mpu_ck", 2114d38bd12STony Lindgren .prcm = { 2124d38bd12STony Lindgren .omap4 = { 2134d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL, 2144d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 2154d38bd12STony Lindgren }, 2164d38bd12STony Lindgren }, 2174d38bd12STony Lindgren }; 2184d38bd12STony Lindgren 2194d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = { 2204d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 2217e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_slow_hwmod, 2224d38bd12STony Lindgren .user = OCP_USER_MPU, 2234d38bd12STony Lindgren }; 2244d38bd12STony Lindgren 2254d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */ 2264d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = { 2274d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 2287e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_med_hwmod, 2294d38bd12STony Lindgren .user = OCP_USER_MPU, 2304d38bd12STony Lindgren }; 2314d38bd12STony Lindgren 232c5803246STony Lindgren /* RTC */ 233c5803246STony Lindgren static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = { 234c5803246STony Lindgren .rev_offs = 0x74, 235c5803246STony Lindgren .sysc_offs = 0x78, 236c5803246STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE, 237c5803246STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | 238c5803246STony Lindgren SIDLE_SMART | SIDLE_SMART_WKUP, 239c5803246STony Lindgren .sysc_fields = &omap_hwmod_sysc_type3, 240c5803246STony Lindgren }; 241c5803246STony Lindgren 242c5803246STony Lindgren static struct omap_hwmod_class ti81xx_rtc_hwmod_class = { 243c5803246STony Lindgren .name = "rtc", 244c5803246STony Lindgren .sysc = &ti81xx_rtc_sysc, 245c5803246STony Lindgren }; 246c5803246STony Lindgren 24741dc5483SBen Dooks static struct omap_hwmod ti81xx_rtc_hwmod = { 248c5803246STony Lindgren .name = "rtc", 249c5803246STony Lindgren .class = &ti81xx_rtc_hwmod_class, 250c5803246STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 251c5803246STony Lindgren .flags = HWMOD_NO_IDLEST, 252c5803246STony Lindgren .main_clk = "sysclk18_ck", 253c5803246STony Lindgren .prcm = { 254c5803246STony Lindgren .omap4 = { 255c5803246STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL, 256c5803246STony Lindgren .modulemode = MODULEMODE_SWCTRL, 257c5803246STony Lindgren }, 258c5803246STony Lindgren }, 259c5803246STony Lindgren }; 260c5803246STony Lindgren 261c5803246STony Lindgren static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = { 262c5803246STony Lindgren .master = &dm81xx_l4_ls_hwmod, 263c5803246STony Lindgren .slave = &ti81xx_rtc_hwmod, 264c5803246STony Lindgren .clk = "sysclk6_ck", 265c5803246STony Lindgren .user = OCP_USER_MPU, 266c5803246STony Lindgren }; 267c5803246STony Lindgren 2684d38bd12STony Lindgren /* UART common */ 2694d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = { 2704d38bd12STony Lindgren .rev_offs = 0x50, 2714d38bd12STony Lindgren .sysc_offs = 0x54, 2724d38bd12STony Lindgren .syss_offs = 0x58, 2734d38bd12STony Lindgren .sysc_flags = SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | 2744d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 2754d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 2764d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2774d38bd12STony Lindgren MSTANDBY_SMART_WKUP, 2784d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 2794d38bd12STony Lindgren }; 2804d38bd12STony Lindgren 2814d38bd12STony Lindgren static struct omap_hwmod_class uart_class = { 2824d38bd12STony Lindgren .name = "uart", 2834d38bd12STony Lindgren .sysc = &uart_sysc, 2844d38bd12STony Lindgren }; 2854d38bd12STony Lindgren 2867e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = { 2874d38bd12STony Lindgren .name = "uart1", 2884d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 2894d38bd12STony Lindgren .main_clk = "sysclk10_ck", 2904d38bd12STony Lindgren .prcm = { 2914d38bd12STony Lindgren .omap4 = { 2927e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL, 2934d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 2944d38bd12STony Lindgren }, 2954d38bd12STony Lindgren }, 2964d38bd12STony Lindgren .class = &uart_class, 2974d38bd12STony Lindgren .flags = DEBUG_TI81XXUART1_FLAGS, 2984d38bd12STony Lindgren }; 2994d38bd12STony Lindgren 3007e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = { 3017e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3027e1b11d1STony Lindgren .slave = &dm81xx_uart1_hwmod, 3034d38bd12STony Lindgren .clk = "sysclk6_ck", 3044d38bd12STony Lindgren .user = OCP_USER_MPU, 3054d38bd12STony Lindgren }; 3064d38bd12STony Lindgren 3077e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = { 3084d38bd12STony Lindgren .name = "uart2", 3094d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3104d38bd12STony Lindgren .main_clk = "sysclk10_ck", 3114d38bd12STony Lindgren .prcm = { 3124d38bd12STony Lindgren .omap4 = { 3137e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL, 3144d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3154d38bd12STony Lindgren }, 3164d38bd12STony Lindgren }, 3174d38bd12STony Lindgren .class = &uart_class, 3184d38bd12STony Lindgren .flags = DEBUG_TI81XXUART2_FLAGS, 3194d38bd12STony Lindgren }; 3204d38bd12STony Lindgren 3217e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = { 3227e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3237e1b11d1STony Lindgren .slave = &dm81xx_uart2_hwmod, 3244d38bd12STony Lindgren .clk = "sysclk6_ck", 3254d38bd12STony Lindgren .user = OCP_USER_MPU, 3264d38bd12STony Lindgren }; 3274d38bd12STony Lindgren 3287e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = { 3294d38bd12STony Lindgren .name = "uart3", 3304d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3314d38bd12STony Lindgren .main_clk = "sysclk10_ck", 3324d38bd12STony Lindgren .prcm = { 3334d38bd12STony Lindgren .omap4 = { 3347e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL, 3354d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3364d38bd12STony Lindgren }, 3374d38bd12STony Lindgren }, 3384d38bd12STony Lindgren .class = &uart_class, 3394d38bd12STony Lindgren .flags = DEBUG_TI81XXUART3_FLAGS, 3404d38bd12STony Lindgren }; 3414d38bd12STony Lindgren 3427e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = { 3437e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3447e1b11d1STony Lindgren .slave = &dm81xx_uart3_hwmod, 3454d38bd12STony Lindgren .clk = "sysclk6_ck", 3464d38bd12STony Lindgren .user = OCP_USER_MPU, 3474d38bd12STony Lindgren }; 3484d38bd12STony Lindgren 3494d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = { 3504d38bd12STony Lindgren .rev_offs = 0x0, 3514d38bd12STony Lindgren .sysc_offs = 0x10, 3524d38bd12STony Lindgren .syss_offs = 0x14, 3534d38bd12STony Lindgren .sysc_flags = SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | 3544d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 3554d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 3564d38bd12STony Lindgren }; 3574d38bd12STony Lindgren 3584d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = { 3594d38bd12STony Lindgren .name = "wd_timer", 3604d38bd12STony Lindgren .sysc = &wd_timer_sysc, 3614d38bd12STony Lindgren .pre_shutdown = &omap2_wd_timer_disable, 3624d38bd12STony Lindgren .reset = &omap2_wd_timer_reset, 3634d38bd12STony Lindgren }; 3644d38bd12STony Lindgren 3657e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = { 3664d38bd12STony Lindgren .name = "wd_timer", 3674d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3684d38bd12STony Lindgren .main_clk = "sysclk18_ck", 3694d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 3704d38bd12STony Lindgren .prcm = { 3714d38bd12STony Lindgren .omap4 = { 3727e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL, 3734d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3744d38bd12STony Lindgren }, 3754d38bd12STony Lindgren }, 3764d38bd12STony Lindgren .class = &wd_timer_class, 3774d38bd12STony Lindgren }; 3784d38bd12STony Lindgren 3797e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = { 3807e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3817e1b11d1STony Lindgren .slave = &dm81xx_wd_timer_hwmod, 3824d38bd12STony Lindgren .clk = "sysclk6_ck", 3834d38bd12STony Lindgren .user = OCP_USER_MPU, 3844d38bd12STony Lindgren }; 3854d38bd12STony Lindgren 3864d38bd12STony Lindgren /* I2C common */ 3874d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = { 3884d38bd12STony Lindgren .rev_offs = 0x0, 3894d38bd12STony Lindgren .sysc_offs = 0x10, 3904d38bd12STony Lindgren .syss_offs = 0x90, 3914d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | 3924d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 3934d38bd12STony Lindgren SYSC_HAS_AUTOIDLE, 3944d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 3954d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 3964d38bd12STony Lindgren }; 3974d38bd12STony Lindgren 3984d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = { 3994d38bd12STony Lindgren .name = "i2c", 4004d38bd12STony Lindgren .sysc = &i2c_sysc, 4014d38bd12STony Lindgren }; 4024d38bd12STony Lindgren 4034d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = { 4044d38bd12STony Lindgren .name = "i2c1", 4054d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4064d38bd12STony Lindgren .main_clk = "sysclk10_ck", 4074d38bd12STony Lindgren .prcm = { 4084d38bd12STony Lindgren .omap4 = { 4097e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL, 4104d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 4114d38bd12STony Lindgren }, 4124d38bd12STony Lindgren }, 4134d38bd12STony Lindgren .class = &i2c_class, 4144d38bd12STony Lindgren }; 4154d38bd12STony Lindgren 4167e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = { 4177e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 4184d38bd12STony Lindgren .slave = &dm81xx_i2c1_hwmod, 4194d38bd12STony Lindgren .clk = "sysclk6_ck", 4204d38bd12STony Lindgren .user = OCP_USER_MPU, 4214d38bd12STony Lindgren }; 4224d38bd12STony Lindgren 4237e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = { 4244d38bd12STony Lindgren .name = "i2c2", 4254d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4264d38bd12STony Lindgren .main_clk = "sysclk10_ck", 4274d38bd12STony Lindgren .prcm = { 4284d38bd12STony Lindgren .omap4 = { 4297e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL, 4304d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 4314d38bd12STony Lindgren }, 4324d38bd12STony Lindgren }, 4334d38bd12STony Lindgren .class = &i2c_class, 4344d38bd12STony Lindgren }; 4354d38bd12STony Lindgren 4364d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = { 4374d38bd12STony Lindgren .rev_offs = 0x0000, 4384d38bd12STony Lindgren .sysc_offs = 0x0010, 4394d38bd12STony Lindgren .syss_offs = 0x0014, 4404d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 4414d38bd12STony Lindgren SYSC_HAS_SOFTRESET | 4424d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 4434d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 4444d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 4454d38bd12STony Lindgren }; 4464d38bd12STony Lindgren 4477e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = { 4487e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 4497e1b11d1STony Lindgren .slave = &dm81xx_i2c2_hwmod, 4504d38bd12STony Lindgren .clk = "sysclk6_ck", 4514d38bd12STony Lindgren .user = OCP_USER_MPU, 4524d38bd12STony Lindgren }; 4534d38bd12STony Lindgren 4544d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = { 4554d38bd12STony Lindgren .name = "elm", 4564d38bd12STony Lindgren .sysc = &dm81xx_elm_sysc, 4574d38bd12STony Lindgren }; 4584d38bd12STony Lindgren 4594d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = { 4604d38bd12STony Lindgren .name = "elm", 4614d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4624d38bd12STony Lindgren .class = &dm81xx_elm_hwmod_class, 4634d38bd12STony Lindgren .main_clk = "sysclk6_ck", 4644d38bd12STony Lindgren }; 4654d38bd12STony Lindgren 4664d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = { 4677e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 4684d38bd12STony Lindgren .slave = &dm81xx_elm_hwmod, 4694f5395f0STony Lindgren .clk = "sysclk6_ck", 4704d38bd12STony Lindgren .user = OCP_USER_MPU, 4714d38bd12STony Lindgren }; 4724d38bd12STony Lindgren 4734d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = { 4744d38bd12STony Lindgren .rev_offs = 0x0000, 4754d38bd12STony Lindgren .sysc_offs = 0x0010, 4764d38bd12STony Lindgren .syss_offs = 0x0114, 4774d38bd12STony Lindgren .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | 4784d38bd12STony Lindgren SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 4794d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 4804d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 4814d38bd12STony Lindgren SIDLE_SMART_WKUP, 4824d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 4834d38bd12STony Lindgren }; 4844d38bd12STony Lindgren 4854d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = { 4864d38bd12STony Lindgren .name = "gpio", 4874d38bd12STony Lindgren .sysc = &dm81xx_gpio_sysc, 4884d38bd12STony Lindgren .rev = 2, 4894d38bd12STony Lindgren }; 4904d38bd12STony Lindgren 4914d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = { 4924d38bd12STony Lindgren .bank_width = 32, 4934d38bd12STony Lindgren .dbck_flag = true, 4944d38bd12STony Lindgren }; 4954d38bd12STony Lindgren 4964d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 4974d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 4984d38bd12STony Lindgren }; 4994d38bd12STony Lindgren 5004d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = { 5014d38bd12STony Lindgren .name = "gpio1", 5024d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 5034d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 5044d38bd12STony Lindgren .main_clk = "sysclk6_ck", 5054d38bd12STony Lindgren .prcm = { 5064d38bd12STony Lindgren .omap4 = { 5077e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL, 5084d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 5094d38bd12STony Lindgren }, 5104d38bd12STony Lindgren }, 5114d38bd12STony Lindgren .opt_clks = gpio1_opt_clks, 5124d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 5134d38bd12STony Lindgren .dev_attr = &gpio_dev_attr, 5144d38bd12STony Lindgren }; 5154d38bd12STony Lindgren 5164d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = { 5177e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 5184d38bd12STony Lindgren .slave = &dm81xx_gpio1_hwmod, 5194f5395f0STony Lindgren .clk = "sysclk6_ck", 5204d38bd12STony Lindgren .user = OCP_USER_MPU, 5214d38bd12STony Lindgren }; 5224d38bd12STony Lindgren 5234d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 5244d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 5254d38bd12STony Lindgren }; 5264d38bd12STony Lindgren 5274d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = { 5284d38bd12STony Lindgren .name = "gpio2", 5294d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 5304d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 5314d38bd12STony Lindgren .main_clk = "sysclk6_ck", 5324d38bd12STony Lindgren .prcm = { 5334d38bd12STony Lindgren .omap4 = { 5347e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL, 5354d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 5364d38bd12STony Lindgren }, 5374d38bd12STony Lindgren }, 5384d38bd12STony Lindgren .opt_clks = gpio2_opt_clks, 5394d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 5404d38bd12STony Lindgren .dev_attr = &gpio_dev_attr, 5414d38bd12STony Lindgren }; 5424d38bd12STony Lindgren 5434d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = { 5447e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 5454d38bd12STony Lindgren .slave = &dm81xx_gpio2_hwmod, 5464f5395f0STony Lindgren .clk = "sysclk6_ck", 5474d38bd12STony Lindgren .user = OCP_USER_MPU, 5484d38bd12STony Lindgren }; 5494d38bd12STony Lindgren 5504d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = { 5514d38bd12STony Lindgren .rev_offs = 0x0, 5524d38bd12STony Lindgren .sysc_offs = 0x10, 5534d38bd12STony Lindgren .syss_offs = 0x14, 5544d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 5554d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 5564d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 5574d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 5584d38bd12STony Lindgren }; 5594d38bd12STony Lindgren 5604d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = { 5614d38bd12STony Lindgren .name = "gpmc", 5624d38bd12STony Lindgren .sysc = &dm81xx_gpmc_sysc, 5634d38bd12STony Lindgren }; 5644d38bd12STony Lindgren 5654d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = { 5664d38bd12STony Lindgren .name = "gpmc", 5674d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 5684d38bd12STony Lindgren .class = &dm81xx_gpmc_hwmod_class, 5694d38bd12STony Lindgren .main_clk = "sysclk6_ck", 57063aa945bSTony Lindgren /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */ 57163aa945bSTony Lindgren .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS, 5724d38bd12STony Lindgren .prcm = { 5734d38bd12STony Lindgren .omap4 = { 5747e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL, 5754d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 5764d38bd12STony Lindgren }, 5774d38bd12STony Lindgren }, 5784d38bd12STony Lindgren }; 5794d38bd12STony Lindgren 580f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = { 5817e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_slow_hwmod, 5824d38bd12STony Lindgren .slave = &dm81xx_gpmc_hwmod, 5834d38bd12STony Lindgren .user = OCP_USER_MPU, 5844d38bd12STony Lindgren }; 5854d38bd12STony Lindgren 586ebf24414STony Lindgren /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */ 5874d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = { 5884d38bd12STony Lindgren .rev_offs = 0x0, 5894d38bd12STony Lindgren .sysc_offs = 0x10, 590ebf24414STony Lindgren .srst_udelay = 2, 5914d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | 5924d38bd12STony Lindgren SYSC_HAS_SOFTRESET, 5934d38bd12STony Lindgren .idlemodes = SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART, 5944d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 5954d38bd12STony Lindgren }; 5964d38bd12STony Lindgren 5974d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = { 5984d38bd12STony Lindgren .name = "usbotg", 5994d38bd12STony Lindgren .sysc = &dm81xx_usbhsotg_sysc, 6004d38bd12STony Lindgren }; 6014d38bd12STony Lindgren 602f53850b5STony Lindgren static struct omap_hwmod dm814x_usbss_hwmod = { 6034d38bd12STony Lindgren .name = "usb_otg_hs", 6044d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 605f53850b5STony Lindgren .main_clk = "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */ 6064d38bd12STony Lindgren .prcm = { 6074d38bd12STony Lindgren .omap4 = { 608f53850b5STony Lindgren .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, 6094d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 6104d38bd12STony Lindgren }, 6114d38bd12STony Lindgren }, 6124d38bd12STony Lindgren .class = &dm81xx_usbotg_class, 6134d38bd12STony Lindgren }; 6144d38bd12STony Lindgren 615f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = { 6167e1b11d1STony Lindgren .master = &dm81xx_default_l3_slow_hwmod, 617f53850b5STony Lindgren .slave = &dm814x_usbss_hwmod, 618f53850b5STony Lindgren .clk = "sysclk6_ck", 619f53850b5STony Lindgren .user = OCP_USER_MPU, 620f53850b5STony Lindgren }; 621f53850b5STony Lindgren 622f53850b5STony Lindgren static struct omap_hwmod dm816x_usbss_hwmod = { 623f53850b5STony Lindgren .name = "usb_otg_hs", 624f53850b5STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 625f53850b5STony Lindgren .main_clk = "sysclk6_ck", 626f53850b5STony Lindgren .prcm = { 627f53850b5STony Lindgren .omap4 = { 628f53850b5STony Lindgren .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, 629f53850b5STony Lindgren .modulemode = MODULEMODE_SWCTRL, 630f53850b5STony Lindgren }, 631f53850b5STony Lindgren }, 632f53850b5STony Lindgren .class = &dm81xx_usbotg_class, 633f53850b5STony Lindgren }; 634f53850b5STony Lindgren 635f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = { 636f53850b5STony Lindgren .master = &dm81xx_default_l3_slow_hwmod, 637f53850b5STony Lindgren .slave = &dm816x_usbss_hwmod, 6384d38bd12STony Lindgren .clk = "sysclk6_ck", 6394d38bd12STony Lindgren .user = OCP_USER_MPU, 6404d38bd12STony Lindgren }; 6414d38bd12STony Lindgren 6424d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = { 6434d38bd12STony Lindgren .rev_offs = 0x0000, 6444d38bd12STony Lindgren .sysc_offs = 0x0010, 6454d38bd12STony Lindgren .syss_offs = 0x0014, 6464d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET, 6474d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 6484d38bd12STony Lindgren SIDLE_SMART_WKUP, 6494d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 6504d38bd12STony Lindgren }; 6514d38bd12STony Lindgren 6524d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = { 6534d38bd12STony Lindgren .name = "timer", 6544d38bd12STony Lindgren .sysc = &dm816x_timer_sysc, 6554d38bd12STony Lindgren }; 6564d38bd12STony Lindgren 6574d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 6584d38bd12STony Lindgren .timer_capability = OMAP_TIMER_ALWON, 6594d38bd12STony Lindgren }; 6604d38bd12STony Lindgren 6610f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = { 6620f3ccb24STony Lindgren .name = "timer1", 6630f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 664cb4db038STony Lindgren .main_clk = "timer1_fck", 6650f3ccb24STony Lindgren .dev_attr = &capability_alwon_dev_attr, 6660f3ccb24STony Lindgren .class = &dm816x_timer_hwmod_class, 6670f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 6680f3ccb24STony Lindgren }; 6690f3ccb24STony Lindgren 6700f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = { 6710f3ccb24STony Lindgren .master = &dm81xx_l4_ls_hwmod, 6720f3ccb24STony Lindgren .slave = &dm814x_timer1_hwmod, 6734f5395f0STony Lindgren .clk = "sysclk6_ck", 6740f3ccb24STony Lindgren .user = OCP_USER_MPU, 6750f3ccb24STony Lindgren }; 6760f3ccb24STony Lindgren 6774d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = { 6784d38bd12STony Lindgren .name = "timer1", 6794d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 6804d38bd12STony Lindgren .main_clk = "timer1_fck", 6814d38bd12STony Lindgren .prcm = { 6824d38bd12STony Lindgren .omap4 = { 6834d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL, 6844d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 6854d38bd12STony Lindgren }, 6864d38bd12STony Lindgren }, 6874d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 6884d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 6894d38bd12STony Lindgren }; 6904d38bd12STony Lindgren 6914d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = { 6927e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 6934d38bd12STony Lindgren .slave = &dm816x_timer1_hwmod, 6944d38bd12STony Lindgren .clk = "sysclk6_ck", 6954d38bd12STony Lindgren .user = OCP_USER_MPU, 6964d38bd12STony Lindgren }; 6974d38bd12STony Lindgren 6980f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = { 6990f3ccb24STony Lindgren .name = "timer2", 7000f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 701cb4db038STony Lindgren .main_clk = "timer2_fck", 7020f3ccb24STony Lindgren .dev_attr = &capability_alwon_dev_attr, 7030f3ccb24STony Lindgren .class = &dm816x_timer_hwmod_class, 7040f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 7050f3ccb24STony Lindgren }; 7060f3ccb24STony Lindgren 7070f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = { 7080f3ccb24STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7090f3ccb24STony Lindgren .slave = &dm814x_timer2_hwmod, 7104f5395f0STony Lindgren .clk = "sysclk6_ck", 7110f3ccb24STony Lindgren .user = OCP_USER_MPU, 7120f3ccb24STony Lindgren }; 7130f3ccb24STony Lindgren 7144d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = { 7154d38bd12STony Lindgren .name = "timer2", 7164d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7174d38bd12STony Lindgren .main_clk = "timer2_fck", 7184d38bd12STony Lindgren .prcm = { 7194d38bd12STony Lindgren .omap4 = { 7204d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL, 7214d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7224d38bd12STony Lindgren }, 7234d38bd12STony Lindgren }, 7244d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 7254d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7264d38bd12STony Lindgren }; 7274d38bd12STony Lindgren 7284d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = { 7297e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7304d38bd12STony Lindgren .slave = &dm816x_timer2_hwmod, 7314d38bd12STony Lindgren .clk = "sysclk6_ck", 7324d38bd12STony Lindgren .user = OCP_USER_MPU, 7334d38bd12STony Lindgren }; 7344d38bd12STony Lindgren 7354d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = { 7364d38bd12STony Lindgren .name = "timer3", 7374d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7384d38bd12STony Lindgren .main_clk = "timer3_fck", 7394d38bd12STony Lindgren .prcm = { 7404d38bd12STony Lindgren .omap4 = { 7414d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL, 7424d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7434d38bd12STony Lindgren }, 7444d38bd12STony Lindgren }, 7454d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 7464d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7474d38bd12STony Lindgren }; 7484d38bd12STony Lindgren 7494d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = { 7507e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7514d38bd12STony Lindgren .slave = &dm816x_timer3_hwmod, 7524d38bd12STony Lindgren .clk = "sysclk6_ck", 7534d38bd12STony Lindgren .user = OCP_USER_MPU, 7544d38bd12STony Lindgren }; 7554d38bd12STony Lindgren 7564d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = { 7574d38bd12STony Lindgren .name = "timer4", 7584d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7594d38bd12STony Lindgren .main_clk = "timer4_fck", 7604d38bd12STony Lindgren .prcm = { 7614d38bd12STony Lindgren .omap4 = { 7624d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL, 7634d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7644d38bd12STony Lindgren }, 7654d38bd12STony Lindgren }, 7664d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 7674d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7684d38bd12STony Lindgren }; 7694d38bd12STony Lindgren 7704d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = { 7717e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7724d38bd12STony Lindgren .slave = &dm816x_timer4_hwmod, 7734d38bd12STony Lindgren .clk = "sysclk6_ck", 7744d38bd12STony Lindgren .user = OCP_USER_MPU, 7754d38bd12STony Lindgren }; 7764d38bd12STony Lindgren 7774d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = { 7784d38bd12STony Lindgren .name = "timer5", 7794d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7804d38bd12STony Lindgren .main_clk = "timer5_fck", 7814d38bd12STony Lindgren .prcm = { 7824d38bd12STony Lindgren .omap4 = { 7834d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL, 7844d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7854d38bd12STony Lindgren }, 7864d38bd12STony Lindgren }, 7874d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 7884d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7894d38bd12STony Lindgren }; 7904d38bd12STony Lindgren 7914d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = { 7927e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7934d38bd12STony Lindgren .slave = &dm816x_timer5_hwmod, 7944d38bd12STony Lindgren .clk = "sysclk6_ck", 7954d38bd12STony Lindgren .user = OCP_USER_MPU, 7964d38bd12STony Lindgren }; 7974d38bd12STony Lindgren 7984d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = { 7994d38bd12STony Lindgren .name = "timer6", 8004d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 8014d38bd12STony Lindgren .main_clk = "timer6_fck", 8024d38bd12STony Lindgren .prcm = { 8034d38bd12STony Lindgren .omap4 = { 8044d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL, 8054d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8064d38bd12STony Lindgren }, 8074d38bd12STony Lindgren }, 8084d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 8094d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8104d38bd12STony Lindgren }; 8114d38bd12STony Lindgren 8124d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = { 8137e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8144d38bd12STony Lindgren .slave = &dm816x_timer6_hwmod, 8154d38bd12STony Lindgren .clk = "sysclk6_ck", 8164d38bd12STony Lindgren .user = OCP_USER_MPU, 8174d38bd12STony Lindgren }; 8184d38bd12STony Lindgren 8194d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = { 8204d38bd12STony Lindgren .name = "timer7", 8214d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 8224d38bd12STony Lindgren .main_clk = "timer7_fck", 8234d38bd12STony Lindgren .prcm = { 8244d38bd12STony Lindgren .omap4 = { 8254d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL, 8264d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8274d38bd12STony Lindgren }, 8284d38bd12STony Lindgren }, 8294d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 8304d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8314d38bd12STony Lindgren }; 8324d38bd12STony Lindgren 8334d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = { 8347e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8354d38bd12STony Lindgren .slave = &dm816x_timer7_hwmod, 8364d38bd12STony Lindgren .clk = "sysclk6_ck", 8374d38bd12STony Lindgren .user = OCP_USER_MPU, 8384d38bd12STony Lindgren }; 8394d38bd12STony Lindgren 8400f3ccb24STony Lindgren /* CPSW on dm814x */ 8410f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = { 8420f3ccb24STony Lindgren .rev_offs = 0x0, 8430f3ccb24STony Lindgren .sysc_offs = 0x8, 8440f3ccb24STony Lindgren .syss_offs = 0x4, 8450f3ccb24STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | 8460f3ccb24STony Lindgren SYSS_HAS_RESET_STATUS, 8470f3ccb24STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE | 8480f3ccb24STony Lindgren MSTANDBY_NO, 8490f3ccb24STony Lindgren .sysc_fields = &omap_hwmod_sysc_type3, 8500f3ccb24STony Lindgren }; 8510f3ccb24STony Lindgren 8520f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = { 8530f3ccb24STony Lindgren .name = "cpgmac0", 8540f3ccb24STony Lindgren .sysc = &dm814x_cpgmac_sysc, 8550f3ccb24STony Lindgren }; 8560f3ccb24STony Lindgren 85724da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = { 8580f3ccb24STony Lindgren .name = "cpgmac0", 8590f3ccb24STony Lindgren .class = &dm814x_cpgmac0_hwmod_class, 8600f3ccb24STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 8610f3ccb24STony Lindgren .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 8620f3ccb24STony Lindgren .main_clk = "cpsw_125mhz_gclk", 8630f3ccb24STony Lindgren .prcm = { 8640f3ccb24STony Lindgren .omap4 = { 8650f3ccb24STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL, 8660f3ccb24STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8670f3ccb24STony Lindgren }, 8680f3ccb24STony Lindgren }, 8690f3ccb24STony Lindgren }; 8700f3ccb24STony Lindgren 8710f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = { 8720f3ccb24STony Lindgren .name = "davinci_mdio", 8730f3ccb24STony Lindgren }; 8740f3ccb24STony Lindgren 87524da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = { 8760f3ccb24STony Lindgren .name = "davinci_mdio", 8770f3ccb24STony Lindgren .class = &dm814x_mdio_hwmod_class, 8780f3ccb24STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 8790f3ccb24STony Lindgren .main_clk = "cpsw_125mhz_gclk", 8800f3ccb24STony Lindgren }; 8810f3ccb24STony Lindgren 8820f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = { 8830f3ccb24STony Lindgren .master = &dm81xx_l4_hs_hwmod, 8840f3ccb24STony Lindgren .slave = &dm814x_cpgmac0_hwmod, 8850f3ccb24STony Lindgren .clk = "cpsw_125mhz_gclk", 8860f3ccb24STony Lindgren .user = OCP_USER_MPU, 8870f3ccb24STony Lindgren }; 8880f3ccb24STony Lindgren 88924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = { 8900f3ccb24STony Lindgren .master = &dm814x_cpgmac0_hwmod, 8910f3ccb24STony Lindgren .slave = &dm814x_mdio_hwmod, 8920f3ccb24STony Lindgren .user = OCP_USER_MPU, 8930f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 8940f3ccb24STony Lindgren }; 8950f3ccb24STony Lindgren 8964d38bd12STony Lindgren /* EMAC Ethernet */ 8974d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = { 8984d38bd12STony Lindgren .rev_offs = 0x0, 8994d38bd12STony Lindgren .sysc_offs = 0x4, 9004d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SOFTRESET, 9014d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 9024d38bd12STony Lindgren }; 9034d38bd12STony Lindgren 9044d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = { 9054d38bd12STony Lindgren .name = "emac", 9064d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 9074d38bd12STony Lindgren }; 9084d38bd12STony Lindgren 9094d38bd12STony Lindgren /* 9104d38bd12STony Lindgren * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate 9114d38bd12STony Lindgren * driver probed before EMAC0, we let MDIO do the clock idling. 9124d38bd12STony Lindgren */ 9134d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = { 9144d38bd12STony Lindgren .name = "emac0", 9154d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9164d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 91729f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 9184d38bd12STony Lindgren }; 9194d38bd12STony Lindgren 9207e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = { 9217e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9224d38bd12STony Lindgren .slave = &dm816x_emac0_hwmod, 9234d38bd12STony Lindgren .clk = "sysclk5_ck", 9244d38bd12STony Lindgren .user = OCP_USER_MPU, 9254d38bd12STony Lindgren }; 9264d38bd12STony Lindgren 9277e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = { 9284d38bd12STony Lindgren .name = "davinci_mdio", 9294d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 9304d38bd12STony Lindgren }; 9314d38bd12STony Lindgren 93224da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = { 9334d38bd12STony Lindgren .name = "davinci_mdio", 9347e1b11d1STony Lindgren .class = &dm81xx_mdio_hwmod_class, 9354d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9364d38bd12STony Lindgren .main_clk = "sysclk24_ck", 9374d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 9384d38bd12STony Lindgren /* 9394d38bd12STony Lindgren * REVISIT: This should be moved to the emac0_hwmod 9404d38bd12STony Lindgren * once we have a better way to handle device slaves. 9414d38bd12STony Lindgren */ 9424d38bd12STony Lindgren .prcm = { 9434d38bd12STony Lindgren .omap4 = { 9447e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL, 9454d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 9464d38bd12STony Lindgren }, 9474d38bd12STony Lindgren }, 9484d38bd12STony Lindgren }; 9494d38bd12STony Lindgren 95024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = { 9517e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9527e1b11d1STony Lindgren .slave = &dm81xx_emac0_mdio_hwmod, 9534d38bd12STony Lindgren .user = OCP_USER_MPU, 9544d38bd12STony Lindgren }; 9554d38bd12STony Lindgren 9564d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = { 9574d38bd12STony Lindgren .name = "emac1", 9584d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9594d38bd12STony Lindgren .main_clk = "sysclk24_ck", 9604d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 9614d38bd12STony Lindgren .prcm = { 9624d38bd12STony Lindgren .omap4 = { 9634d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL, 9644d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 9654d38bd12STony Lindgren }, 9664d38bd12STony Lindgren }, 9674d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 9684d38bd12STony Lindgren }; 9694d38bd12STony Lindgren 9704d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = { 9717e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9724d38bd12STony Lindgren .slave = &dm816x_emac1_hwmod, 9734d38bd12STony Lindgren .clk = "sysclk5_ck", 9744d38bd12STony Lindgren .user = OCP_USER_MPU, 9754d38bd12STony Lindgren }; 9764d38bd12STony Lindgren 97749e9e616SKevin Hilman static struct omap_hwmod_class_sysconfig dm81xx_sata_sysc = { 97849e9e616SKevin Hilman .sysc_offs = 0x1100, 97949e9e616SKevin Hilman .sysc_flags = SYSC_HAS_SIDLEMODE, 98049e9e616SKevin Hilman .idlemodes = SIDLE_FORCE, 98149e9e616SKevin Hilman .sysc_fields = &omap_hwmod_sysc_type3, 98249e9e616SKevin Hilman }; 98349e9e616SKevin Hilman 98449e9e616SKevin Hilman static struct omap_hwmod_class dm81xx_sata_hwmod_class = { 98549e9e616SKevin Hilman .name = "sata", 98649e9e616SKevin Hilman .sysc = &dm81xx_sata_sysc, 98749e9e616SKevin Hilman }; 98849e9e616SKevin Hilman 98949e9e616SKevin Hilman static struct omap_hwmod dm81xx_sata_hwmod = { 99049e9e616SKevin Hilman .name = "sata", 991*71d50393STero Kristo .clkdm_name = "default_clkdm", 99249e9e616SKevin Hilman .flags = HWMOD_NO_IDLEST, 99349e9e616SKevin Hilman .prcm = { 99449e9e616SKevin Hilman .omap4 = { 99549e9e616SKevin Hilman .clkctrl_offs = DM81XX_CM_DEFAULT_SATA_CLKCTRL, 99649e9e616SKevin Hilman .modulemode = MODULEMODE_SWCTRL, 99749e9e616SKevin Hilman }, 99849e9e616SKevin Hilman }, 99949e9e616SKevin Hilman .class = &dm81xx_sata_hwmod_class, 100049e9e616SKevin Hilman }; 100149e9e616SKevin Hilman 100249e9e616SKevin Hilman static struct omap_hwmod_ocp_if dm81xx_l4_hs__sata = { 100349e9e616SKevin Hilman .master = &dm81xx_l4_hs_hwmod, 100449e9e616SKevin Hilman .slave = &dm81xx_sata_hwmod, 100549e9e616SKevin Hilman .clk = "sysclk5_ck", 100649e9e616SKevin Hilman .user = OCP_USER_MPU, 100749e9e616SKevin Hilman }; 100849e9e616SKevin Hilman 1009c757fda8STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = { 10104d38bd12STony Lindgren .rev_offs = 0x0, 10114d38bd12STony Lindgren .sysc_offs = 0x110, 10124d38bd12STony Lindgren .syss_offs = 0x114, 10134d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 10144d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 10154d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 10164d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 10174d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 10184d38bd12STony Lindgren }; 10194d38bd12STony Lindgren 1020c757fda8STony Lindgren static struct omap_hwmod_class dm81xx_mmc_class = { 10214d38bd12STony Lindgren .name = "mmc", 1022c757fda8STony Lindgren .sysc = &dm81xx_mmc_sysc, 10234d38bd12STony Lindgren }; 10244d38bd12STony Lindgren 1025c757fda8STony Lindgren static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = { 10264d38bd12STony Lindgren { .role = "dbck", .clk = "sysclk18_ck", }, 10274d38bd12STony Lindgren }; 10284d38bd12STony Lindgren 1029c757fda8STony Lindgren static struct omap_hsmmc_dev_attr mmc_dev_attr = { 1030c757fda8STony Lindgren }; 1031c757fda8STony Lindgren 1032c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc1_hwmod = { 1033c757fda8STony Lindgren .name = "mmc1", 1034c757fda8STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1035c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1036c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1037c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1038c757fda8STony Lindgren .prcm = { 1039c757fda8STony Lindgren .omap4 = { 1040c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL, 1041c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1042c757fda8STony Lindgren }, 1043c757fda8STony Lindgren }, 1044c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1045c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1046c757fda8STony Lindgren }; 1047c757fda8STony Lindgren 1048c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = { 1049c757fda8STony Lindgren .master = &dm81xx_l4_ls_hwmod, 1050c757fda8STony Lindgren .slave = &dm814x_mmc1_hwmod, 1051c757fda8STony Lindgren .clk = "sysclk6_ck", 1052c757fda8STony Lindgren .user = OCP_USER_MPU, 1053c757fda8STony Lindgren .flags = OMAP_FIREWALL_L4 1054c757fda8STony Lindgren }; 1055c757fda8STony Lindgren 1056c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc2_hwmod = { 1057c757fda8STony Lindgren .name = "mmc2", 1058c757fda8STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1059c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1060c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1061c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1062c757fda8STony Lindgren .prcm = { 1063c757fda8STony Lindgren .omap4 = { 1064c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL, 1065c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1066c757fda8STony Lindgren }, 1067c757fda8STony Lindgren }, 1068c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1069c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1070c757fda8STony Lindgren }; 1071c757fda8STony Lindgren 1072c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = { 1073c757fda8STony Lindgren .master = &dm81xx_l4_ls_hwmod, 1074c757fda8STony Lindgren .slave = &dm814x_mmc2_hwmod, 1075c757fda8STony Lindgren .clk = "sysclk6_ck", 1076c757fda8STony Lindgren .user = OCP_USER_MPU, 1077c757fda8STony Lindgren .flags = OMAP_FIREWALL_L4 1078c757fda8STony Lindgren }; 1079c757fda8STony Lindgren 1080c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc3_hwmod = { 1081c757fda8STony Lindgren .name = "mmc3", 1082c757fda8STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1083c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1084c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1085c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1086c757fda8STony Lindgren .prcm = { 1087c757fda8STony Lindgren .omap4 = { 1088c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL, 1089c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1090c757fda8STony Lindgren }, 1091c757fda8STony Lindgren }, 1092c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1093c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1094c757fda8STony Lindgren }; 1095c757fda8STony Lindgren 1096c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = { 1097c757fda8STony Lindgren .master = &dm81xx_alwon_l3_med_hwmod, 1098c757fda8STony Lindgren .slave = &dm814x_mmc3_hwmod, 1099c757fda8STony Lindgren .clk = "sysclk4_ck", 1100c757fda8STony Lindgren .user = OCP_USER_MPU, 11014d38bd12STony Lindgren }; 11024d38bd12STony Lindgren 11034d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = { 11044d38bd12STony Lindgren .name = "mmc1", 11054d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1106c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1107c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 11084d38bd12STony Lindgren .main_clk = "sysclk10_ck", 11094d38bd12STony Lindgren .prcm = { 11104d38bd12STony Lindgren .omap4 = { 11114d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL, 11124d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 11134d38bd12STony Lindgren }, 11144d38bd12STony Lindgren }, 1115c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1116c757fda8STony Lindgren .class = &dm81xx_mmc_class, 11174d38bd12STony Lindgren }; 11184d38bd12STony Lindgren 11194d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = { 11207e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 11214d38bd12STony Lindgren .slave = &dm816x_mmc1_hwmod, 11224d38bd12STony Lindgren .clk = "sysclk6_ck", 11234d38bd12STony Lindgren .user = OCP_USER_MPU, 11244d38bd12STony Lindgren .flags = OMAP_FIREWALL_L4 11254d38bd12STony Lindgren }; 11264d38bd12STony Lindgren 11274d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = { 11284d38bd12STony Lindgren .rev_offs = 0x0, 11294d38bd12STony Lindgren .sysc_offs = 0x110, 11304d38bd12STony Lindgren .syss_offs = 0x114, 11314d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 11324d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 11334d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 11344d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 11354d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 11364d38bd12STony Lindgren }; 11374d38bd12STony Lindgren 11384d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = { 11394d38bd12STony Lindgren .name = "mcspi", 11404d38bd12STony Lindgren .sysc = &dm816x_mcspi_sysc, 11414d38bd12STony Lindgren .rev = OMAP3_MCSPI_REV, 11424d38bd12STony Lindgren }; 11434d38bd12STony Lindgren 11444d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = { 11454d38bd12STony Lindgren .num_chipselect = 4, 11464d38bd12STony Lindgren }; 11474d38bd12STony Lindgren 11487e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = { 11494d38bd12STony Lindgren .name = "mcspi1", 11504d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 11514d38bd12STony Lindgren .main_clk = "sysclk10_ck", 11524d38bd12STony Lindgren .prcm = { 11534d38bd12STony Lindgren .omap4 = { 11547e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL, 11554d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 11564d38bd12STony Lindgren }, 11574d38bd12STony Lindgren }, 11584d38bd12STony Lindgren .class = &dm816x_mcspi_class, 11594d38bd12STony Lindgren .dev_attr = &dm816x_mcspi1_dev_attr, 11604d38bd12STony Lindgren }; 11614d38bd12STony Lindgren 11627e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = { 11637e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 11647e1b11d1STony Lindgren .slave = &dm81xx_mcspi1_hwmod, 11654d38bd12STony Lindgren .clk = "sysclk6_ck", 11664d38bd12STony Lindgren .user = OCP_USER_MPU, 11674d38bd12STony Lindgren }; 11684d38bd12STony Lindgren 11697e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = { 11704d38bd12STony Lindgren .rev_offs = 0x000, 11714d38bd12STony Lindgren .sysc_offs = 0x010, 11724d38bd12STony Lindgren .syss_offs = 0x014, 11734d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 11744d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, 11754d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 11764d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 11774d38bd12STony Lindgren }; 11784d38bd12STony Lindgren 11797e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = { 11804d38bd12STony Lindgren .name = "mailbox", 11817e1b11d1STony Lindgren .sysc = &dm81xx_mailbox_sysc, 11824d38bd12STony Lindgren }; 11834d38bd12STony Lindgren 11847e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = { 11854d38bd12STony Lindgren .name = "mailbox", 11864d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 11877e1b11d1STony Lindgren .class = &dm81xx_mailbox_hwmod_class, 11884d38bd12STony Lindgren .main_clk = "sysclk6_ck", 11894d38bd12STony Lindgren .prcm = { 11904d38bd12STony Lindgren .omap4 = { 11917e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL, 11924d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 11934d38bd12STony Lindgren }, 11944d38bd12STony Lindgren }, 11954d38bd12STony Lindgren }; 11964d38bd12STony Lindgren 11977e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = { 11987e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 11997e1b11d1STony Lindgren .slave = &dm81xx_mailbox_hwmod, 12004f5395f0STony Lindgren .clk = "sysclk6_ck", 12014d38bd12STony Lindgren .user = OCP_USER_MPU, 12024d38bd12STony Lindgren }; 12034d38bd12STony Lindgren 12041539569bSNeil Armstrong static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = { 12051539569bSNeil Armstrong .rev_offs = 0x000, 12061539569bSNeil Armstrong .sysc_offs = 0x010, 12071539569bSNeil Armstrong .syss_offs = 0x014, 12081539569bSNeil Armstrong .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 12091539569bSNeil Armstrong SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, 12101539569bSNeil Armstrong .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 12111539569bSNeil Armstrong .sysc_fields = &omap_hwmod_sysc_type1, 12121539569bSNeil Armstrong }; 12131539569bSNeil Armstrong 12141539569bSNeil Armstrong static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = { 12151539569bSNeil Armstrong .name = "spinbox", 12161539569bSNeil Armstrong .sysc = &dm81xx_spinbox_sysc, 12171539569bSNeil Armstrong }; 12181539569bSNeil Armstrong 12191539569bSNeil Armstrong static struct omap_hwmod dm81xx_spinbox_hwmod = { 12201539569bSNeil Armstrong .name = "spinbox", 12211539569bSNeil Armstrong .clkdm_name = "alwon_l3s_clkdm", 12221539569bSNeil Armstrong .class = &dm81xx_spinbox_hwmod_class, 12231539569bSNeil Armstrong .main_clk = "sysclk6_ck", 12241539569bSNeil Armstrong .prcm = { 12251539569bSNeil Armstrong .omap4 = { 12261539569bSNeil Armstrong .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL, 12271539569bSNeil Armstrong .modulemode = MODULEMODE_SWCTRL, 12281539569bSNeil Armstrong }, 12291539569bSNeil Armstrong }, 12301539569bSNeil Armstrong }; 12311539569bSNeil Armstrong 12321539569bSNeil Armstrong static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = { 12331539569bSNeil Armstrong .master = &dm81xx_l4_ls_hwmod, 12341539569bSNeil Armstrong .slave = &dm81xx_spinbox_hwmod, 12354f5395f0STony Lindgren .clk = "sysclk6_ck", 12361539569bSNeil Armstrong .user = OCP_USER_MPU, 12371539569bSNeil Armstrong }; 12381539569bSNeil Armstrong 12397e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = { 12404d38bd12STony Lindgren .name = "tpcc", 12414d38bd12STony Lindgren }; 12424d38bd12STony Lindgren 124324da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = { 12444d38bd12STony Lindgren .name = "tpcc", 12457e1b11d1STony Lindgren .class = &dm81xx_tpcc_hwmod_class, 12464d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 12474d38bd12STony Lindgren .main_clk = "sysclk4_ck", 12484d38bd12STony Lindgren .prcm = { 12494d38bd12STony Lindgren .omap4 = { 12507e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPCC_CLKCTRL, 12514d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 12524d38bd12STony Lindgren }, 12534d38bd12STony Lindgren }, 12544d38bd12STony Lindgren }; 12554d38bd12STony Lindgren 125624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = { 12577e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 12587e1b11d1STony Lindgren .slave = &dm81xx_tpcc_hwmod, 12594d38bd12STony Lindgren .clk = "sysclk4_ck", 12604d38bd12STony Lindgren .user = OCP_USER_MPU, 12614d38bd12STony Lindgren }; 12624d38bd12STony Lindgren 12637e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = { 12644d38bd12STony Lindgren .name = "tptc0", 12654d38bd12STony Lindgren }; 12664d38bd12STony Lindgren 126724da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = { 12684d38bd12STony Lindgren .name = "tptc0", 12697e1b11d1STony Lindgren .class = &dm81xx_tptc0_hwmod_class, 12704d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 12714d38bd12STony Lindgren .main_clk = "sysclk4_ck", 12724d38bd12STony Lindgren .prcm = { 12734d38bd12STony Lindgren .omap4 = { 12747e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC0_CLKCTRL, 12754d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 12764d38bd12STony Lindgren }, 12774d38bd12STony Lindgren }, 12784d38bd12STony Lindgren }; 12794d38bd12STony Lindgren 128024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = { 12817e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 12827e1b11d1STony Lindgren .slave = &dm81xx_tptc0_hwmod, 12834d38bd12STony Lindgren .clk = "sysclk4_ck", 12844d38bd12STony Lindgren .user = OCP_USER_MPU, 12854d38bd12STony Lindgren }; 12864d38bd12STony Lindgren 128724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = { 12887e1b11d1STony Lindgren .master = &dm81xx_tptc0_hwmod, 12897e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 12904d38bd12STony Lindgren .clk = "sysclk4_ck", 12914d38bd12STony Lindgren .user = OCP_USER_MPU, 12924d38bd12STony Lindgren }; 12934d38bd12STony Lindgren 12947e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = { 12954d38bd12STony Lindgren .name = "tptc1", 12964d38bd12STony Lindgren }; 12974d38bd12STony Lindgren 129824da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = { 12994d38bd12STony Lindgren .name = "tptc1", 13007e1b11d1STony Lindgren .class = &dm81xx_tptc1_hwmod_class, 13014d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 13024d38bd12STony Lindgren .main_clk = "sysclk4_ck", 13034d38bd12STony Lindgren .prcm = { 13044d38bd12STony Lindgren .omap4 = { 13057e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC1_CLKCTRL, 13064d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 13074d38bd12STony Lindgren }, 13084d38bd12STony Lindgren }, 13094d38bd12STony Lindgren }; 13104d38bd12STony Lindgren 131124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = { 13127e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13137e1b11d1STony Lindgren .slave = &dm81xx_tptc1_hwmod, 13144d38bd12STony Lindgren .clk = "sysclk4_ck", 13154d38bd12STony Lindgren .user = OCP_USER_MPU, 13164d38bd12STony Lindgren }; 13174d38bd12STony Lindgren 131824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = { 13197e1b11d1STony Lindgren .master = &dm81xx_tptc1_hwmod, 13207e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 13214d38bd12STony Lindgren .clk = "sysclk4_ck", 13224d38bd12STony Lindgren .user = OCP_USER_MPU, 13234d38bd12STony Lindgren }; 13244d38bd12STony Lindgren 13257e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = { 13264d38bd12STony Lindgren .name = "tptc2", 13274d38bd12STony Lindgren }; 13284d38bd12STony Lindgren 132924da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = { 13304d38bd12STony Lindgren .name = "tptc2", 13317e1b11d1STony Lindgren .class = &dm81xx_tptc2_hwmod_class, 13324d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 13334d38bd12STony Lindgren .main_clk = "sysclk4_ck", 13344d38bd12STony Lindgren .prcm = { 13354d38bd12STony Lindgren .omap4 = { 13367e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC2_CLKCTRL, 13374d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 13384d38bd12STony Lindgren }, 13394d38bd12STony Lindgren }, 13404d38bd12STony Lindgren }; 13414d38bd12STony Lindgren 134224da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = { 13437e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13447e1b11d1STony Lindgren .slave = &dm81xx_tptc2_hwmod, 13454d38bd12STony Lindgren .clk = "sysclk4_ck", 13464d38bd12STony Lindgren .user = OCP_USER_MPU, 13474d38bd12STony Lindgren }; 13484d38bd12STony Lindgren 134924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = { 13507e1b11d1STony Lindgren .master = &dm81xx_tptc2_hwmod, 13517e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 13524d38bd12STony Lindgren .clk = "sysclk4_ck", 13534d38bd12STony Lindgren .user = OCP_USER_MPU, 13544d38bd12STony Lindgren }; 13554d38bd12STony Lindgren 13567e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = { 13574d38bd12STony Lindgren .name = "tptc3", 13584d38bd12STony Lindgren }; 13594d38bd12STony Lindgren 136024da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = { 13614d38bd12STony Lindgren .name = "tptc3", 13627e1b11d1STony Lindgren .class = &dm81xx_tptc3_hwmod_class, 13634d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 13644d38bd12STony Lindgren .main_clk = "sysclk4_ck", 13654d38bd12STony Lindgren .prcm = { 13664d38bd12STony Lindgren .omap4 = { 13677e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC3_CLKCTRL, 13684d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 13694d38bd12STony Lindgren }, 13704d38bd12STony Lindgren }, 13714d38bd12STony Lindgren }; 13724d38bd12STony Lindgren 137324da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = { 13747e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13757e1b11d1STony Lindgren .slave = &dm81xx_tptc3_hwmod, 13764d38bd12STony Lindgren .clk = "sysclk4_ck", 13774d38bd12STony Lindgren .user = OCP_USER_MPU, 13784d38bd12STony Lindgren }; 13794d38bd12STony Lindgren 138024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = { 13817e1b11d1STony Lindgren .master = &dm81xx_tptc3_hwmod, 13827e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 13834d38bd12STony Lindgren .clk = "sysclk4_ck", 13844d38bd12STony Lindgren .user = OCP_USER_MPU, 13854d38bd12STony Lindgren }; 13864d38bd12STony Lindgren 13870f3ccb24STony Lindgren /* 13880f3ccb24STony Lindgren * REVISIT: Test and enable the following once clocks work: 13890f3ccb24STony Lindgren * dm81xx_l4_ls__mailbox 13900f3ccb24STony Lindgren * 13910f3ccb24STony Lindgren * Also note that some devices share a single clkctrl_offs.. 13920f3ccb24STony Lindgren * For example, i2c1 and 3 share one, and i2c2 and 4 share one. 13930f3ccb24STony Lindgren */ 13940f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { 13950f3ccb24STony Lindgren &dm814x_mpu__alwon_l3_slow, 13960f3ccb24STony Lindgren &dm814x_mpu__alwon_l3_med, 13970f3ccb24STony Lindgren &dm81xx_alwon_l3_slow__l4_ls, 13980f3ccb24STony Lindgren &dm81xx_alwon_l3_slow__l4_hs, 13990f3ccb24STony Lindgren &dm81xx_l4_ls__uart1, 14000f3ccb24STony Lindgren &dm81xx_l4_ls__uart2, 14010f3ccb24STony Lindgren &dm81xx_l4_ls__uart3, 14020f3ccb24STony Lindgren &dm81xx_l4_ls__wd_timer1, 14030f3ccb24STony Lindgren &dm81xx_l4_ls__i2c1, 14040f3ccb24STony Lindgren &dm81xx_l4_ls__i2c2, 14053022b29dSTony Lindgren &dm81xx_l4_ls__gpio1, 14063022b29dSTony Lindgren &dm81xx_l4_ls__gpio2, 14070f3ccb24STony Lindgren &dm81xx_l4_ls__elm, 14080f3ccb24STony Lindgren &dm81xx_l4_ls__mcspi1, 1409c757fda8STony Lindgren &dm814x_l4_ls__mmc1, 1410c757fda8STony Lindgren &dm814x_l4_ls__mmc2, 1411c5803246STony Lindgren &ti81xx_l4_ls__rtc, 14120f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tpcc, 14130f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc0, 14140f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc1, 14150f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc2, 14160f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc3, 14170f3ccb24STony Lindgren &dm81xx_tptc0__alwon_l3_fast, 14180f3ccb24STony Lindgren &dm81xx_tptc1__alwon_l3_fast, 14190f3ccb24STony Lindgren &dm81xx_tptc2__alwon_l3_fast, 14200f3ccb24STony Lindgren &dm81xx_tptc3__alwon_l3_fast, 14210f3ccb24STony Lindgren &dm814x_l4_ls__timer1, 14220f3ccb24STony Lindgren &dm814x_l4_ls__timer2, 14230f3ccb24STony Lindgren &dm814x_l4_hs__cpgmac0, 14240f3ccb24STony Lindgren &dm814x_cpgmac0__mdio, 1425f53850b5STony Lindgren &dm81xx_alwon_l3_slow__gpmc, 1426f53850b5STony Lindgren &dm814x_default_l3_slow__usbss, 1427c757fda8STony Lindgren &dm814x_alwon_l3_med__mmc3, 14280f3ccb24STony Lindgren NULL, 14290f3ccb24STony Lindgren }; 14300f3ccb24STony Lindgren 14310f3ccb24STony Lindgren int __init dm814x_hwmod_init(void) 14320f3ccb24STony Lindgren { 14330f3ccb24STony Lindgren omap_hwmod_init(); 14340f3ccb24STony Lindgren return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs); 14350f3ccb24STony Lindgren } 14360f3ccb24STony Lindgren 14374d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = { 14384d38bd12STony Lindgren &dm816x_mpu__alwon_l3_slow, 14394d38bd12STony Lindgren &dm816x_mpu__alwon_l3_med, 14407e1b11d1STony Lindgren &dm81xx_alwon_l3_slow__l4_ls, 14417e1b11d1STony Lindgren &dm81xx_alwon_l3_slow__l4_hs, 14427e1b11d1STony Lindgren &dm81xx_l4_ls__uart1, 14437e1b11d1STony Lindgren &dm81xx_l4_ls__uart2, 14447e1b11d1STony Lindgren &dm81xx_l4_ls__uart3, 14457e1b11d1STony Lindgren &dm81xx_l4_ls__wd_timer1, 14467e1b11d1STony Lindgren &dm81xx_l4_ls__i2c1, 14477e1b11d1STony Lindgren &dm81xx_l4_ls__i2c2, 14484d38bd12STony Lindgren &dm81xx_l4_ls__gpio1, 14494d38bd12STony Lindgren &dm81xx_l4_ls__gpio2, 14504d38bd12STony Lindgren &dm81xx_l4_ls__elm, 1451c5803246STony Lindgren &ti81xx_l4_ls__rtc, 14524d38bd12STony Lindgren &dm816x_l4_ls__mmc1, 14534d38bd12STony Lindgren &dm816x_l4_ls__timer1, 14544d38bd12STony Lindgren &dm816x_l4_ls__timer2, 14554d38bd12STony Lindgren &dm816x_l4_ls__timer3, 14564d38bd12STony Lindgren &dm816x_l4_ls__timer4, 14574d38bd12STony Lindgren &dm816x_l4_ls__timer5, 14584d38bd12STony Lindgren &dm816x_l4_ls__timer6, 14594d38bd12STony Lindgren &dm816x_l4_ls__timer7, 14607e1b11d1STony Lindgren &dm81xx_l4_ls__mcspi1, 14617e1b11d1STony Lindgren &dm81xx_l4_ls__mailbox, 14621539569bSNeil Armstrong &dm81xx_l4_ls__spinbox, 14637e1b11d1STony Lindgren &dm81xx_l4_hs__emac0, 14647e1b11d1STony Lindgren &dm81xx_emac0__mdio, 14654d38bd12STony Lindgren &dm816x_l4_hs__emac1, 146649e9e616SKevin Hilman &dm81xx_l4_hs__sata, 14677e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tpcc, 14687e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc0, 14697e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc1, 14707e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc2, 14717e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc3, 14727e1b11d1STony Lindgren &dm81xx_tptc0__alwon_l3_fast, 14737e1b11d1STony Lindgren &dm81xx_tptc1__alwon_l3_fast, 14747e1b11d1STony Lindgren &dm81xx_tptc2__alwon_l3_fast, 14757e1b11d1STony Lindgren &dm81xx_tptc3__alwon_l3_fast, 14764d38bd12STony Lindgren &dm81xx_alwon_l3_slow__gpmc, 1477f53850b5STony Lindgren &dm816x_default_l3_slow__usbss, 14784d38bd12STony Lindgren NULL, 14794d38bd12STony Lindgren }; 14804d38bd12STony Lindgren 14810f3ccb24STony Lindgren int __init dm816x_hwmod_init(void) 14824d38bd12STony Lindgren { 14834d38bd12STony Lindgren omap_hwmod_init(); 14844d38bd12STony Lindgren return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs); 14854d38bd12STony Lindgren } 1486