14d38bd12STony Lindgren /* 24d38bd12STony Lindgren * DM81xx hwmod data. 34d38bd12STony Lindgren * 44d38bd12STony Lindgren * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ 54d38bd12STony Lindgren * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/ 64d38bd12STony Lindgren * 74d38bd12STony Lindgren * This program is free software; you can redistribute it and/or 84d38bd12STony Lindgren * modify it under the terms of the GNU General Public License as 94d38bd12STony Lindgren * published by the Free Software Foundation version 2. 104d38bd12STony Lindgren * 114d38bd12STony Lindgren * This program is distributed "as is" WITHOUT ANY WARRANTY of any 124d38bd12STony Lindgren * kind, whether express or implied; without even the implied warranty 134d38bd12STony Lindgren * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 144d38bd12STony Lindgren * GNU General Public License for more details. 154d38bd12STony Lindgren * 164d38bd12STony Lindgren */ 174d38bd12STony Lindgren 18ddd6a9d9STony Lindgren #include <linux/types.h> 19ddd6a9d9STony Lindgren 204d38bd12STony Lindgren #include <linux/platform_data/hsmmc-omap.h> 214d38bd12STony Lindgren 224d38bd12STony Lindgren #include "omap_hwmod_common_data.h" 234d38bd12STony Lindgren #include "cm81xx.h" 244d38bd12STony Lindgren #include "ti81xx.h" 254d38bd12STony Lindgren #include "wd_timer.h" 264d38bd12STony Lindgren 274d38bd12STony Lindgren /* 284d38bd12STony Lindgren * DM816X hardware modules integration data 294d38bd12STony Lindgren * 304d38bd12STony Lindgren * Note: This is incomplete and at present, not generated from h/w database. 314d38bd12STony Lindgren */ 324d38bd12STony Lindgren 334d38bd12STony Lindgren /* 347e1b11d1STony Lindgren * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS" 357e1b11d1STony Lindgren * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400. 364d38bd12STony Lindgren */ 377e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP0_CLKCTRL 0x140 387e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP1_CLKCTRL 0x144 397e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCASP2_CLKCTRL 0x148 407e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MCBSP_CLKCTRL 0x14c 417e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_0_CLKCTRL 0x150 427e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_1_CLKCTRL 0x154 437e1b11d1STony Lindgren #define DM81XX_CM_ALWON_UART_2_CLKCTRL 0x158 447e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL 0x15c 457e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL 0x160 467e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_0_CLKCTRL 0x164 477e1b11d1STony Lindgren #define DM81XX_CM_ALWON_I2C_1_CLKCTRL 0x168 487e1b11d1STony Lindgren #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL 0x18c 497e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPI_CLKCTRL 0x190 507e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL 0x194 517e1b11d1STony Lindgren #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL 0x198 527e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL 0x19c 537e1b11d1STony Lindgren #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL 0x1a8 547e1b11d1STony Lindgren #define DM81XX_CM_ALWON_CONTROL_CLKCTRL 0x1c4 557e1b11d1STony Lindgren #define DM81XX_CM_ALWON_GPMC_CLKCTRL 0x1d0 567e1b11d1STony Lindgren #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL 0x1d4 577e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L3_CLKCTRL 0x1e4 587e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4HS_CLKCTRL 0x1e8 597e1b11d1STony Lindgren #define DM81XX_CM_ALWON_L4LS_CLKCTRL 0x1ec 607e1b11d1STony Lindgren #define DM81XX_CM_ALWON_RTC_CLKCTRL 0x1f0 617e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPCC_CLKCTRL 0x1f4 627e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC0_CLKCTRL 0x1f8 637e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC1_CLKCTRL 0x1fc 647e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC2_CLKCTRL 0x200 657e1b11d1STony Lindgren #define DM81XX_CM_ALWON_TPTC3_CLKCTRL 0x204 667e1b11d1STony Lindgren 677e1b11d1STony Lindgren /* Registers specific to dm814x */ 687e1b11d1STony Lindgren #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL 0x16c 697e1b11d1STony Lindgren #define DM814X_CM_ALWON_ATL_CLKCTRL 0x170 707e1b11d1STony Lindgren #define DM814X_CM_ALWON_MLB_CLKCTRL 0x174 717e1b11d1STony Lindgren #define DM814X_CM_ALWON_PATA_CLKCTRL 0x178 727e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_3_CLKCTRL 0x180 737e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_4_CLKCTRL 0x184 747e1b11d1STony Lindgren #define DM814X_CM_ALWON_UART_5_CLKCTRL 0x188 757e1b11d1STony Lindgren #define DM814X_CM_ALWON_OCM_0_CLKCTRL 0x1b4 767e1b11d1STony Lindgren #define DM814X_CM_ALWON_VCP_CLKCTRL 0x1b8 777e1b11d1STony Lindgren #define DM814X_CM_ALWON_MPU_CLKCTRL 0x1dc 787e1b11d1STony Lindgren #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL 0x1e0 797e1b11d1STony Lindgren #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL 0x218 807e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL 0x21c 817e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL 0x220 827e1b11d1STony Lindgren #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL 0x224 837e1b11d1STony Lindgren #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL 0x228 847e1b11d1STony Lindgren 857e1b11d1STony Lindgren /* Registers specific to dm816x */ 864d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE 0x1400 874d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE) 884d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE) 894d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE) 904d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE) 914d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE) 924d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE) 934d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE) 944d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE) 954d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE) 964d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE) 974d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE) 984d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE) 994d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE) 1004d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE) 1014d38bd12STony Lindgren 1024d38bd12STony Lindgren /* 1034d38bd12STony Lindgren * The default .clkctrl_offs field is offset from CM_DEFAULT, that's 1044d38bd12STony Lindgren * TRM 18.7.6 CM_DEFAULT device register values minus 0x500 1054d38bd12STony Lindgren */ 106f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_OFFSET 0x500 107f53850b5STony Lindgren #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET) 10849e9e616SKevin Hilman #define DM81XX_CM_DEFAULT_SATA_CLKCTRL (0x560 - DM81XX_CM_DEFAULT_OFFSET) 1094d38bd12STony Lindgren 1104d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */ 1117e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = { 1124d38bd12STony Lindgren .name = "alwon_l3_slow", 1134d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1144d38bd12STony Lindgren .class = &l3_hwmod_class, 1154d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1164d38bd12STony Lindgren }; 1174d38bd12STony Lindgren 1187e1b11d1STony Lindgren static struct omap_hwmod dm81xx_default_l3_slow_hwmod = { 1194d38bd12STony Lindgren .name = "default_l3_slow", 1204d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 1214d38bd12STony Lindgren .class = &l3_hwmod_class, 1224d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1234d38bd12STony Lindgren }; 1244d38bd12STony Lindgren 1257e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_med_hwmod = { 1264d38bd12STony Lindgren .name = "l3_med", 1274d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1284d38bd12STony Lindgren .class = &l3_hwmod_class, 1294d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1304d38bd12STony Lindgren }; 1314d38bd12STony Lindgren 1327e1b11d1STony Lindgren static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod = { 1334d38bd12STony Lindgren .name = "l3_fast", 1344d38bd12STony Lindgren .clkdm_name = "alwon_l3_fast_clkdm", 1354d38bd12STony Lindgren .class = &l3_hwmod_class, 1364d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 1374d38bd12STony Lindgren }; 1384d38bd12STony Lindgren 1394d38bd12STony Lindgren /* 1404d38bd12STony Lindgren * L4 standard peripherals, see TRM table 1-12 for devices using this. 1414d38bd12STony Lindgren * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock. 1424d38bd12STony Lindgren */ 1437e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_ls_hwmod = { 1444d38bd12STony Lindgren .name = "l4_ls", 1454d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1464d38bd12STony Lindgren .class = &l4_hwmod_class, 14729f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 1484d38bd12STony Lindgren }; 1494d38bd12STony Lindgren 1504d38bd12STony Lindgren /* 1514d38bd12STony Lindgren * L4 high-speed peripherals. For devices using this, please see the TRM 1524d38bd12STony Lindgren * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM 1534d38bd12STony Lindgren * table 1-73 for devices using 250MHz SYSCLK5 clock. 1544d38bd12STony Lindgren */ 1557e1b11d1STony Lindgren static struct omap_hwmod dm81xx_l4_hs_hwmod = { 1564d38bd12STony Lindgren .name = "l4_hs", 1574d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1584d38bd12STony Lindgren .class = &l4_hwmod_class, 15929f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 1604d38bd12STony Lindgren }; 1614d38bd12STony Lindgren 1624d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */ 1637e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = { 1647e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_slow_hwmod, 1657e1b11d1STony Lindgren .slave = &dm81xx_l4_ls_hwmod, 1664d38bd12STony Lindgren .user = OCP_USER_MPU, 1674d38bd12STony Lindgren }; 1684d38bd12STony Lindgren 1694d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */ 1707e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = { 1717e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_med_hwmod, 1727e1b11d1STony Lindgren .slave = &dm81xx_l4_hs_hwmod, 1734d38bd12STony Lindgren .user = OCP_USER_MPU, 1744d38bd12STony Lindgren }; 1754d38bd12STony Lindgren 1764d38bd12STony Lindgren /* MPU */ 1770f3ccb24STony Lindgren static struct omap_hwmod dm814x_mpu_hwmod = { 1780f3ccb24STony Lindgren .name = "mpu", 1790f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1800f3ccb24STony Lindgren .class = &mpu_hwmod_class, 1810f3ccb24STony Lindgren .flags = HWMOD_INIT_NO_IDLE, 1820f3ccb24STony Lindgren .main_clk = "mpu_ck", 1830f3ccb24STony Lindgren .prcm = { 1840f3ccb24STony Lindgren .omap4 = { 1850f3ccb24STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL, 1860f3ccb24STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1870f3ccb24STony Lindgren }, 1880f3ccb24STony Lindgren }, 1890f3ccb24STony Lindgren }; 1900f3ccb24STony Lindgren 1910f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = { 1920f3ccb24STony Lindgren .master = &dm814x_mpu_hwmod, 1930f3ccb24STony Lindgren .slave = &dm81xx_alwon_l3_slow_hwmod, 1940f3ccb24STony Lindgren .user = OCP_USER_MPU, 1950f3ccb24STony Lindgren }; 1960f3ccb24STony Lindgren 1970f3ccb24STony Lindgren /* L3 med peripheral interface running at 200MHz */ 1980f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = { 1990f3ccb24STony Lindgren .master = &dm814x_mpu_hwmod, 2000f3ccb24STony Lindgren .slave = &dm81xx_alwon_l3_med_hwmod, 2010f3ccb24STony Lindgren .user = OCP_USER_MPU, 2020f3ccb24STony Lindgren }; 2030f3ccb24STony Lindgren 2044d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = { 2054d38bd12STony Lindgren .name = "mpu", 2064d38bd12STony Lindgren .clkdm_name = "alwon_mpu_clkdm", 2074d38bd12STony Lindgren .class = &mpu_hwmod_class, 2084d38bd12STony Lindgren .flags = HWMOD_INIT_NO_IDLE, 2094d38bd12STony Lindgren .main_clk = "mpu_ck", 2104d38bd12STony Lindgren .prcm = { 2114d38bd12STony Lindgren .omap4 = { 2124d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL, 2134d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 2144d38bd12STony Lindgren }, 2154d38bd12STony Lindgren }, 2164d38bd12STony Lindgren }; 2174d38bd12STony Lindgren 2184d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = { 2194d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 2207e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_slow_hwmod, 2214d38bd12STony Lindgren .user = OCP_USER_MPU, 2224d38bd12STony Lindgren }; 2234d38bd12STony Lindgren 2244d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */ 2254d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = { 2264d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 2277e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_med_hwmod, 2284d38bd12STony Lindgren .user = OCP_USER_MPU, 2294d38bd12STony Lindgren }; 2304d38bd12STony Lindgren 231c5803246STony Lindgren /* RTC */ 232c5803246STony Lindgren static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = { 233c5803246STony Lindgren .rev_offs = 0x74, 234c5803246STony Lindgren .sysc_offs = 0x78, 235c5803246STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE, 236c5803246STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | 237c5803246STony Lindgren SIDLE_SMART | SIDLE_SMART_WKUP, 238c5803246STony Lindgren .sysc_fields = &omap_hwmod_sysc_type3, 239c5803246STony Lindgren }; 240c5803246STony Lindgren 241c5803246STony Lindgren static struct omap_hwmod_class ti81xx_rtc_hwmod_class = { 242c5803246STony Lindgren .name = "rtc", 243c5803246STony Lindgren .sysc = &ti81xx_rtc_sysc, 244c5803246STony Lindgren }; 245c5803246STony Lindgren 24641dc5483SBen Dooks static struct omap_hwmod ti81xx_rtc_hwmod = { 247c5803246STony Lindgren .name = "rtc", 248c5803246STony Lindgren .class = &ti81xx_rtc_hwmod_class, 249c5803246STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 250c5803246STony Lindgren .flags = HWMOD_NO_IDLEST, 251c5803246STony Lindgren .main_clk = "sysclk18_ck", 252c5803246STony Lindgren .prcm = { 253c5803246STony Lindgren .omap4 = { 254c5803246STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL, 255c5803246STony Lindgren .modulemode = MODULEMODE_SWCTRL, 256c5803246STony Lindgren }, 257c5803246STony Lindgren }, 258c5803246STony Lindgren }; 259c5803246STony Lindgren 260c5803246STony Lindgren static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = { 261c5803246STony Lindgren .master = &dm81xx_l4_ls_hwmod, 262c5803246STony Lindgren .slave = &ti81xx_rtc_hwmod, 263c5803246STony Lindgren .clk = "sysclk6_ck", 264c5803246STony Lindgren .user = OCP_USER_MPU, 265c5803246STony Lindgren }; 266c5803246STony Lindgren 2674d38bd12STony Lindgren /* UART common */ 2684d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = { 2694d38bd12STony Lindgren .rev_offs = 0x50, 2704d38bd12STony Lindgren .sysc_offs = 0x54, 2714d38bd12STony Lindgren .syss_offs = 0x58, 2724d38bd12STony Lindgren .sysc_flags = SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | 2734d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 2744d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 2754d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2764d38bd12STony Lindgren MSTANDBY_SMART_WKUP, 2774d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 2784d38bd12STony Lindgren }; 2794d38bd12STony Lindgren 2804d38bd12STony Lindgren static struct omap_hwmod_class uart_class = { 2814d38bd12STony Lindgren .name = "uart", 2824d38bd12STony Lindgren .sysc = &uart_sysc, 2834d38bd12STony Lindgren }; 2844d38bd12STony Lindgren 2857e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart1_hwmod = { 2864d38bd12STony Lindgren .name = "uart1", 2874d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 2884d38bd12STony Lindgren .main_clk = "sysclk10_ck", 2894d38bd12STony Lindgren .prcm = { 2904d38bd12STony Lindgren .omap4 = { 2917e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL, 2924d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 2934d38bd12STony Lindgren }, 2944d38bd12STony Lindgren }, 2954d38bd12STony Lindgren .class = &uart_class, 2964d38bd12STony Lindgren .flags = DEBUG_TI81XXUART1_FLAGS, 2974d38bd12STony Lindgren }; 2984d38bd12STony Lindgren 2997e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = { 3007e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3017e1b11d1STony Lindgren .slave = &dm81xx_uart1_hwmod, 3024d38bd12STony Lindgren .clk = "sysclk6_ck", 3034d38bd12STony Lindgren .user = OCP_USER_MPU, 3044d38bd12STony Lindgren }; 3054d38bd12STony Lindgren 3067e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart2_hwmod = { 3074d38bd12STony Lindgren .name = "uart2", 3084d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3094d38bd12STony Lindgren .main_clk = "sysclk10_ck", 3104d38bd12STony Lindgren .prcm = { 3114d38bd12STony Lindgren .omap4 = { 3127e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL, 3134d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3144d38bd12STony Lindgren }, 3154d38bd12STony Lindgren }, 3164d38bd12STony Lindgren .class = &uart_class, 3174d38bd12STony Lindgren .flags = DEBUG_TI81XXUART2_FLAGS, 3184d38bd12STony Lindgren }; 3194d38bd12STony Lindgren 3207e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = { 3217e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3227e1b11d1STony Lindgren .slave = &dm81xx_uart2_hwmod, 3234d38bd12STony Lindgren .clk = "sysclk6_ck", 3244d38bd12STony Lindgren .user = OCP_USER_MPU, 3254d38bd12STony Lindgren }; 3264d38bd12STony Lindgren 3277e1b11d1STony Lindgren static struct omap_hwmod dm81xx_uart3_hwmod = { 3284d38bd12STony Lindgren .name = "uart3", 3294d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3304d38bd12STony Lindgren .main_clk = "sysclk10_ck", 3314d38bd12STony Lindgren .prcm = { 3324d38bd12STony Lindgren .omap4 = { 3337e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL, 3344d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3354d38bd12STony Lindgren }, 3364d38bd12STony Lindgren }, 3374d38bd12STony Lindgren .class = &uart_class, 3384d38bd12STony Lindgren .flags = DEBUG_TI81XXUART3_FLAGS, 3394d38bd12STony Lindgren }; 3404d38bd12STony Lindgren 3417e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = { 3427e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3437e1b11d1STony Lindgren .slave = &dm81xx_uart3_hwmod, 3444d38bd12STony Lindgren .clk = "sysclk6_ck", 3454d38bd12STony Lindgren .user = OCP_USER_MPU, 3464d38bd12STony Lindgren }; 3474d38bd12STony Lindgren 3484d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = { 3494d38bd12STony Lindgren .rev_offs = 0x0, 3504d38bd12STony Lindgren .sysc_offs = 0x10, 3514d38bd12STony Lindgren .syss_offs = 0x14, 3524d38bd12STony Lindgren .sysc_flags = SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | 3534d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 3544d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 3554d38bd12STony Lindgren }; 3564d38bd12STony Lindgren 3574d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = { 3584d38bd12STony Lindgren .name = "wd_timer", 3594d38bd12STony Lindgren .sysc = &wd_timer_sysc, 3604d38bd12STony Lindgren .pre_shutdown = &omap2_wd_timer_disable, 3614d38bd12STony Lindgren .reset = &omap2_wd_timer_reset, 3624d38bd12STony Lindgren }; 3634d38bd12STony Lindgren 3647e1b11d1STony Lindgren static struct omap_hwmod dm81xx_wd_timer_hwmod = { 3654d38bd12STony Lindgren .name = "wd_timer", 3664d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 3674d38bd12STony Lindgren .main_clk = "sysclk18_ck", 3684d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 3694d38bd12STony Lindgren .prcm = { 3704d38bd12STony Lindgren .omap4 = { 3717e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL, 3724d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 3734d38bd12STony Lindgren }, 3744d38bd12STony Lindgren }, 3754d38bd12STony Lindgren .class = &wd_timer_class, 3764d38bd12STony Lindgren }; 3774d38bd12STony Lindgren 3787e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = { 3797e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 3807e1b11d1STony Lindgren .slave = &dm81xx_wd_timer_hwmod, 3814d38bd12STony Lindgren .clk = "sysclk6_ck", 3824d38bd12STony Lindgren .user = OCP_USER_MPU, 3834d38bd12STony Lindgren }; 3844d38bd12STony Lindgren 3854d38bd12STony Lindgren /* I2C common */ 3864d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = { 3874d38bd12STony Lindgren .rev_offs = 0x0, 3884d38bd12STony Lindgren .sysc_offs = 0x10, 3894d38bd12STony Lindgren .syss_offs = 0x90, 3904d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | 3914d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 3924d38bd12STony Lindgren SYSC_HAS_AUTOIDLE, 3934d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 3944d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 3954d38bd12STony Lindgren }; 3964d38bd12STony Lindgren 3974d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = { 3984d38bd12STony Lindgren .name = "i2c", 3994d38bd12STony Lindgren .sysc = &i2c_sysc, 4004d38bd12STony Lindgren }; 4014d38bd12STony Lindgren 4024d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = { 4034d38bd12STony Lindgren .name = "i2c1", 4044d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4054d38bd12STony Lindgren .main_clk = "sysclk10_ck", 4064d38bd12STony Lindgren .prcm = { 4074d38bd12STony Lindgren .omap4 = { 4087e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL, 4094d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 4104d38bd12STony Lindgren }, 4114d38bd12STony Lindgren }, 4124d38bd12STony Lindgren .class = &i2c_class, 4134d38bd12STony Lindgren }; 4144d38bd12STony Lindgren 4157e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = { 4167e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 4174d38bd12STony Lindgren .slave = &dm81xx_i2c1_hwmod, 4184d38bd12STony Lindgren .clk = "sysclk6_ck", 4194d38bd12STony Lindgren .user = OCP_USER_MPU, 4204d38bd12STony Lindgren }; 4214d38bd12STony Lindgren 4227e1b11d1STony Lindgren static struct omap_hwmod dm81xx_i2c2_hwmod = { 4234d38bd12STony Lindgren .name = "i2c2", 4244d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4254d38bd12STony Lindgren .main_clk = "sysclk10_ck", 4264d38bd12STony Lindgren .prcm = { 4274d38bd12STony Lindgren .omap4 = { 4287e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL, 4294d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 4304d38bd12STony Lindgren }, 4314d38bd12STony Lindgren }, 4324d38bd12STony Lindgren .class = &i2c_class, 4334d38bd12STony Lindgren }; 4344d38bd12STony Lindgren 435fee3b674SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = { 436fee3b674SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 437fee3b674SGraeme Smecher .slave = &dm81xx_i2c2_hwmod, 438fee3b674SGraeme Smecher .clk = "sysclk6_ck", 439fee3b674SGraeme Smecher .user = OCP_USER_MPU, 440fee3b674SGraeme Smecher }; 441fee3b674SGraeme Smecher 4424d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = { 4434d38bd12STony Lindgren .rev_offs = 0x0000, 4444d38bd12STony Lindgren .sysc_offs = 0x0010, 4454d38bd12STony Lindgren .syss_offs = 0x0014, 4464d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 4474d38bd12STony Lindgren SYSC_HAS_SOFTRESET | 4484d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 4494d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 4504d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 4514d38bd12STony Lindgren }; 4524d38bd12STony Lindgren 4534d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = { 4544d38bd12STony Lindgren .name = "elm", 4554d38bd12STony Lindgren .sysc = &dm81xx_elm_sysc, 4564d38bd12STony Lindgren }; 4574d38bd12STony Lindgren 4584d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = { 4594d38bd12STony Lindgren .name = "elm", 4604d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4614d38bd12STony Lindgren .class = &dm81xx_elm_hwmod_class, 4624d38bd12STony Lindgren .main_clk = "sysclk6_ck", 4634d38bd12STony Lindgren }; 4644d38bd12STony Lindgren 4654d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = { 4667e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 4674d38bd12STony Lindgren .slave = &dm81xx_elm_hwmod, 4684f5395f0STony Lindgren .clk = "sysclk6_ck", 4694d38bd12STony Lindgren .user = OCP_USER_MPU, 4704d38bd12STony Lindgren }; 4714d38bd12STony Lindgren 4724d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = { 4734d38bd12STony Lindgren .rev_offs = 0x0000, 4744d38bd12STony Lindgren .sysc_offs = 0x0010, 4754d38bd12STony Lindgren .syss_offs = 0x0114, 4764d38bd12STony Lindgren .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | 4774d38bd12STony Lindgren SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 4784d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 4794d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 4804d38bd12STony Lindgren SIDLE_SMART_WKUP, 4814d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 4824d38bd12STony Lindgren }; 4834d38bd12STony Lindgren 4844d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = { 4854d38bd12STony Lindgren .name = "gpio", 4864d38bd12STony Lindgren .sysc = &dm81xx_gpio_sysc, 4874d38bd12STony Lindgren .rev = 2, 4884d38bd12STony Lindgren }; 4894d38bd12STony Lindgren 4904d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 4914d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 4924d38bd12STony Lindgren }; 4934d38bd12STony Lindgren 4944d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = { 4954d38bd12STony Lindgren .name = "gpio1", 4964d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 4974d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 4984d38bd12STony Lindgren .main_clk = "sysclk6_ck", 4994d38bd12STony Lindgren .prcm = { 5004d38bd12STony Lindgren .omap4 = { 5017e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL, 5024d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 5034d38bd12STony Lindgren }, 5044d38bd12STony Lindgren }, 5054d38bd12STony Lindgren .opt_clks = gpio1_opt_clks, 5064d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 5074d38bd12STony Lindgren }; 5084d38bd12STony Lindgren 5094d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = { 5107e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 5114d38bd12STony Lindgren .slave = &dm81xx_gpio1_hwmod, 5124f5395f0STony Lindgren .clk = "sysclk6_ck", 5134d38bd12STony Lindgren .user = OCP_USER_MPU, 5144d38bd12STony Lindgren }; 5154d38bd12STony Lindgren 5164d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 5174d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 5184d38bd12STony Lindgren }; 5194d38bd12STony Lindgren 5204d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = { 5214d38bd12STony Lindgren .name = "gpio2", 5224d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 5234d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 5244d38bd12STony Lindgren .main_clk = "sysclk6_ck", 5254d38bd12STony Lindgren .prcm = { 5264d38bd12STony Lindgren .omap4 = { 5277e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL, 5284d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 5294d38bd12STony Lindgren }, 5304d38bd12STony Lindgren }, 5314d38bd12STony Lindgren .opt_clks = gpio2_opt_clks, 5324d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 5334d38bd12STony Lindgren }; 5344d38bd12STony Lindgren 5354d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = { 5367e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 5374d38bd12STony Lindgren .slave = &dm81xx_gpio2_hwmod, 5384f5395f0STony Lindgren .clk = "sysclk6_ck", 5394d38bd12STony Lindgren .user = OCP_USER_MPU, 5404d38bd12STony Lindgren }; 5414d38bd12STony Lindgren 542*d27cda29SGraeme Smecher static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 543*d27cda29SGraeme Smecher { .role = "dbclk", .clk = "sysclk18_ck" }, 544*d27cda29SGraeme Smecher }; 545*d27cda29SGraeme Smecher 546*d27cda29SGraeme Smecher static struct omap_hwmod dm81xx_gpio3_hwmod = { 547*d27cda29SGraeme Smecher .name = "gpio3", 548*d27cda29SGraeme Smecher .clkdm_name = "alwon_l3s_clkdm", 549*d27cda29SGraeme Smecher .class = &dm81xx_gpio_hwmod_class, 550*d27cda29SGraeme Smecher .main_clk = "sysclk6_ck", 551*d27cda29SGraeme Smecher .prcm = { 552*d27cda29SGraeme Smecher .omap4 = { 553*d27cda29SGraeme Smecher .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL, 554*d27cda29SGraeme Smecher .modulemode = MODULEMODE_SWCTRL, 555*d27cda29SGraeme Smecher }, 556*d27cda29SGraeme Smecher }, 557*d27cda29SGraeme Smecher .opt_clks = gpio3_opt_clks, 558*d27cda29SGraeme Smecher .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), 559*d27cda29SGraeme Smecher }; 560*d27cda29SGraeme Smecher 561*d27cda29SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio3 = { 562*d27cda29SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 563*d27cda29SGraeme Smecher .slave = &dm81xx_gpio3_hwmod, 564*d27cda29SGraeme Smecher .clk = "sysclk6_ck", 565*d27cda29SGraeme Smecher .user = OCP_USER_MPU, 566*d27cda29SGraeme Smecher }; 567*d27cda29SGraeme Smecher 568*d27cda29SGraeme Smecher static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { 569*d27cda29SGraeme Smecher { .role = "dbclk", .clk = "sysclk18_ck" }, 570*d27cda29SGraeme Smecher }; 571*d27cda29SGraeme Smecher 572*d27cda29SGraeme Smecher static struct omap_hwmod dm81xx_gpio4_hwmod = { 573*d27cda29SGraeme Smecher .name = "gpio4", 574*d27cda29SGraeme Smecher .clkdm_name = "alwon_l3s_clkdm", 575*d27cda29SGraeme Smecher .class = &dm81xx_gpio_hwmod_class, 576*d27cda29SGraeme Smecher .main_clk = "sysclk6_ck", 577*d27cda29SGraeme Smecher .prcm = { 578*d27cda29SGraeme Smecher .omap4 = { 579*d27cda29SGraeme Smecher .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL, 580*d27cda29SGraeme Smecher .modulemode = MODULEMODE_SWCTRL, 581*d27cda29SGraeme Smecher }, 582*d27cda29SGraeme Smecher }, 583*d27cda29SGraeme Smecher .opt_clks = gpio4_opt_clks, 584*d27cda29SGraeme Smecher .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), 585*d27cda29SGraeme Smecher }; 586*d27cda29SGraeme Smecher 587*d27cda29SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio4 = { 588*d27cda29SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 589*d27cda29SGraeme Smecher .slave = &dm81xx_gpio4_hwmod, 590*d27cda29SGraeme Smecher .clk = "sysclk6_ck", 591*d27cda29SGraeme Smecher .user = OCP_USER_MPU, 592*d27cda29SGraeme Smecher }; 593*d27cda29SGraeme Smecher 5944d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = { 5954d38bd12STony Lindgren .rev_offs = 0x0, 5964d38bd12STony Lindgren .sysc_offs = 0x10, 5974d38bd12STony Lindgren .syss_offs = 0x14, 5984d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 5994d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 6004d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 6014d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 6024d38bd12STony Lindgren }; 6034d38bd12STony Lindgren 6044d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = { 6054d38bd12STony Lindgren .name = "gpmc", 6064d38bd12STony Lindgren .sysc = &dm81xx_gpmc_sysc, 6074d38bd12STony Lindgren }; 6084d38bd12STony Lindgren 6094d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = { 6104d38bd12STony Lindgren .name = "gpmc", 6114d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 6124d38bd12STony Lindgren .class = &dm81xx_gpmc_hwmod_class, 6134d38bd12STony Lindgren .main_clk = "sysclk6_ck", 61463aa945bSTony Lindgren /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */ 61563aa945bSTony Lindgren .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS, 6164d38bd12STony Lindgren .prcm = { 6174d38bd12STony Lindgren .omap4 = { 6187e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL, 6194d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 6204d38bd12STony Lindgren }, 6214d38bd12STony Lindgren }, 6224d38bd12STony Lindgren }; 6234d38bd12STony Lindgren 624f734a9b3SSekhar Nori static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = { 6257e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_slow_hwmod, 6264d38bd12STony Lindgren .slave = &dm81xx_gpmc_hwmod, 6274d38bd12STony Lindgren .user = OCP_USER_MPU, 6284d38bd12STony Lindgren }; 6294d38bd12STony Lindgren 630ebf24414STony Lindgren /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */ 6314d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = { 6324d38bd12STony Lindgren .rev_offs = 0x0, 6334d38bd12STony Lindgren .sysc_offs = 0x10, 634ebf24414STony Lindgren .srst_udelay = 2, 6354d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | 6364d38bd12STony Lindgren SYSC_HAS_SOFTRESET, 6374d38bd12STony Lindgren .idlemodes = SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART, 6384d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 6394d38bd12STony Lindgren }; 6404d38bd12STony Lindgren 6414d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = { 6424d38bd12STony Lindgren .name = "usbotg", 6434d38bd12STony Lindgren .sysc = &dm81xx_usbhsotg_sysc, 6444d38bd12STony Lindgren }; 6454d38bd12STony Lindgren 646f53850b5STony Lindgren static struct omap_hwmod dm814x_usbss_hwmod = { 6474d38bd12STony Lindgren .name = "usb_otg_hs", 6484d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 649f53850b5STony Lindgren .main_clk = "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */ 6504d38bd12STony Lindgren .prcm = { 6514d38bd12STony Lindgren .omap4 = { 652f53850b5STony Lindgren .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, 6534d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 6544d38bd12STony Lindgren }, 6554d38bd12STony Lindgren }, 6564d38bd12STony Lindgren .class = &dm81xx_usbotg_class, 6574d38bd12STony Lindgren }; 6584d38bd12STony Lindgren 659f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = { 6607e1b11d1STony Lindgren .master = &dm81xx_default_l3_slow_hwmod, 661f53850b5STony Lindgren .slave = &dm814x_usbss_hwmod, 662f53850b5STony Lindgren .clk = "sysclk6_ck", 663f53850b5STony Lindgren .user = OCP_USER_MPU, 664f53850b5STony Lindgren }; 665f53850b5STony Lindgren 666f53850b5STony Lindgren static struct omap_hwmod dm816x_usbss_hwmod = { 667f53850b5STony Lindgren .name = "usb_otg_hs", 668f53850b5STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 669f53850b5STony Lindgren .main_clk = "sysclk6_ck", 670f53850b5STony Lindgren .prcm = { 671f53850b5STony Lindgren .omap4 = { 672f53850b5STony Lindgren .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL, 673f53850b5STony Lindgren .modulemode = MODULEMODE_SWCTRL, 674f53850b5STony Lindgren }, 675f53850b5STony Lindgren }, 676f53850b5STony Lindgren .class = &dm81xx_usbotg_class, 677f53850b5STony Lindgren }; 678f53850b5STony Lindgren 679f53850b5STony Lindgren static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = { 680f53850b5STony Lindgren .master = &dm81xx_default_l3_slow_hwmod, 681f53850b5STony Lindgren .slave = &dm816x_usbss_hwmod, 6824d38bd12STony Lindgren .clk = "sysclk6_ck", 6834d38bd12STony Lindgren .user = OCP_USER_MPU, 6844d38bd12STony Lindgren }; 6854d38bd12STony Lindgren 6864d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = { 6874d38bd12STony Lindgren .rev_offs = 0x0000, 6884d38bd12STony Lindgren .sysc_offs = 0x0010, 6894d38bd12STony Lindgren .syss_offs = 0x0014, 6904d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET, 6914d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 6924d38bd12STony Lindgren SIDLE_SMART_WKUP, 6934d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 6944d38bd12STony Lindgren }; 6954d38bd12STony Lindgren 6964d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = { 6974d38bd12STony Lindgren .name = "timer", 6984d38bd12STony Lindgren .sysc = &dm816x_timer_sysc, 6994d38bd12STony Lindgren }; 7004d38bd12STony Lindgren 7010f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer1_hwmod = { 7020f3ccb24STony Lindgren .name = "timer1", 7030f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 704cb4db038STony Lindgren .main_clk = "timer1_fck", 7050f3ccb24STony Lindgren .class = &dm816x_timer_hwmod_class, 7060f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 7070f3ccb24STony Lindgren }; 7080f3ccb24STony Lindgren 7090f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = { 7100f3ccb24STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7110f3ccb24STony Lindgren .slave = &dm814x_timer1_hwmod, 7124f5395f0STony Lindgren .clk = "sysclk6_ck", 7130f3ccb24STony Lindgren .user = OCP_USER_MPU, 7140f3ccb24STony Lindgren }; 7150f3ccb24STony Lindgren 7164d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = { 7174d38bd12STony Lindgren .name = "timer1", 7184d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7194d38bd12STony Lindgren .main_clk = "timer1_fck", 7204d38bd12STony Lindgren .prcm = { 7214d38bd12STony Lindgren .omap4 = { 7224d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL, 7234d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7244d38bd12STony Lindgren }, 7254d38bd12STony Lindgren }, 7264d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7274d38bd12STony Lindgren }; 7284d38bd12STony Lindgren 7294d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = { 7307e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7314d38bd12STony Lindgren .slave = &dm816x_timer1_hwmod, 7324d38bd12STony Lindgren .clk = "sysclk6_ck", 7334d38bd12STony Lindgren .user = OCP_USER_MPU, 7344d38bd12STony Lindgren }; 7354d38bd12STony Lindgren 7360f3ccb24STony Lindgren static struct omap_hwmod dm814x_timer2_hwmod = { 7370f3ccb24STony Lindgren .name = "timer2", 7380f3ccb24STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 739cb4db038STony Lindgren .main_clk = "timer2_fck", 7400f3ccb24STony Lindgren .class = &dm816x_timer_hwmod_class, 7410f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 7420f3ccb24STony Lindgren }; 7430f3ccb24STony Lindgren 7440f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = { 7450f3ccb24STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7460f3ccb24STony Lindgren .slave = &dm814x_timer2_hwmod, 7474f5395f0STony Lindgren .clk = "sysclk6_ck", 7480f3ccb24STony Lindgren .user = OCP_USER_MPU, 7490f3ccb24STony Lindgren }; 7500f3ccb24STony Lindgren 7514d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = { 7524d38bd12STony Lindgren .name = "timer2", 7534d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7544d38bd12STony Lindgren .main_clk = "timer2_fck", 7554d38bd12STony Lindgren .prcm = { 7564d38bd12STony Lindgren .omap4 = { 7574d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL, 7584d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7594d38bd12STony Lindgren }, 7604d38bd12STony Lindgren }, 7614d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7624d38bd12STony Lindgren }; 7634d38bd12STony Lindgren 7644d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = { 7657e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7664d38bd12STony Lindgren .slave = &dm816x_timer2_hwmod, 7674d38bd12STony Lindgren .clk = "sysclk6_ck", 7684d38bd12STony Lindgren .user = OCP_USER_MPU, 7694d38bd12STony Lindgren }; 7704d38bd12STony Lindgren 7714d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = { 7724d38bd12STony Lindgren .name = "timer3", 7734d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7744d38bd12STony Lindgren .main_clk = "timer3_fck", 7754d38bd12STony Lindgren .prcm = { 7764d38bd12STony Lindgren .omap4 = { 7774d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL, 7784d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7794d38bd12STony Lindgren }, 7804d38bd12STony Lindgren }, 7814d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 7824d38bd12STony Lindgren }; 7834d38bd12STony Lindgren 7844d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = { 7857e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 7864d38bd12STony Lindgren .slave = &dm816x_timer3_hwmod, 7874d38bd12STony Lindgren .clk = "sysclk6_ck", 7884d38bd12STony Lindgren .user = OCP_USER_MPU, 7894d38bd12STony Lindgren }; 7904d38bd12STony Lindgren 7914d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = { 7924d38bd12STony Lindgren .name = "timer4", 7934d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 7944d38bd12STony Lindgren .main_clk = "timer4_fck", 7954d38bd12STony Lindgren .prcm = { 7964d38bd12STony Lindgren .omap4 = { 7974d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL, 7984d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 7994d38bd12STony Lindgren }, 8004d38bd12STony Lindgren }, 8014d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8024d38bd12STony Lindgren }; 8034d38bd12STony Lindgren 8044d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = { 8057e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8064d38bd12STony Lindgren .slave = &dm816x_timer4_hwmod, 8074d38bd12STony Lindgren .clk = "sysclk6_ck", 8084d38bd12STony Lindgren .user = OCP_USER_MPU, 8094d38bd12STony Lindgren }; 8104d38bd12STony Lindgren 8114d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = { 8124d38bd12STony Lindgren .name = "timer5", 8134d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 8144d38bd12STony Lindgren .main_clk = "timer5_fck", 8154d38bd12STony Lindgren .prcm = { 8164d38bd12STony Lindgren .omap4 = { 8174d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL, 8184d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8194d38bd12STony Lindgren }, 8204d38bd12STony Lindgren }, 8214d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8224d38bd12STony Lindgren }; 8234d38bd12STony Lindgren 8244d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = { 8257e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8264d38bd12STony Lindgren .slave = &dm816x_timer5_hwmod, 8274d38bd12STony Lindgren .clk = "sysclk6_ck", 8284d38bd12STony Lindgren .user = OCP_USER_MPU, 8294d38bd12STony Lindgren }; 8304d38bd12STony Lindgren 8314d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = { 8324d38bd12STony Lindgren .name = "timer6", 8334d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 8344d38bd12STony Lindgren .main_clk = "timer6_fck", 8354d38bd12STony Lindgren .prcm = { 8364d38bd12STony Lindgren .omap4 = { 8374d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL, 8384d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8394d38bd12STony Lindgren }, 8404d38bd12STony Lindgren }, 8414d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8424d38bd12STony Lindgren }; 8434d38bd12STony Lindgren 8444d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = { 8457e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8464d38bd12STony Lindgren .slave = &dm816x_timer6_hwmod, 8474d38bd12STony Lindgren .clk = "sysclk6_ck", 8484d38bd12STony Lindgren .user = OCP_USER_MPU, 8494d38bd12STony Lindgren }; 8504d38bd12STony Lindgren 8514d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = { 8524d38bd12STony Lindgren .name = "timer7", 8534d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 8544d38bd12STony Lindgren .main_clk = "timer7_fck", 8554d38bd12STony Lindgren .prcm = { 8564d38bd12STony Lindgren .omap4 = { 8574d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL, 8584d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8594d38bd12STony Lindgren }, 8604d38bd12STony Lindgren }, 8614d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 8624d38bd12STony Lindgren }; 8634d38bd12STony Lindgren 8644d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = { 8657e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 8664d38bd12STony Lindgren .slave = &dm816x_timer7_hwmod, 8674d38bd12STony Lindgren .clk = "sysclk6_ck", 8684d38bd12STony Lindgren .user = OCP_USER_MPU, 8694d38bd12STony Lindgren }; 8704d38bd12STony Lindgren 8710f3ccb24STony Lindgren /* CPSW on dm814x */ 8720f3ccb24STony Lindgren static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = { 8730f3ccb24STony Lindgren .rev_offs = 0x0, 8740f3ccb24STony Lindgren .sysc_offs = 0x8, 8750f3ccb24STony Lindgren .syss_offs = 0x4, 8760f3ccb24STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | 8770f3ccb24STony Lindgren SYSS_HAS_RESET_STATUS, 8780f3ccb24STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE | 8790f3ccb24STony Lindgren MSTANDBY_NO, 8800f3ccb24STony Lindgren .sysc_fields = &omap_hwmod_sysc_type3, 8810f3ccb24STony Lindgren }; 8820f3ccb24STony Lindgren 8830f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = { 8840f3ccb24STony Lindgren .name = "cpgmac0", 8850f3ccb24STony Lindgren .sysc = &dm814x_cpgmac_sysc, 8860f3ccb24STony Lindgren }; 8870f3ccb24STony Lindgren 88824da741cSTony Lindgren static struct omap_hwmod dm814x_cpgmac0_hwmod = { 8890f3ccb24STony Lindgren .name = "cpgmac0", 8900f3ccb24STony Lindgren .class = &dm814x_cpgmac0_hwmod_class, 8910f3ccb24STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 8920f3ccb24STony Lindgren .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 8930f3ccb24STony Lindgren .main_clk = "cpsw_125mhz_gclk", 8940f3ccb24STony Lindgren .prcm = { 8950f3ccb24STony Lindgren .omap4 = { 8960f3ccb24STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL, 8970f3ccb24STony Lindgren .modulemode = MODULEMODE_SWCTRL, 8980f3ccb24STony Lindgren }, 8990f3ccb24STony Lindgren }, 9000f3ccb24STony Lindgren }; 9010f3ccb24STony Lindgren 9020f3ccb24STony Lindgren static struct omap_hwmod_class dm814x_mdio_hwmod_class = { 9030f3ccb24STony Lindgren .name = "davinci_mdio", 9040f3ccb24STony Lindgren }; 9050f3ccb24STony Lindgren 90624da741cSTony Lindgren static struct omap_hwmod dm814x_mdio_hwmod = { 9070f3ccb24STony Lindgren .name = "davinci_mdio", 9080f3ccb24STony Lindgren .class = &dm814x_mdio_hwmod_class, 9090f3ccb24STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9100f3ccb24STony Lindgren .main_clk = "cpsw_125mhz_gclk", 9110f3ccb24STony Lindgren }; 9120f3ccb24STony Lindgren 9130f3ccb24STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = { 9140f3ccb24STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9150f3ccb24STony Lindgren .slave = &dm814x_cpgmac0_hwmod, 9160f3ccb24STony Lindgren .clk = "cpsw_125mhz_gclk", 9170f3ccb24STony Lindgren .user = OCP_USER_MPU, 9180f3ccb24STony Lindgren }; 9190f3ccb24STony Lindgren 92024da741cSTony Lindgren static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = { 9210f3ccb24STony Lindgren .master = &dm814x_cpgmac0_hwmod, 9220f3ccb24STony Lindgren .slave = &dm814x_mdio_hwmod, 9230f3ccb24STony Lindgren .user = OCP_USER_MPU, 9240f3ccb24STony Lindgren .flags = HWMOD_NO_IDLEST, 9250f3ccb24STony Lindgren }; 9260f3ccb24STony Lindgren 9274d38bd12STony Lindgren /* EMAC Ethernet */ 9284d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = { 9294d38bd12STony Lindgren .rev_offs = 0x0, 9304d38bd12STony Lindgren .sysc_offs = 0x4, 9314d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SOFTRESET, 9324d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 9334d38bd12STony Lindgren }; 9344d38bd12STony Lindgren 9354d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = { 9364d38bd12STony Lindgren .name = "emac", 9374d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 9384d38bd12STony Lindgren }; 9394d38bd12STony Lindgren 9404d38bd12STony Lindgren /* 9414d38bd12STony Lindgren * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate 9424d38bd12STony Lindgren * driver probed before EMAC0, we let MDIO do the clock idling. 9434d38bd12STony Lindgren */ 9444d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = { 9454d38bd12STony Lindgren .name = "emac0", 9464d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9474d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 94829f5b34cSNeil Armstrong .flags = HWMOD_NO_IDLEST, 9494d38bd12STony Lindgren }; 9504d38bd12STony Lindgren 9517e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = { 9527e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9534d38bd12STony Lindgren .slave = &dm816x_emac0_hwmod, 9544d38bd12STony Lindgren .clk = "sysclk5_ck", 9554d38bd12STony Lindgren .user = OCP_USER_MPU, 9564d38bd12STony Lindgren }; 9574d38bd12STony Lindgren 9587e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mdio_hwmod_class = { 9594d38bd12STony Lindgren .name = "davinci_mdio", 9604d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 9614d38bd12STony Lindgren }; 9624d38bd12STony Lindgren 96324da741cSTony Lindgren static struct omap_hwmod dm81xx_emac0_mdio_hwmod = { 9644d38bd12STony Lindgren .name = "davinci_mdio", 9657e1b11d1STony Lindgren .class = &dm81xx_mdio_hwmod_class, 9664d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9674d38bd12STony Lindgren .main_clk = "sysclk24_ck", 9684d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 9694d38bd12STony Lindgren /* 9704d38bd12STony Lindgren * REVISIT: This should be moved to the emac0_hwmod 9714d38bd12STony Lindgren * once we have a better way to handle device slaves. 9724d38bd12STony Lindgren */ 9734d38bd12STony Lindgren .prcm = { 9744d38bd12STony Lindgren .omap4 = { 9757e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL, 9764d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 9774d38bd12STony Lindgren }, 9784d38bd12STony Lindgren }, 9794d38bd12STony Lindgren }; 9804d38bd12STony Lindgren 98124da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = { 9827e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 9837e1b11d1STony Lindgren .slave = &dm81xx_emac0_mdio_hwmod, 9844d38bd12STony Lindgren .user = OCP_USER_MPU, 9854d38bd12STony Lindgren }; 9864d38bd12STony Lindgren 9874d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = { 9884d38bd12STony Lindgren .name = "emac1", 9894d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 9904d38bd12STony Lindgren .main_clk = "sysclk24_ck", 9914d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 9924d38bd12STony Lindgren .prcm = { 9934d38bd12STony Lindgren .omap4 = { 9944d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL, 9954d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 9964d38bd12STony Lindgren }, 9974d38bd12STony Lindgren }, 9984d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 9994d38bd12STony Lindgren }; 10004d38bd12STony Lindgren 10014d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = { 10027e1b11d1STony Lindgren .master = &dm81xx_l4_hs_hwmod, 10034d38bd12STony Lindgren .slave = &dm816x_emac1_hwmod, 10044d38bd12STony Lindgren .clk = "sysclk5_ck", 10054d38bd12STony Lindgren .user = OCP_USER_MPU, 10064d38bd12STony Lindgren }; 10074d38bd12STony Lindgren 100849e9e616SKevin Hilman static struct omap_hwmod_class_sysconfig dm81xx_sata_sysc = { 1009103fd8e7STony Lindgren .rev_offs = 0x00fc, 101049e9e616SKevin Hilman .sysc_offs = 0x1100, 101149e9e616SKevin Hilman .sysc_flags = SYSC_HAS_SIDLEMODE, 101249e9e616SKevin Hilman .idlemodes = SIDLE_FORCE, 101349e9e616SKevin Hilman .sysc_fields = &omap_hwmod_sysc_type3, 101449e9e616SKevin Hilman }; 101549e9e616SKevin Hilman 101649e9e616SKevin Hilman static struct omap_hwmod_class dm81xx_sata_hwmod_class = { 101749e9e616SKevin Hilman .name = "sata", 101849e9e616SKevin Hilman .sysc = &dm81xx_sata_sysc, 101949e9e616SKevin Hilman }; 102049e9e616SKevin Hilman 102149e9e616SKevin Hilman static struct omap_hwmod dm81xx_sata_hwmod = { 102249e9e616SKevin Hilman .name = "sata", 102371d50393STero Kristo .clkdm_name = "default_clkdm", 102449e9e616SKevin Hilman .flags = HWMOD_NO_IDLEST, 102549e9e616SKevin Hilman .prcm = { 102649e9e616SKevin Hilman .omap4 = { 102749e9e616SKevin Hilman .clkctrl_offs = DM81XX_CM_DEFAULT_SATA_CLKCTRL, 102849e9e616SKevin Hilman .modulemode = MODULEMODE_SWCTRL, 102949e9e616SKevin Hilman }, 103049e9e616SKevin Hilman }, 103149e9e616SKevin Hilman .class = &dm81xx_sata_hwmod_class, 103249e9e616SKevin Hilman }; 103349e9e616SKevin Hilman 103449e9e616SKevin Hilman static struct omap_hwmod_ocp_if dm81xx_l4_hs__sata = { 103549e9e616SKevin Hilman .master = &dm81xx_l4_hs_hwmod, 103649e9e616SKevin Hilman .slave = &dm81xx_sata_hwmod, 103749e9e616SKevin Hilman .clk = "sysclk5_ck", 103849e9e616SKevin Hilman .user = OCP_USER_MPU, 103949e9e616SKevin Hilman }; 104049e9e616SKevin Hilman 1041c757fda8STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = { 10424d38bd12STony Lindgren .rev_offs = 0x0, 10434d38bd12STony Lindgren .sysc_offs = 0x110, 10444d38bd12STony Lindgren .syss_offs = 0x114, 10454d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 10464d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 10474d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 10484d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 10494d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 10504d38bd12STony Lindgren }; 10514d38bd12STony Lindgren 1052c757fda8STony Lindgren static struct omap_hwmod_class dm81xx_mmc_class = { 10534d38bd12STony Lindgren .name = "mmc", 1054c757fda8STony Lindgren .sysc = &dm81xx_mmc_sysc, 10554d38bd12STony Lindgren }; 10564d38bd12STony Lindgren 1057c757fda8STony Lindgren static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = { 10584d38bd12STony Lindgren { .role = "dbck", .clk = "sysclk18_ck", }, 10594d38bd12STony Lindgren }; 10604d38bd12STony Lindgren 1061c757fda8STony Lindgren static struct omap_hsmmc_dev_attr mmc_dev_attr = { 1062c757fda8STony Lindgren }; 1063c757fda8STony Lindgren 1064c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc1_hwmod = { 1065c757fda8STony Lindgren .name = "mmc1", 1066c757fda8STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1067c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1068c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1069c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1070c757fda8STony Lindgren .prcm = { 1071c757fda8STony Lindgren .omap4 = { 1072c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL, 1073c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1074c757fda8STony Lindgren }, 1075c757fda8STony Lindgren }, 1076c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1077c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1078c757fda8STony Lindgren }; 1079c757fda8STony Lindgren 1080c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = { 1081c757fda8STony Lindgren .master = &dm81xx_l4_ls_hwmod, 1082c757fda8STony Lindgren .slave = &dm814x_mmc1_hwmod, 1083c757fda8STony Lindgren .clk = "sysclk6_ck", 1084c757fda8STony Lindgren .user = OCP_USER_MPU, 1085c757fda8STony Lindgren .flags = OMAP_FIREWALL_L4 1086c757fda8STony Lindgren }; 1087c757fda8STony Lindgren 1088c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc2_hwmod = { 1089c757fda8STony Lindgren .name = "mmc2", 1090c757fda8STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1091c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1092c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1093c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1094c757fda8STony Lindgren .prcm = { 1095c757fda8STony Lindgren .omap4 = { 1096c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL, 1097c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1098c757fda8STony Lindgren }, 1099c757fda8STony Lindgren }, 1100c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1101c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1102c757fda8STony Lindgren }; 1103c757fda8STony Lindgren 1104c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = { 1105c757fda8STony Lindgren .master = &dm81xx_l4_ls_hwmod, 1106c757fda8STony Lindgren .slave = &dm814x_mmc2_hwmod, 1107c757fda8STony Lindgren .clk = "sysclk6_ck", 1108c757fda8STony Lindgren .user = OCP_USER_MPU, 1109c757fda8STony Lindgren .flags = OMAP_FIREWALL_L4 1110c757fda8STony Lindgren }; 1111c757fda8STony Lindgren 1112c757fda8STony Lindgren static struct omap_hwmod dm814x_mmc3_hwmod = { 1113c757fda8STony Lindgren .name = "mmc3", 1114c757fda8STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 1115c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1116c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 1117c757fda8STony Lindgren .main_clk = "sysclk8_ck", 1118c757fda8STony Lindgren .prcm = { 1119c757fda8STony Lindgren .omap4 = { 1120c757fda8STony Lindgren .clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL, 1121c757fda8STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1122c757fda8STony Lindgren }, 1123c757fda8STony Lindgren }, 1124c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1125c757fda8STony Lindgren .class = &dm81xx_mmc_class, 1126c757fda8STony Lindgren }; 1127c757fda8STony Lindgren 1128c757fda8STony Lindgren static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = { 1129c757fda8STony Lindgren .master = &dm81xx_alwon_l3_med_hwmod, 1130c757fda8STony Lindgren .slave = &dm814x_mmc3_hwmod, 1131c757fda8STony Lindgren .clk = "sysclk4_ck", 1132c757fda8STony Lindgren .user = OCP_USER_MPU, 11334d38bd12STony Lindgren }; 11344d38bd12STony Lindgren 11354d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = { 11364d38bd12STony Lindgren .name = "mmc1", 11374d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1138c757fda8STony Lindgren .opt_clks = dm81xx_mmc_opt_clks, 1139c757fda8STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks), 11404d38bd12STony Lindgren .main_clk = "sysclk10_ck", 11414d38bd12STony Lindgren .prcm = { 11424d38bd12STony Lindgren .omap4 = { 11434d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL, 11444d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 11454d38bd12STony Lindgren }, 11464d38bd12STony Lindgren }, 1147c757fda8STony Lindgren .dev_attr = &mmc_dev_attr, 1148c757fda8STony Lindgren .class = &dm81xx_mmc_class, 11494d38bd12STony Lindgren }; 11504d38bd12STony Lindgren 11514d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = { 11527e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 11534d38bd12STony Lindgren .slave = &dm816x_mmc1_hwmod, 11544d38bd12STony Lindgren .clk = "sysclk6_ck", 11554d38bd12STony Lindgren .user = OCP_USER_MPU, 11564d38bd12STony Lindgren .flags = OMAP_FIREWALL_L4 11574d38bd12STony Lindgren }; 11584d38bd12STony Lindgren 11594d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = { 11604d38bd12STony Lindgren .rev_offs = 0x0, 11614d38bd12STony Lindgren .sysc_offs = 0x110, 11624d38bd12STony Lindgren .syss_offs = 0x114, 11634d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 11644d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 11654d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 11664d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 11674d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 11684d38bd12STony Lindgren }; 11694d38bd12STony Lindgren 11704d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = { 11714d38bd12STony Lindgren .name = "mcspi", 11724d38bd12STony Lindgren .sysc = &dm816x_mcspi_sysc, 11734d38bd12STony Lindgren }; 11744d38bd12STony Lindgren 11757e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mcspi1_hwmod = { 11764d38bd12STony Lindgren .name = "mcspi1", 11774d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 11784d38bd12STony Lindgren .main_clk = "sysclk10_ck", 11794d38bd12STony Lindgren .prcm = { 11804d38bd12STony Lindgren .omap4 = { 11817e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL, 11824d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 11834d38bd12STony Lindgren }, 11844d38bd12STony Lindgren }, 11854d38bd12STony Lindgren .class = &dm816x_mcspi_class, 11864d38bd12STony Lindgren }; 11874d38bd12STony Lindgren 1188*d27cda29SGraeme Smecher static struct omap_hwmod dm81xx_mcspi2_hwmod = { 1189*d27cda29SGraeme Smecher .name = "mcspi2", 1190*d27cda29SGraeme Smecher .clkdm_name = "alwon_l3s_clkdm", 1191*d27cda29SGraeme Smecher .main_clk = "sysclk10_ck", 1192*d27cda29SGraeme Smecher .prcm = { 1193*d27cda29SGraeme Smecher .omap4 = { 1194*d27cda29SGraeme Smecher .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL, 1195*d27cda29SGraeme Smecher .modulemode = MODULEMODE_SWCTRL, 1196*d27cda29SGraeme Smecher }, 1197*d27cda29SGraeme Smecher }, 1198*d27cda29SGraeme Smecher .class = &dm816x_mcspi_class, 1199*d27cda29SGraeme Smecher }; 1200*d27cda29SGraeme Smecher 1201*d27cda29SGraeme Smecher static struct omap_hwmod dm81xx_mcspi3_hwmod = { 1202*d27cda29SGraeme Smecher .name = "mcspi3", 1203*d27cda29SGraeme Smecher .clkdm_name = "alwon_l3s_clkdm", 1204*d27cda29SGraeme Smecher .main_clk = "sysclk10_ck", 1205*d27cda29SGraeme Smecher .prcm = { 1206*d27cda29SGraeme Smecher .omap4 = { 1207*d27cda29SGraeme Smecher .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL, 1208*d27cda29SGraeme Smecher .modulemode = MODULEMODE_SWCTRL, 1209*d27cda29SGraeme Smecher }, 1210*d27cda29SGraeme Smecher }, 1211*d27cda29SGraeme Smecher .class = &dm816x_mcspi_class, 1212*d27cda29SGraeme Smecher }; 1213*d27cda29SGraeme Smecher 1214*d27cda29SGraeme Smecher static struct omap_hwmod dm81xx_mcspi4_hwmod = { 1215*d27cda29SGraeme Smecher .name = "mcspi4", 1216*d27cda29SGraeme Smecher .clkdm_name = "alwon_l3s_clkdm", 1217*d27cda29SGraeme Smecher .main_clk = "sysclk10_ck", 1218*d27cda29SGraeme Smecher .prcm = { 1219*d27cda29SGraeme Smecher .omap4 = { 1220*d27cda29SGraeme Smecher .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL, 1221*d27cda29SGraeme Smecher .modulemode = MODULEMODE_SWCTRL, 1222*d27cda29SGraeme Smecher }, 1223*d27cda29SGraeme Smecher }, 1224*d27cda29SGraeme Smecher .class = &dm816x_mcspi_class, 1225*d27cda29SGraeme Smecher }; 1226*d27cda29SGraeme Smecher 12277e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = { 12287e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 12297e1b11d1STony Lindgren .slave = &dm81xx_mcspi1_hwmod, 12304d38bd12STony Lindgren .clk = "sysclk6_ck", 12314d38bd12STony Lindgren .user = OCP_USER_MPU, 12324d38bd12STony Lindgren }; 12334d38bd12STony Lindgren 1234*d27cda29SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi2 = { 1235*d27cda29SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 1236*d27cda29SGraeme Smecher .slave = &dm81xx_mcspi2_hwmod, 1237*d27cda29SGraeme Smecher .clk = "sysclk6_ck", 1238*d27cda29SGraeme Smecher .user = OCP_USER_MPU, 1239*d27cda29SGraeme Smecher }; 1240*d27cda29SGraeme Smecher 1241*d27cda29SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi3 = { 1242*d27cda29SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 1243*d27cda29SGraeme Smecher .slave = &dm81xx_mcspi3_hwmod, 1244*d27cda29SGraeme Smecher .clk = "sysclk6_ck", 1245*d27cda29SGraeme Smecher .user = OCP_USER_MPU, 1246*d27cda29SGraeme Smecher }; 1247*d27cda29SGraeme Smecher 1248*d27cda29SGraeme Smecher static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi4 = { 1249*d27cda29SGraeme Smecher .master = &dm81xx_l4_ls_hwmod, 1250*d27cda29SGraeme Smecher .slave = &dm81xx_mcspi4_hwmod, 1251*d27cda29SGraeme Smecher .clk = "sysclk6_ck", 1252*d27cda29SGraeme Smecher .user = OCP_USER_MPU, 1253*d27cda29SGraeme Smecher }; 1254*d27cda29SGraeme Smecher 12557e1b11d1STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = { 12564d38bd12STony Lindgren .rev_offs = 0x000, 12574d38bd12STony Lindgren .sysc_offs = 0x010, 12584d38bd12STony Lindgren .syss_offs = 0x014, 12594d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 12604d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, 12614d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 12624d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 12634d38bd12STony Lindgren }; 12644d38bd12STony Lindgren 12657e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = { 12664d38bd12STony Lindgren .name = "mailbox", 12677e1b11d1STony Lindgren .sysc = &dm81xx_mailbox_sysc, 12684d38bd12STony Lindgren }; 12694d38bd12STony Lindgren 12707e1b11d1STony Lindgren static struct omap_hwmod dm81xx_mailbox_hwmod = { 12714d38bd12STony Lindgren .name = "mailbox", 12724d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 12737e1b11d1STony Lindgren .class = &dm81xx_mailbox_hwmod_class, 12744d38bd12STony Lindgren .main_clk = "sysclk6_ck", 12754d38bd12STony Lindgren .prcm = { 12764d38bd12STony Lindgren .omap4 = { 12777e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL, 12784d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 12794d38bd12STony Lindgren }, 12804d38bd12STony Lindgren }, 12814d38bd12STony Lindgren }; 12824d38bd12STony Lindgren 12837e1b11d1STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = { 12847e1b11d1STony Lindgren .master = &dm81xx_l4_ls_hwmod, 12857e1b11d1STony Lindgren .slave = &dm81xx_mailbox_hwmod, 12864f5395f0STony Lindgren .clk = "sysclk6_ck", 12874d38bd12STony Lindgren .user = OCP_USER_MPU, 12884d38bd12STony Lindgren }; 12894d38bd12STony Lindgren 12901539569bSNeil Armstrong static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = { 12911539569bSNeil Armstrong .rev_offs = 0x000, 12921539569bSNeil Armstrong .sysc_offs = 0x010, 12931539569bSNeil Armstrong .syss_offs = 0x014, 12941539569bSNeil Armstrong .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 12951539569bSNeil Armstrong SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, 12961539569bSNeil Armstrong .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 12971539569bSNeil Armstrong .sysc_fields = &omap_hwmod_sysc_type1, 12981539569bSNeil Armstrong }; 12991539569bSNeil Armstrong 13001539569bSNeil Armstrong static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = { 13011539569bSNeil Armstrong .name = "spinbox", 13021539569bSNeil Armstrong .sysc = &dm81xx_spinbox_sysc, 13031539569bSNeil Armstrong }; 13041539569bSNeil Armstrong 13051539569bSNeil Armstrong static struct omap_hwmod dm81xx_spinbox_hwmod = { 13061539569bSNeil Armstrong .name = "spinbox", 13071539569bSNeil Armstrong .clkdm_name = "alwon_l3s_clkdm", 13081539569bSNeil Armstrong .class = &dm81xx_spinbox_hwmod_class, 13091539569bSNeil Armstrong .main_clk = "sysclk6_ck", 13101539569bSNeil Armstrong .prcm = { 13111539569bSNeil Armstrong .omap4 = { 13121539569bSNeil Armstrong .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL, 13131539569bSNeil Armstrong .modulemode = MODULEMODE_SWCTRL, 13141539569bSNeil Armstrong }, 13151539569bSNeil Armstrong }, 13161539569bSNeil Armstrong }; 13171539569bSNeil Armstrong 13181539569bSNeil Armstrong static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = { 13191539569bSNeil Armstrong .master = &dm81xx_l4_ls_hwmod, 13201539569bSNeil Armstrong .slave = &dm81xx_spinbox_hwmod, 13214f5395f0STony Lindgren .clk = "sysclk6_ck", 13221539569bSNeil Armstrong .user = OCP_USER_MPU, 13231539569bSNeil Armstrong }; 13241539569bSNeil Armstrong 13257e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = { 13264d38bd12STony Lindgren .name = "tpcc", 13274d38bd12STony Lindgren }; 13284d38bd12STony Lindgren 132924da741cSTony Lindgren static struct omap_hwmod dm81xx_tpcc_hwmod = { 13304d38bd12STony Lindgren .name = "tpcc", 13317e1b11d1STony Lindgren .class = &dm81xx_tpcc_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_TPCC_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__tpcc = { 13437e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13447e1b11d1STony Lindgren .slave = &dm81xx_tpcc_hwmod, 13454d38bd12STony Lindgren .clk = "sysclk4_ck", 13464d38bd12STony Lindgren .user = OCP_USER_MPU, 13474d38bd12STony Lindgren }; 13484d38bd12STony Lindgren 13497e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = { 13504d38bd12STony Lindgren .name = "tptc0", 13514d38bd12STony Lindgren }; 13524d38bd12STony Lindgren 135324da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc0_hwmod = { 13544d38bd12STony Lindgren .name = "tptc0", 13557e1b11d1STony Lindgren .class = &dm81xx_tptc0_hwmod_class, 13564d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 13574d38bd12STony Lindgren .main_clk = "sysclk4_ck", 13584d38bd12STony Lindgren .prcm = { 13594d38bd12STony Lindgren .omap4 = { 13607e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC0_CLKCTRL, 13614d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 13624d38bd12STony Lindgren }, 13634d38bd12STony Lindgren }, 13644d38bd12STony Lindgren }; 13654d38bd12STony Lindgren 136624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = { 13677e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13687e1b11d1STony Lindgren .slave = &dm81xx_tptc0_hwmod, 13694d38bd12STony Lindgren .clk = "sysclk4_ck", 13704d38bd12STony Lindgren .user = OCP_USER_MPU, 13714d38bd12STony Lindgren }; 13724d38bd12STony Lindgren 137324da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = { 13747e1b11d1STony Lindgren .master = &dm81xx_tptc0_hwmod, 13757e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 13764d38bd12STony Lindgren .clk = "sysclk4_ck", 13774d38bd12STony Lindgren .user = OCP_USER_MPU, 13784d38bd12STony Lindgren }; 13794d38bd12STony Lindgren 13807e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = { 13814d38bd12STony Lindgren .name = "tptc1", 13824d38bd12STony Lindgren }; 13834d38bd12STony Lindgren 138424da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc1_hwmod = { 13854d38bd12STony Lindgren .name = "tptc1", 13867e1b11d1STony Lindgren .class = &dm81xx_tptc1_hwmod_class, 13874d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 13884d38bd12STony Lindgren .main_clk = "sysclk4_ck", 13894d38bd12STony Lindgren .prcm = { 13904d38bd12STony Lindgren .omap4 = { 13917e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC1_CLKCTRL, 13924d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 13934d38bd12STony Lindgren }, 13944d38bd12STony Lindgren }, 13954d38bd12STony Lindgren }; 13964d38bd12STony Lindgren 139724da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = { 13987e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 13997e1b11d1STony Lindgren .slave = &dm81xx_tptc1_hwmod, 14004d38bd12STony Lindgren .clk = "sysclk4_ck", 14014d38bd12STony Lindgren .user = OCP_USER_MPU, 14024d38bd12STony Lindgren }; 14034d38bd12STony Lindgren 140424da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = { 14057e1b11d1STony Lindgren .master = &dm81xx_tptc1_hwmod, 14067e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 14074d38bd12STony Lindgren .clk = "sysclk4_ck", 14084d38bd12STony Lindgren .user = OCP_USER_MPU, 14094d38bd12STony Lindgren }; 14104d38bd12STony Lindgren 14117e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = { 14124d38bd12STony Lindgren .name = "tptc2", 14134d38bd12STony Lindgren }; 14144d38bd12STony Lindgren 141524da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc2_hwmod = { 14164d38bd12STony Lindgren .name = "tptc2", 14177e1b11d1STony Lindgren .class = &dm81xx_tptc2_hwmod_class, 14184d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 14194d38bd12STony Lindgren .main_clk = "sysclk4_ck", 14204d38bd12STony Lindgren .prcm = { 14214d38bd12STony Lindgren .omap4 = { 14227e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC2_CLKCTRL, 14234d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 14244d38bd12STony Lindgren }, 14254d38bd12STony Lindgren }, 14264d38bd12STony Lindgren }; 14274d38bd12STony Lindgren 142824da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = { 14297e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 14307e1b11d1STony Lindgren .slave = &dm81xx_tptc2_hwmod, 14314d38bd12STony Lindgren .clk = "sysclk4_ck", 14324d38bd12STony Lindgren .user = OCP_USER_MPU, 14334d38bd12STony Lindgren }; 14344d38bd12STony Lindgren 143524da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = { 14367e1b11d1STony Lindgren .master = &dm81xx_tptc2_hwmod, 14377e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 14384d38bd12STony Lindgren .clk = "sysclk4_ck", 14394d38bd12STony Lindgren .user = OCP_USER_MPU, 14404d38bd12STony Lindgren }; 14414d38bd12STony Lindgren 14427e1b11d1STony Lindgren static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = { 14434d38bd12STony Lindgren .name = "tptc3", 14444d38bd12STony Lindgren }; 14454d38bd12STony Lindgren 144624da741cSTony Lindgren static struct omap_hwmod dm81xx_tptc3_hwmod = { 14474d38bd12STony Lindgren .name = "tptc3", 14487e1b11d1STony Lindgren .class = &dm81xx_tptc3_hwmod_class, 14494d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 14504d38bd12STony Lindgren .main_clk = "sysclk4_ck", 14514d38bd12STony Lindgren .prcm = { 14524d38bd12STony Lindgren .omap4 = { 14537e1b11d1STony Lindgren .clkctrl_offs = DM81XX_CM_ALWON_TPTC3_CLKCTRL, 14544d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 14554d38bd12STony Lindgren }, 14564d38bd12STony Lindgren }, 14574d38bd12STony Lindgren }; 14584d38bd12STony Lindgren 145924da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = { 14607e1b11d1STony Lindgren .master = &dm81xx_alwon_l3_fast_hwmod, 14617e1b11d1STony Lindgren .slave = &dm81xx_tptc3_hwmod, 14624d38bd12STony Lindgren .clk = "sysclk4_ck", 14634d38bd12STony Lindgren .user = OCP_USER_MPU, 14644d38bd12STony Lindgren }; 14654d38bd12STony Lindgren 146624da741cSTony Lindgren static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = { 14677e1b11d1STony Lindgren .master = &dm81xx_tptc3_hwmod, 14687e1b11d1STony Lindgren .slave = &dm81xx_alwon_l3_fast_hwmod, 14694d38bd12STony Lindgren .clk = "sysclk4_ck", 14704d38bd12STony Lindgren .user = OCP_USER_MPU, 14714d38bd12STony Lindgren }; 14724d38bd12STony Lindgren 14730f3ccb24STony Lindgren /* 14740f3ccb24STony Lindgren * REVISIT: Test and enable the following once clocks work: 14750f3ccb24STony Lindgren * dm81xx_l4_ls__mailbox 14760f3ccb24STony Lindgren * 14770f3ccb24STony Lindgren * Also note that some devices share a single clkctrl_offs.. 14780f3ccb24STony Lindgren * For example, i2c1 and 3 share one, and i2c2 and 4 share one. 14790f3ccb24STony Lindgren */ 14800f3ccb24STony Lindgren static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = { 14810f3ccb24STony Lindgren &dm814x_mpu__alwon_l3_slow, 14820f3ccb24STony Lindgren &dm814x_mpu__alwon_l3_med, 14830f3ccb24STony Lindgren &dm81xx_alwon_l3_slow__l4_ls, 14840f3ccb24STony Lindgren &dm81xx_alwon_l3_slow__l4_hs, 14850f3ccb24STony Lindgren &dm81xx_l4_ls__uart1, 14860f3ccb24STony Lindgren &dm81xx_l4_ls__uart2, 14870f3ccb24STony Lindgren &dm81xx_l4_ls__uart3, 14880f3ccb24STony Lindgren &dm81xx_l4_ls__wd_timer1, 14890f3ccb24STony Lindgren &dm81xx_l4_ls__i2c1, 14900f3ccb24STony Lindgren &dm81xx_l4_ls__i2c2, 14913022b29dSTony Lindgren &dm81xx_l4_ls__gpio1, 14923022b29dSTony Lindgren &dm81xx_l4_ls__gpio2, 1493*d27cda29SGraeme Smecher &dm81xx_l4_ls__gpio3, 1494*d27cda29SGraeme Smecher &dm81xx_l4_ls__gpio4, 14950f3ccb24STony Lindgren &dm81xx_l4_ls__elm, 14960f3ccb24STony Lindgren &dm81xx_l4_ls__mcspi1, 1497*d27cda29SGraeme Smecher &dm81xx_l4_ls__mcspi2, 1498*d27cda29SGraeme Smecher &dm81xx_l4_ls__mcspi3, 1499*d27cda29SGraeme Smecher &dm81xx_l4_ls__mcspi4, 1500c757fda8STony Lindgren &dm814x_l4_ls__mmc1, 1501c757fda8STony Lindgren &dm814x_l4_ls__mmc2, 1502c5803246STony Lindgren &ti81xx_l4_ls__rtc, 15030f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tpcc, 15040f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc0, 15050f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc1, 15060f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc2, 15070f3ccb24STony Lindgren &dm81xx_alwon_l3_fast__tptc3, 15080f3ccb24STony Lindgren &dm81xx_tptc0__alwon_l3_fast, 15090f3ccb24STony Lindgren &dm81xx_tptc1__alwon_l3_fast, 15100f3ccb24STony Lindgren &dm81xx_tptc2__alwon_l3_fast, 15110f3ccb24STony Lindgren &dm81xx_tptc3__alwon_l3_fast, 15120f3ccb24STony Lindgren &dm814x_l4_ls__timer1, 15130f3ccb24STony Lindgren &dm814x_l4_ls__timer2, 15140f3ccb24STony Lindgren &dm814x_l4_hs__cpgmac0, 15150f3ccb24STony Lindgren &dm814x_cpgmac0__mdio, 1516f53850b5STony Lindgren &dm81xx_alwon_l3_slow__gpmc, 1517f53850b5STony Lindgren &dm814x_default_l3_slow__usbss, 1518c757fda8STony Lindgren &dm814x_alwon_l3_med__mmc3, 15190f3ccb24STony Lindgren NULL, 15200f3ccb24STony Lindgren }; 15210f3ccb24STony Lindgren 15220f3ccb24STony Lindgren int __init dm814x_hwmod_init(void) 15230f3ccb24STony Lindgren { 15240f3ccb24STony Lindgren omap_hwmod_init(); 15250f3ccb24STony Lindgren return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs); 15260f3ccb24STony Lindgren } 15270f3ccb24STony Lindgren 15284d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = { 15294d38bd12STony Lindgren &dm816x_mpu__alwon_l3_slow, 15304d38bd12STony Lindgren &dm816x_mpu__alwon_l3_med, 15317e1b11d1STony Lindgren &dm81xx_alwon_l3_slow__l4_ls, 15327e1b11d1STony Lindgren &dm81xx_alwon_l3_slow__l4_hs, 15337e1b11d1STony Lindgren &dm81xx_l4_ls__uart1, 15347e1b11d1STony Lindgren &dm81xx_l4_ls__uart2, 15357e1b11d1STony Lindgren &dm81xx_l4_ls__uart3, 15367e1b11d1STony Lindgren &dm81xx_l4_ls__wd_timer1, 15377e1b11d1STony Lindgren &dm81xx_l4_ls__i2c1, 15387e1b11d1STony Lindgren &dm81xx_l4_ls__i2c2, 15394d38bd12STony Lindgren &dm81xx_l4_ls__gpio1, 15404d38bd12STony Lindgren &dm81xx_l4_ls__gpio2, 15414d38bd12STony Lindgren &dm81xx_l4_ls__elm, 1542c5803246STony Lindgren &ti81xx_l4_ls__rtc, 15434d38bd12STony Lindgren &dm816x_l4_ls__mmc1, 15444d38bd12STony Lindgren &dm816x_l4_ls__timer1, 15454d38bd12STony Lindgren &dm816x_l4_ls__timer2, 15464d38bd12STony Lindgren &dm816x_l4_ls__timer3, 15474d38bd12STony Lindgren &dm816x_l4_ls__timer4, 15484d38bd12STony Lindgren &dm816x_l4_ls__timer5, 15494d38bd12STony Lindgren &dm816x_l4_ls__timer6, 15504d38bd12STony Lindgren &dm816x_l4_ls__timer7, 15517e1b11d1STony Lindgren &dm81xx_l4_ls__mcspi1, 15527e1b11d1STony Lindgren &dm81xx_l4_ls__mailbox, 15531539569bSNeil Armstrong &dm81xx_l4_ls__spinbox, 15547e1b11d1STony Lindgren &dm81xx_l4_hs__emac0, 15557e1b11d1STony Lindgren &dm81xx_emac0__mdio, 15564d38bd12STony Lindgren &dm816x_l4_hs__emac1, 155749e9e616SKevin Hilman &dm81xx_l4_hs__sata, 15587e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tpcc, 15597e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc0, 15607e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc1, 15617e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc2, 15627e1b11d1STony Lindgren &dm81xx_alwon_l3_fast__tptc3, 15637e1b11d1STony Lindgren &dm81xx_tptc0__alwon_l3_fast, 15647e1b11d1STony Lindgren &dm81xx_tptc1__alwon_l3_fast, 15657e1b11d1STony Lindgren &dm81xx_tptc2__alwon_l3_fast, 15667e1b11d1STony Lindgren &dm81xx_tptc3__alwon_l3_fast, 15674d38bd12STony Lindgren &dm81xx_alwon_l3_slow__gpmc, 1568f53850b5STony Lindgren &dm816x_default_l3_slow__usbss, 15694d38bd12STony Lindgren NULL, 15704d38bd12STony Lindgren }; 15714d38bd12STony Lindgren 15720f3ccb24STony Lindgren int __init dm816x_hwmod_init(void) 15734d38bd12STony Lindgren { 15744d38bd12STony Lindgren omap_hwmod_init(); 15754d38bd12STony Lindgren return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs); 15764d38bd12STony Lindgren } 1577