1*4d38bd12STony Lindgren /* 2*4d38bd12STony Lindgren * DM81xx hwmod data. 3*4d38bd12STony Lindgren * 4*4d38bd12STony Lindgren * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ 5*4d38bd12STony Lindgren * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/ 6*4d38bd12STony Lindgren * 7*4d38bd12STony Lindgren * This program is free software; you can redistribute it and/or 8*4d38bd12STony Lindgren * modify it under the terms of the GNU General Public License as 9*4d38bd12STony Lindgren * published by the Free Software Foundation version 2. 10*4d38bd12STony Lindgren * 11*4d38bd12STony Lindgren * This program is distributed "as is" WITHOUT ANY WARRANTY of any 12*4d38bd12STony Lindgren * kind, whether express or implied; without even the implied warranty 13*4d38bd12STony Lindgren * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*4d38bd12STony Lindgren * GNU General Public License for more details. 15*4d38bd12STony Lindgren * 16*4d38bd12STony Lindgren */ 17*4d38bd12STony Lindgren 18*4d38bd12STony Lindgren #include <linux/platform_data/gpio-omap.h> 19*4d38bd12STony Lindgren #include <linux/platform_data/hsmmc-omap.h> 20*4d38bd12STony Lindgren #include <linux/platform_data/spi-omap2-mcspi.h> 21*4d38bd12STony Lindgren #include <plat/dmtimer.h> 22*4d38bd12STony Lindgren 23*4d38bd12STony Lindgren #include "omap_hwmod_common_data.h" 24*4d38bd12STony Lindgren #include "cm81xx.h" 25*4d38bd12STony Lindgren #include "ti81xx.h" 26*4d38bd12STony Lindgren #include "wd_timer.h" 27*4d38bd12STony Lindgren 28*4d38bd12STony Lindgren /* 29*4d38bd12STony Lindgren * DM816X hardware modules integration data 30*4d38bd12STony Lindgren * 31*4d38bd12STony Lindgren * Note: This is incomplete and at present, not generated from h/w database. 32*4d38bd12STony Lindgren */ 33*4d38bd12STony Lindgren 34*4d38bd12STony Lindgren /* 35*4d38bd12STony Lindgren * The alwon .clkctrl_offs field is offset from the CM_ALWON, that's 36*4d38bd12STony Lindgren * TRM 18.7.17 CM_ALWON device register values minus 0x1400. 37*4d38bd12STony Lindgren */ 38*4d38bd12STony Lindgren #define DM816X_DM_ALWON_BASE 0x1400 39*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP0_CLKCTRL (0x1540 - DM816X_DM_ALWON_BASE) 40*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP1_CLKCTRL (0x1544 - DM816X_DM_ALWON_BASE) 41*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MCASP2_CLKCTRL (0x1548 - DM816X_DM_ALWON_BASE) 42*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MCBSP_CLKCTRL (0x154c - DM816X_DM_ALWON_BASE) 43*4d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_0_CLKCTRL (0x1550 - DM816X_DM_ALWON_BASE) 44*4d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_1_CLKCTRL (0x1554 - DM816X_DM_ALWON_BASE) 45*4d38bd12STony Lindgren #define DM816X_CM_ALWON_UART_2_CLKCTRL (0x1558 - DM816X_DM_ALWON_BASE) 46*4d38bd12STony Lindgren #define DM816X_CM_ALWON_GPIO_0_CLKCTRL (0x155c - DM816X_DM_ALWON_BASE) 47*4d38bd12STony Lindgren #define DM816X_CM_ALWON_GPIO_1_CLKCTRL (0x1560 - DM816X_DM_ALWON_BASE) 48*4d38bd12STony Lindgren #define DM816X_CM_ALWON_I2C_0_CLKCTRL (0x1564 - DM816X_DM_ALWON_BASE) 49*4d38bd12STony Lindgren #define DM816X_CM_ALWON_I2C_1_CLKCTRL (0x1568 - DM816X_DM_ALWON_BASE) 50*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE) 51*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE) 52*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE) 53*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE) 54*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE) 55*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE) 56*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE) 57*4d38bd12STony Lindgren #define DM816X_CM_ALWON_WDTIMER_CLKCTRL (0x158c - DM816X_DM_ALWON_BASE) 58*4d38bd12STony Lindgren #define DM816X_CM_ALWON_SPI_CLKCTRL (0x1590 - DM816X_DM_ALWON_BASE) 59*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MAILBOX_CLKCTRL (0x1594 - DM816X_DM_ALWON_BASE) 60*4d38bd12STony Lindgren #define DM816X_CM_ALWON_SPINBOX_CLKCTRL (0x1598 - DM816X_DM_ALWON_BASE) 61*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MMUDATA_CLKCTRL (0x159c - DM816X_DM_ALWON_BASE) 62*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MMUCFG_CLKCTRL (0x15a8 - DM816X_DM_ALWON_BASE) 63*4d38bd12STony Lindgren #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE) 64*4d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE) 65*4d38bd12STony Lindgren #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE) 66*4d38bd12STony Lindgren #define DM816X_CM_ALWON_CONTRL_CLKCTRL (0x15c4 - DM816X_DM_ALWON_BASE) 67*4d38bd12STony Lindgren #define DM816X_CM_ALWON_GPMC_CLKCTRL (0x15d0 - DM816X_DM_ALWON_BASE) 68*4d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_0_CLKCTRL (0x15d4 - DM816X_DM_ALWON_BASE) 69*4d38bd12STony Lindgren #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE) 70*4d38bd12STony Lindgren #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE) 71*4d38bd12STony Lindgren #define DM816X_CM_ALWON_L3_CLKCTRL (0x15e4 - DM816X_DM_ALWON_BASE) 72*4d38bd12STony Lindgren #define DM816X_CM_ALWON_L4HS_CLKCTRL (0x15e8 - DM816X_DM_ALWON_BASE) 73*4d38bd12STony Lindgren #define DM816X_CM_ALWON_L4LS_CLKCTRL (0x15ec - DM816X_DM_ALWON_BASE) 74*4d38bd12STony Lindgren #define DM816X_CM_ALWON_RTC_CLKCTRL (0x15f0 - DM816X_DM_ALWON_BASE) 75*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TPCC_CLKCTRL (0x15f4 - DM816X_DM_ALWON_BASE) 76*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC0_CLKCTRL (0x15f8 - DM816X_DM_ALWON_BASE) 77*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC1_CLKCTRL (0x15fc - DM816X_DM_ALWON_BASE) 78*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC2_CLKCTRL (0x1600 - DM816X_DM_ALWON_BASE) 79*4d38bd12STony Lindgren #define DM816X_CM_ALWON_TPTC3_CLKCTRL (0x1604 - DM816X_DM_ALWON_BASE) 80*4d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE) 81*4d38bd12STony Lindgren #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE) 82*4d38bd12STony Lindgren 83*4d38bd12STony Lindgren /* 84*4d38bd12STony Lindgren * The default .clkctrl_offs field is offset from CM_DEFAULT, that's 85*4d38bd12STony Lindgren * TRM 18.7.6 CM_DEFAULT device register values minus 0x500 86*4d38bd12STony Lindgren */ 87*4d38bd12STony Lindgren #define DM816X_CM_DEFAULT_OFFSET 0x500 88*4d38bd12STony Lindgren #define DM816X_CM_DEFAULT_USB_CLKCTRL (0x558 - DM816X_CM_DEFAULT_OFFSET) 89*4d38bd12STony Lindgren 90*4d38bd12STony Lindgren /* L3 Interconnect entries clocked at 125, 250 and 500MHz */ 91*4d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_slow_hwmod = { 92*4d38bd12STony Lindgren .name = "alwon_l3_slow", 93*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 94*4d38bd12STony Lindgren .class = &l3_hwmod_class, 95*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 96*4d38bd12STony Lindgren }; 97*4d38bd12STony Lindgren 98*4d38bd12STony Lindgren static struct omap_hwmod dm816x_default_l3_slow_hwmod = { 99*4d38bd12STony Lindgren .name = "default_l3_slow", 100*4d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 101*4d38bd12STony Lindgren .class = &l3_hwmod_class, 102*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 103*4d38bd12STony Lindgren }; 104*4d38bd12STony Lindgren 105*4d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_med_hwmod = { 106*4d38bd12STony Lindgren .name = "l3_med", 107*4d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 108*4d38bd12STony Lindgren .class = &l3_hwmod_class, 109*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 110*4d38bd12STony Lindgren }; 111*4d38bd12STony Lindgren 112*4d38bd12STony Lindgren static struct omap_hwmod dm816x_alwon_l3_fast_hwmod = { 113*4d38bd12STony Lindgren .name = "l3_fast", 114*4d38bd12STony Lindgren .clkdm_name = "alwon_l3_fast_clkdm", 115*4d38bd12STony Lindgren .class = &l3_hwmod_class, 116*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 117*4d38bd12STony Lindgren }; 118*4d38bd12STony Lindgren 119*4d38bd12STony Lindgren /* 120*4d38bd12STony Lindgren * L4 standard peripherals, see TRM table 1-12 for devices using this. 121*4d38bd12STony Lindgren * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock. 122*4d38bd12STony Lindgren */ 123*4d38bd12STony Lindgren static struct omap_hwmod dm816x_l4_ls_hwmod = { 124*4d38bd12STony Lindgren .name = "l4_ls", 125*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 126*4d38bd12STony Lindgren .class = &l4_hwmod_class, 127*4d38bd12STony Lindgren }; 128*4d38bd12STony Lindgren 129*4d38bd12STony Lindgren /* 130*4d38bd12STony Lindgren * L4 high-speed peripherals. For devices using this, please see the TRM 131*4d38bd12STony Lindgren * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM 132*4d38bd12STony Lindgren * table 1-73 for devices using 250MHz SYSCLK5 clock. 133*4d38bd12STony Lindgren */ 134*4d38bd12STony Lindgren static struct omap_hwmod dm816x_l4_hs_hwmod = { 135*4d38bd12STony Lindgren .name = "l4_hs", 136*4d38bd12STony Lindgren .clkdm_name = "alwon_l3_med_clkdm", 137*4d38bd12STony Lindgren .class = &l4_hwmod_class, 138*4d38bd12STony Lindgren }; 139*4d38bd12STony Lindgren 140*4d38bd12STony Lindgren /* L3 slow -> L4 ls peripheral interface running at 125MHz */ 141*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_alwon_l3_slow__l4_ls = { 142*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_slow_hwmod, 143*4d38bd12STony Lindgren .slave = &dm816x_l4_ls_hwmod, 144*4d38bd12STony Lindgren .user = OCP_USER_MPU, 145*4d38bd12STony Lindgren }; 146*4d38bd12STony Lindgren 147*4d38bd12STony Lindgren /* L3 med -> L4 fast peripheral interface running at 250MHz */ 148*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_alwon_l3_slow__l4_hs = { 149*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_med_hwmod, 150*4d38bd12STony Lindgren .slave = &dm816x_l4_hs_hwmod, 151*4d38bd12STony Lindgren .user = OCP_USER_MPU, 152*4d38bd12STony Lindgren }; 153*4d38bd12STony Lindgren 154*4d38bd12STony Lindgren /* MPU */ 155*4d38bd12STony Lindgren static struct omap_hwmod dm816x_mpu_hwmod = { 156*4d38bd12STony Lindgren .name = "mpu", 157*4d38bd12STony Lindgren .clkdm_name = "alwon_mpu_clkdm", 158*4d38bd12STony Lindgren .class = &mpu_hwmod_class, 159*4d38bd12STony Lindgren .flags = HWMOD_INIT_NO_IDLE, 160*4d38bd12STony Lindgren .main_clk = "mpu_ck", 161*4d38bd12STony Lindgren .prcm = { 162*4d38bd12STony Lindgren .omap4 = { 163*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL, 164*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 165*4d38bd12STony Lindgren }, 166*4d38bd12STony Lindgren }, 167*4d38bd12STony Lindgren }; 168*4d38bd12STony Lindgren 169*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = { 170*4d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 171*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_slow_hwmod, 172*4d38bd12STony Lindgren .user = OCP_USER_MPU, 173*4d38bd12STony Lindgren }; 174*4d38bd12STony Lindgren 175*4d38bd12STony Lindgren /* L3 med peripheral interface running at 250MHz */ 176*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = { 177*4d38bd12STony Lindgren .master = &dm816x_mpu_hwmod, 178*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_med_hwmod, 179*4d38bd12STony Lindgren .user = OCP_USER_MPU, 180*4d38bd12STony Lindgren }; 181*4d38bd12STony Lindgren 182*4d38bd12STony Lindgren /* UART common */ 183*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig uart_sysc = { 184*4d38bd12STony Lindgren .rev_offs = 0x50, 185*4d38bd12STony Lindgren .sysc_offs = 0x54, 186*4d38bd12STony Lindgren .syss_offs = 0x58, 187*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | 188*4d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | 189*4d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 190*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 191*4d38bd12STony Lindgren MSTANDBY_SMART_WKUP, 192*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 193*4d38bd12STony Lindgren }; 194*4d38bd12STony Lindgren 195*4d38bd12STony Lindgren static struct omap_hwmod_class uart_class = { 196*4d38bd12STony Lindgren .name = "uart", 197*4d38bd12STony Lindgren .sysc = &uart_sysc, 198*4d38bd12STony Lindgren }; 199*4d38bd12STony Lindgren 200*4d38bd12STony Lindgren static struct omap_hwmod dm816x_uart1_hwmod = { 201*4d38bd12STony Lindgren .name = "uart1", 202*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 203*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 204*4d38bd12STony Lindgren .prcm = { 205*4d38bd12STony Lindgren .omap4 = { 206*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_UART_0_CLKCTRL, 207*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 208*4d38bd12STony Lindgren }, 209*4d38bd12STony Lindgren }, 210*4d38bd12STony Lindgren .class = &uart_class, 211*4d38bd12STony Lindgren .flags = DEBUG_TI81XXUART1_FLAGS, 212*4d38bd12STony Lindgren }; 213*4d38bd12STony Lindgren 214*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart1 = { 215*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 216*4d38bd12STony Lindgren .slave = &dm816x_uart1_hwmod, 217*4d38bd12STony Lindgren .clk = "sysclk6_ck", 218*4d38bd12STony Lindgren .user = OCP_USER_MPU, 219*4d38bd12STony Lindgren }; 220*4d38bd12STony Lindgren 221*4d38bd12STony Lindgren static struct omap_hwmod dm816x_uart2_hwmod = { 222*4d38bd12STony Lindgren .name = "uart2", 223*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 224*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 225*4d38bd12STony Lindgren .prcm = { 226*4d38bd12STony Lindgren .omap4 = { 227*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_UART_1_CLKCTRL, 228*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 229*4d38bd12STony Lindgren }, 230*4d38bd12STony Lindgren }, 231*4d38bd12STony Lindgren .class = &uart_class, 232*4d38bd12STony Lindgren .flags = DEBUG_TI81XXUART2_FLAGS, 233*4d38bd12STony Lindgren }; 234*4d38bd12STony Lindgren 235*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart2 = { 236*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 237*4d38bd12STony Lindgren .slave = &dm816x_uart2_hwmod, 238*4d38bd12STony Lindgren .clk = "sysclk6_ck", 239*4d38bd12STony Lindgren .user = OCP_USER_MPU, 240*4d38bd12STony Lindgren }; 241*4d38bd12STony Lindgren 242*4d38bd12STony Lindgren static struct omap_hwmod dm816x_uart3_hwmod = { 243*4d38bd12STony Lindgren .name = "uart3", 244*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 245*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 246*4d38bd12STony Lindgren .prcm = { 247*4d38bd12STony Lindgren .omap4 = { 248*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_UART_2_CLKCTRL, 249*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 250*4d38bd12STony Lindgren }, 251*4d38bd12STony Lindgren }, 252*4d38bd12STony Lindgren .class = &uart_class, 253*4d38bd12STony Lindgren .flags = DEBUG_TI81XXUART3_FLAGS, 254*4d38bd12STony Lindgren }; 255*4d38bd12STony Lindgren 256*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__uart3 = { 257*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 258*4d38bd12STony Lindgren .slave = &dm816x_uart3_hwmod, 259*4d38bd12STony Lindgren .clk = "sysclk6_ck", 260*4d38bd12STony Lindgren .user = OCP_USER_MPU, 261*4d38bd12STony Lindgren }; 262*4d38bd12STony Lindgren 263*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig wd_timer_sysc = { 264*4d38bd12STony Lindgren .rev_offs = 0x0, 265*4d38bd12STony Lindgren .sysc_offs = 0x10, 266*4d38bd12STony Lindgren .syss_offs = 0x14, 267*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | 268*4d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 269*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 270*4d38bd12STony Lindgren }; 271*4d38bd12STony Lindgren 272*4d38bd12STony Lindgren static struct omap_hwmod_class wd_timer_class = { 273*4d38bd12STony Lindgren .name = "wd_timer", 274*4d38bd12STony Lindgren .sysc = &wd_timer_sysc, 275*4d38bd12STony Lindgren .pre_shutdown = &omap2_wd_timer_disable, 276*4d38bd12STony Lindgren .reset = &omap2_wd_timer_reset, 277*4d38bd12STony Lindgren }; 278*4d38bd12STony Lindgren 279*4d38bd12STony Lindgren static struct omap_hwmod dm816x_wd_timer_hwmod = { 280*4d38bd12STony Lindgren .name = "wd_timer", 281*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 282*4d38bd12STony Lindgren .main_clk = "sysclk18_ck", 283*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 284*4d38bd12STony Lindgren .prcm = { 285*4d38bd12STony Lindgren .omap4 = { 286*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_WDTIMER_CLKCTRL, 287*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 288*4d38bd12STony Lindgren }, 289*4d38bd12STony Lindgren }, 290*4d38bd12STony Lindgren .class = &wd_timer_class, 291*4d38bd12STony Lindgren }; 292*4d38bd12STony Lindgren 293*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__wd_timer1 = { 294*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 295*4d38bd12STony Lindgren .slave = &dm816x_wd_timer_hwmod, 296*4d38bd12STony Lindgren .clk = "sysclk6_ck", 297*4d38bd12STony Lindgren .user = OCP_USER_MPU, 298*4d38bd12STony Lindgren }; 299*4d38bd12STony Lindgren 300*4d38bd12STony Lindgren /* I2C common */ 301*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig i2c_sysc = { 302*4d38bd12STony Lindgren .rev_offs = 0x0, 303*4d38bd12STony Lindgren .sysc_offs = 0x10, 304*4d38bd12STony Lindgren .syss_offs = 0x90, 305*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | 306*4d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 307*4d38bd12STony Lindgren SYSC_HAS_AUTOIDLE, 308*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 309*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 310*4d38bd12STony Lindgren }; 311*4d38bd12STony Lindgren 312*4d38bd12STony Lindgren static struct omap_hwmod_class i2c_class = { 313*4d38bd12STony Lindgren .name = "i2c", 314*4d38bd12STony Lindgren .sysc = &i2c_sysc, 315*4d38bd12STony Lindgren }; 316*4d38bd12STony Lindgren 317*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_i2c1_hwmod = { 318*4d38bd12STony Lindgren .name = "i2c1", 319*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 320*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 321*4d38bd12STony Lindgren .prcm = { 322*4d38bd12STony Lindgren .omap4 = { 323*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_I2C_0_CLKCTRL, 324*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 325*4d38bd12STony Lindgren }, 326*4d38bd12STony Lindgren }, 327*4d38bd12STony Lindgren .class = &i2c_class, 328*4d38bd12STony Lindgren }; 329*4d38bd12STony Lindgren 330*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__i2c1 = { 331*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 332*4d38bd12STony Lindgren .slave = &dm81xx_i2c1_hwmod, 333*4d38bd12STony Lindgren .clk = "sysclk6_ck", 334*4d38bd12STony Lindgren .user = OCP_USER_MPU, 335*4d38bd12STony Lindgren }; 336*4d38bd12STony Lindgren 337*4d38bd12STony Lindgren static struct omap_hwmod dm816x_i2c2_hwmod = { 338*4d38bd12STony Lindgren .name = "i2c2", 339*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 340*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 341*4d38bd12STony Lindgren .prcm = { 342*4d38bd12STony Lindgren .omap4 = { 343*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_I2C_1_CLKCTRL, 344*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 345*4d38bd12STony Lindgren }, 346*4d38bd12STony Lindgren }, 347*4d38bd12STony Lindgren .class = &i2c_class, 348*4d38bd12STony Lindgren }; 349*4d38bd12STony Lindgren 350*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = { 351*4d38bd12STony Lindgren .rev_offs = 0x0000, 352*4d38bd12STony Lindgren .sysc_offs = 0x0010, 353*4d38bd12STony Lindgren .syss_offs = 0x0014, 354*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 355*4d38bd12STony Lindgren SYSC_HAS_SOFTRESET | 356*4d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 357*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 358*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 359*4d38bd12STony Lindgren }; 360*4d38bd12STony Lindgren 361*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__i2c2 = { 362*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 363*4d38bd12STony Lindgren .slave = &dm816x_i2c2_hwmod, 364*4d38bd12STony Lindgren .clk = "sysclk6_ck", 365*4d38bd12STony Lindgren .user = OCP_USER_MPU, 366*4d38bd12STony Lindgren }; 367*4d38bd12STony Lindgren 368*4d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_elm_hwmod_class = { 369*4d38bd12STony Lindgren .name = "elm", 370*4d38bd12STony Lindgren .sysc = &dm81xx_elm_sysc, 371*4d38bd12STony Lindgren }; 372*4d38bd12STony Lindgren 373*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_elm_hwmod = { 374*4d38bd12STony Lindgren .name = "elm", 375*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 376*4d38bd12STony Lindgren .class = &dm81xx_elm_hwmod_class, 377*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 378*4d38bd12STony Lindgren }; 379*4d38bd12STony Lindgren 380*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = { 381*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 382*4d38bd12STony Lindgren .slave = &dm81xx_elm_hwmod, 383*4d38bd12STony Lindgren .user = OCP_USER_MPU, 384*4d38bd12STony Lindgren }; 385*4d38bd12STony Lindgren 386*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = { 387*4d38bd12STony Lindgren .rev_offs = 0x0000, 388*4d38bd12STony Lindgren .sysc_offs = 0x0010, 389*4d38bd12STony Lindgren .syss_offs = 0x0114, 390*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | 391*4d38bd12STony Lindgren SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 392*4d38bd12STony Lindgren SYSS_HAS_RESET_STATUS, 393*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 394*4d38bd12STony Lindgren SIDLE_SMART_WKUP, 395*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 396*4d38bd12STony Lindgren }; 397*4d38bd12STony Lindgren 398*4d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpio_hwmod_class = { 399*4d38bd12STony Lindgren .name = "gpio", 400*4d38bd12STony Lindgren .sysc = &dm81xx_gpio_sysc, 401*4d38bd12STony Lindgren .rev = 2, 402*4d38bd12STony Lindgren }; 403*4d38bd12STony Lindgren 404*4d38bd12STony Lindgren static struct omap_gpio_dev_attr gpio_dev_attr = { 405*4d38bd12STony Lindgren .bank_width = 32, 406*4d38bd12STony Lindgren .dbck_flag = true, 407*4d38bd12STony Lindgren }; 408*4d38bd12STony Lindgren 409*4d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 410*4d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 411*4d38bd12STony Lindgren }; 412*4d38bd12STony Lindgren 413*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio1_hwmod = { 414*4d38bd12STony Lindgren .name = "gpio1", 415*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 416*4d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 417*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 418*4d38bd12STony Lindgren .prcm = { 419*4d38bd12STony Lindgren .omap4 = { 420*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_GPIO_0_CLKCTRL, 421*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 422*4d38bd12STony Lindgren }, 423*4d38bd12STony Lindgren }, 424*4d38bd12STony Lindgren .opt_clks = gpio1_opt_clks, 425*4d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 426*4d38bd12STony Lindgren .dev_attr = &gpio_dev_attr, 427*4d38bd12STony Lindgren }; 428*4d38bd12STony Lindgren 429*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = { 430*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 431*4d38bd12STony Lindgren .slave = &dm81xx_gpio1_hwmod, 432*4d38bd12STony Lindgren .user = OCP_USER_MPU, 433*4d38bd12STony Lindgren }; 434*4d38bd12STony Lindgren 435*4d38bd12STony Lindgren static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 436*4d38bd12STony Lindgren { .role = "dbclk", .clk = "sysclk18_ck" }, 437*4d38bd12STony Lindgren }; 438*4d38bd12STony Lindgren 439*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpio2_hwmod = { 440*4d38bd12STony Lindgren .name = "gpio2", 441*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 442*4d38bd12STony Lindgren .class = &dm81xx_gpio_hwmod_class, 443*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 444*4d38bd12STony Lindgren .prcm = { 445*4d38bd12STony Lindgren .omap4 = { 446*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_GPIO_1_CLKCTRL, 447*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 448*4d38bd12STony Lindgren }, 449*4d38bd12STony Lindgren }, 450*4d38bd12STony Lindgren .opt_clks = gpio2_opt_clks, 451*4d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 452*4d38bd12STony Lindgren .dev_attr = &gpio_dev_attr, 453*4d38bd12STony Lindgren }; 454*4d38bd12STony Lindgren 455*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = { 456*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 457*4d38bd12STony Lindgren .slave = &dm81xx_gpio2_hwmod, 458*4d38bd12STony Lindgren .user = OCP_USER_MPU, 459*4d38bd12STony Lindgren }; 460*4d38bd12STony Lindgren 461*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = { 462*4d38bd12STony Lindgren .rev_offs = 0x0, 463*4d38bd12STony Lindgren .sysc_offs = 0x10, 464*4d38bd12STony Lindgren .syss_offs = 0x14, 465*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | 466*4d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 467*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 468*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 469*4d38bd12STony Lindgren }; 470*4d38bd12STony Lindgren 471*4d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = { 472*4d38bd12STony Lindgren .name = "gpmc", 473*4d38bd12STony Lindgren .sysc = &dm81xx_gpmc_sysc, 474*4d38bd12STony Lindgren }; 475*4d38bd12STony Lindgren 476*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_gpmc_hwmod = { 477*4d38bd12STony Lindgren .name = "gpmc", 478*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 479*4d38bd12STony Lindgren .class = &dm81xx_gpmc_hwmod_class, 480*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 481*4d38bd12STony Lindgren .prcm = { 482*4d38bd12STony Lindgren .omap4 = { 483*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_GPMC_CLKCTRL, 484*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 485*4d38bd12STony Lindgren }, 486*4d38bd12STony Lindgren }, 487*4d38bd12STony Lindgren }; 488*4d38bd12STony Lindgren 489*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = { 490*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_slow_hwmod, 491*4d38bd12STony Lindgren .slave = &dm81xx_gpmc_hwmod, 492*4d38bd12STony Lindgren .user = OCP_USER_MPU, 493*4d38bd12STony Lindgren }; 494*4d38bd12STony Lindgren 495*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = { 496*4d38bd12STony Lindgren .rev_offs = 0x0, 497*4d38bd12STony Lindgren .sysc_offs = 0x10, 498*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | 499*4d38bd12STony Lindgren SYSC_HAS_SOFTRESET, 500*4d38bd12STony Lindgren .idlemodes = SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART, 501*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 502*4d38bd12STony Lindgren }; 503*4d38bd12STony Lindgren 504*4d38bd12STony Lindgren static struct omap_hwmod_class dm81xx_usbotg_class = { 505*4d38bd12STony Lindgren .name = "usbotg", 506*4d38bd12STony Lindgren .sysc = &dm81xx_usbhsotg_sysc, 507*4d38bd12STony Lindgren }; 508*4d38bd12STony Lindgren 509*4d38bd12STony Lindgren static struct omap_hwmod dm81xx_usbss_hwmod = { 510*4d38bd12STony Lindgren .name = "usb_otg_hs", 511*4d38bd12STony Lindgren .clkdm_name = "default_l3_slow_clkdm", 512*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 513*4d38bd12STony Lindgren .prcm = { 514*4d38bd12STony Lindgren .omap4 = { 515*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_DEFAULT_USB_CLKCTRL, 516*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 517*4d38bd12STony Lindgren }, 518*4d38bd12STony Lindgren }, 519*4d38bd12STony Lindgren .class = &dm81xx_usbotg_class, 520*4d38bd12STony Lindgren }; 521*4d38bd12STony Lindgren 522*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm81xx_default_l3_slow__usbss = { 523*4d38bd12STony Lindgren .master = &dm816x_default_l3_slow_hwmod, 524*4d38bd12STony Lindgren .slave = &dm81xx_usbss_hwmod, 525*4d38bd12STony Lindgren .clk = "sysclk6_ck", 526*4d38bd12STony Lindgren .user = OCP_USER_MPU, 527*4d38bd12STony Lindgren }; 528*4d38bd12STony Lindgren 529*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = { 530*4d38bd12STony Lindgren .rev_offs = 0x0000, 531*4d38bd12STony Lindgren .sysc_offs = 0x0010, 532*4d38bd12STony Lindgren .syss_offs = 0x0014, 533*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET, 534*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 535*4d38bd12STony Lindgren SIDLE_SMART_WKUP, 536*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 537*4d38bd12STony Lindgren }; 538*4d38bd12STony Lindgren 539*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_timer_hwmod_class = { 540*4d38bd12STony Lindgren .name = "timer", 541*4d38bd12STony Lindgren .sysc = &dm816x_timer_sysc, 542*4d38bd12STony Lindgren }; 543*4d38bd12STony Lindgren 544*4d38bd12STony Lindgren static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { 545*4d38bd12STony Lindgren .timer_capability = OMAP_TIMER_ALWON, 546*4d38bd12STony Lindgren }; 547*4d38bd12STony Lindgren 548*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer1_hwmod = { 549*4d38bd12STony Lindgren .name = "timer1", 550*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 551*4d38bd12STony Lindgren .main_clk = "timer1_fck", 552*4d38bd12STony Lindgren .prcm = { 553*4d38bd12STony Lindgren .omap4 = { 554*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL, 555*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 556*4d38bd12STony Lindgren }, 557*4d38bd12STony Lindgren }, 558*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 559*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 560*4d38bd12STony Lindgren }; 561*4d38bd12STony Lindgren 562*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = { 563*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 564*4d38bd12STony Lindgren .slave = &dm816x_timer1_hwmod, 565*4d38bd12STony Lindgren .clk = "sysclk6_ck", 566*4d38bd12STony Lindgren .user = OCP_USER_MPU, 567*4d38bd12STony Lindgren }; 568*4d38bd12STony Lindgren 569*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer2_hwmod = { 570*4d38bd12STony Lindgren .name = "timer2", 571*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 572*4d38bd12STony Lindgren .main_clk = "timer2_fck", 573*4d38bd12STony Lindgren .prcm = { 574*4d38bd12STony Lindgren .omap4 = { 575*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL, 576*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 577*4d38bd12STony Lindgren }, 578*4d38bd12STony Lindgren }, 579*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 580*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 581*4d38bd12STony Lindgren }; 582*4d38bd12STony Lindgren 583*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = { 584*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 585*4d38bd12STony Lindgren .slave = &dm816x_timer2_hwmod, 586*4d38bd12STony Lindgren .clk = "sysclk6_ck", 587*4d38bd12STony Lindgren .user = OCP_USER_MPU, 588*4d38bd12STony Lindgren }; 589*4d38bd12STony Lindgren 590*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer3_hwmod = { 591*4d38bd12STony Lindgren .name = "timer3", 592*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 593*4d38bd12STony Lindgren .main_clk = "timer3_fck", 594*4d38bd12STony Lindgren .prcm = { 595*4d38bd12STony Lindgren .omap4 = { 596*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL, 597*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 598*4d38bd12STony Lindgren }, 599*4d38bd12STony Lindgren }, 600*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 601*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 602*4d38bd12STony Lindgren }; 603*4d38bd12STony Lindgren 604*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = { 605*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 606*4d38bd12STony Lindgren .slave = &dm816x_timer3_hwmod, 607*4d38bd12STony Lindgren .clk = "sysclk6_ck", 608*4d38bd12STony Lindgren .user = OCP_USER_MPU, 609*4d38bd12STony Lindgren }; 610*4d38bd12STony Lindgren 611*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer4_hwmod = { 612*4d38bd12STony Lindgren .name = "timer4", 613*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 614*4d38bd12STony Lindgren .main_clk = "timer4_fck", 615*4d38bd12STony Lindgren .prcm = { 616*4d38bd12STony Lindgren .omap4 = { 617*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL, 618*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 619*4d38bd12STony Lindgren }, 620*4d38bd12STony Lindgren }, 621*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 622*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 623*4d38bd12STony Lindgren }; 624*4d38bd12STony Lindgren 625*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = { 626*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 627*4d38bd12STony Lindgren .slave = &dm816x_timer4_hwmod, 628*4d38bd12STony Lindgren .clk = "sysclk6_ck", 629*4d38bd12STony Lindgren .user = OCP_USER_MPU, 630*4d38bd12STony Lindgren }; 631*4d38bd12STony Lindgren 632*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer5_hwmod = { 633*4d38bd12STony Lindgren .name = "timer5", 634*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 635*4d38bd12STony Lindgren .main_clk = "timer5_fck", 636*4d38bd12STony Lindgren .prcm = { 637*4d38bd12STony Lindgren .omap4 = { 638*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL, 639*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 640*4d38bd12STony Lindgren }, 641*4d38bd12STony Lindgren }, 642*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 643*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 644*4d38bd12STony Lindgren }; 645*4d38bd12STony Lindgren 646*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = { 647*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 648*4d38bd12STony Lindgren .slave = &dm816x_timer5_hwmod, 649*4d38bd12STony Lindgren .clk = "sysclk6_ck", 650*4d38bd12STony Lindgren .user = OCP_USER_MPU, 651*4d38bd12STony Lindgren }; 652*4d38bd12STony Lindgren 653*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer6_hwmod = { 654*4d38bd12STony Lindgren .name = "timer6", 655*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 656*4d38bd12STony Lindgren .main_clk = "timer6_fck", 657*4d38bd12STony Lindgren .prcm = { 658*4d38bd12STony Lindgren .omap4 = { 659*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL, 660*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 661*4d38bd12STony Lindgren }, 662*4d38bd12STony Lindgren }, 663*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 664*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 665*4d38bd12STony Lindgren }; 666*4d38bd12STony Lindgren 667*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = { 668*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 669*4d38bd12STony Lindgren .slave = &dm816x_timer6_hwmod, 670*4d38bd12STony Lindgren .clk = "sysclk6_ck", 671*4d38bd12STony Lindgren .user = OCP_USER_MPU, 672*4d38bd12STony Lindgren }; 673*4d38bd12STony Lindgren 674*4d38bd12STony Lindgren static struct omap_hwmod dm816x_timer7_hwmod = { 675*4d38bd12STony Lindgren .name = "timer7", 676*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 677*4d38bd12STony Lindgren .main_clk = "timer7_fck", 678*4d38bd12STony Lindgren .prcm = { 679*4d38bd12STony Lindgren .omap4 = { 680*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL, 681*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 682*4d38bd12STony Lindgren }, 683*4d38bd12STony Lindgren }, 684*4d38bd12STony Lindgren .dev_attr = &capability_alwon_dev_attr, 685*4d38bd12STony Lindgren .class = &dm816x_timer_hwmod_class, 686*4d38bd12STony Lindgren }; 687*4d38bd12STony Lindgren 688*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = { 689*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 690*4d38bd12STony Lindgren .slave = &dm816x_timer7_hwmod, 691*4d38bd12STony Lindgren .clk = "sysclk6_ck", 692*4d38bd12STony Lindgren .user = OCP_USER_MPU, 693*4d38bd12STony Lindgren }; 694*4d38bd12STony Lindgren 695*4d38bd12STony Lindgren /* EMAC Ethernet */ 696*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = { 697*4d38bd12STony Lindgren .rev_offs = 0x0, 698*4d38bd12STony Lindgren .sysc_offs = 0x4, 699*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_SOFTRESET, 700*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type2, 701*4d38bd12STony Lindgren }; 702*4d38bd12STony Lindgren 703*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_emac_hwmod_class = { 704*4d38bd12STony Lindgren .name = "emac", 705*4d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 706*4d38bd12STony Lindgren }; 707*4d38bd12STony Lindgren 708*4d38bd12STony Lindgren /* 709*4d38bd12STony Lindgren * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate 710*4d38bd12STony Lindgren * driver probed before EMAC0, we let MDIO do the clock idling. 711*4d38bd12STony Lindgren */ 712*4d38bd12STony Lindgren static struct omap_hwmod dm816x_emac0_hwmod = { 713*4d38bd12STony Lindgren .name = "emac0", 714*4d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 715*4d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 716*4d38bd12STony Lindgren }; 717*4d38bd12STony Lindgren 718*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac0 = { 719*4d38bd12STony Lindgren .master = &dm816x_l4_hs_hwmod, 720*4d38bd12STony Lindgren .slave = &dm816x_emac0_hwmod, 721*4d38bd12STony Lindgren .clk = "sysclk5_ck", 722*4d38bd12STony Lindgren .user = OCP_USER_MPU, 723*4d38bd12STony Lindgren }; 724*4d38bd12STony Lindgren 725*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mdio_hwmod_class = { 726*4d38bd12STony Lindgren .name = "davinci_mdio", 727*4d38bd12STony Lindgren .sysc = &dm816x_emac_sysc, 728*4d38bd12STony Lindgren }; 729*4d38bd12STony Lindgren 730*4d38bd12STony Lindgren struct omap_hwmod dm816x_emac0_mdio_hwmod = { 731*4d38bd12STony Lindgren .name = "davinci_mdio", 732*4d38bd12STony Lindgren .class = &dm816x_mdio_hwmod_class, 733*4d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 734*4d38bd12STony Lindgren .main_clk = "sysclk24_ck", 735*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 736*4d38bd12STony Lindgren /* 737*4d38bd12STony Lindgren * REVISIT: This should be moved to the emac0_hwmod 738*4d38bd12STony Lindgren * once we have a better way to handle device slaves. 739*4d38bd12STony Lindgren */ 740*4d38bd12STony Lindgren .prcm = { 741*4d38bd12STony Lindgren .omap4 = { 742*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_0_CLKCTRL, 743*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 744*4d38bd12STony Lindgren }, 745*4d38bd12STony Lindgren }, 746*4d38bd12STony Lindgren }; 747*4d38bd12STony Lindgren 748*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_emac0__mdio = { 749*4d38bd12STony Lindgren .master = &dm816x_l4_hs_hwmod, 750*4d38bd12STony Lindgren .slave = &dm816x_emac0_mdio_hwmod, 751*4d38bd12STony Lindgren .user = OCP_USER_MPU, 752*4d38bd12STony Lindgren }; 753*4d38bd12STony Lindgren 754*4d38bd12STony Lindgren static struct omap_hwmod dm816x_emac1_hwmod = { 755*4d38bd12STony Lindgren .name = "emac1", 756*4d38bd12STony Lindgren .clkdm_name = "alwon_ethernet_clkdm", 757*4d38bd12STony Lindgren .main_clk = "sysclk24_ck", 758*4d38bd12STony Lindgren .flags = HWMOD_NO_IDLEST, 759*4d38bd12STony Lindgren .prcm = { 760*4d38bd12STony Lindgren .omap4 = { 761*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL, 762*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 763*4d38bd12STony Lindgren }, 764*4d38bd12STony Lindgren }, 765*4d38bd12STony Lindgren .class = &dm816x_emac_hwmod_class, 766*4d38bd12STony Lindgren }; 767*4d38bd12STony Lindgren 768*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = { 769*4d38bd12STony Lindgren .master = &dm816x_l4_hs_hwmod, 770*4d38bd12STony Lindgren .slave = &dm816x_emac1_hwmod, 771*4d38bd12STony Lindgren .clk = "sysclk5_ck", 772*4d38bd12STony Lindgren .user = OCP_USER_MPU, 773*4d38bd12STony Lindgren }; 774*4d38bd12STony Lindgren 775*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mmc_sysc = { 776*4d38bd12STony Lindgren .rev_offs = 0x0, 777*4d38bd12STony Lindgren .sysc_offs = 0x110, 778*4d38bd12STony Lindgren .syss_offs = 0x114, 779*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 780*4d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 781*4d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 782*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 783*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 784*4d38bd12STony Lindgren }; 785*4d38bd12STony Lindgren 786*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mmc_class = { 787*4d38bd12STony Lindgren .name = "mmc", 788*4d38bd12STony Lindgren .sysc = &dm816x_mmc_sysc, 789*4d38bd12STony Lindgren }; 790*4d38bd12STony Lindgren 791*4d38bd12STony Lindgren static struct omap_hwmod_opt_clk dm816x_mmc1_opt_clks[] = { 792*4d38bd12STony Lindgren { .role = "dbck", .clk = "sysclk18_ck", }, 793*4d38bd12STony Lindgren }; 794*4d38bd12STony Lindgren 795*4d38bd12STony Lindgren static struct omap_hsmmc_dev_attr mmc1_dev_attr = { 796*4d38bd12STony Lindgren .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, 797*4d38bd12STony Lindgren }; 798*4d38bd12STony Lindgren 799*4d38bd12STony Lindgren static struct omap_hwmod dm816x_mmc1_hwmod = { 800*4d38bd12STony Lindgren .name = "mmc1", 801*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 802*4d38bd12STony Lindgren .opt_clks = dm816x_mmc1_opt_clks, 803*4d38bd12STony Lindgren .opt_clks_cnt = ARRAY_SIZE(dm816x_mmc1_opt_clks), 804*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 805*4d38bd12STony Lindgren .prcm = { 806*4d38bd12STony Lindgren .omap4 = { 807*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL, 808*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 809*4d38bd12STony Lindgren }, 810*4d38bd12STony Lindgren }, 811*4d38bd12STony Lindgren .dev_attr = &mmc1_dev_attr, 812*4d38bd12STony Lindgren .class = &dm816x_mmc_class, 813*4d38bd12STony Lindgren }; 814*4d38bd12STony Lindgren 815*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = { 816*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 817*4d38bd12STony Lindgren .slave = &dm816x_mmc1_hwmod, 818*4d38bd12STony Lindgren .clk = "sysclk6_ck", 819*4d38bd12STony Lindgren .user = OCP_USER_MPU, 820*4d38bd12STony Lindgren .flags = OMAP_FIREWALL_L4 821*4d38bd12STony Lindgren }; 822*4d38bd12STony Lindgren 823*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = { 824*4d38bd12STony Lindgren .rev_offs = 0x0, 825*4d38bd12STony Lindgren .sysc_offs = 0x110, 826*4d38bd12STony Lindgren .syss_offs = 0x114, 827*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 828*4d38bd12STony Lindgren SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | 829*4d38bd12STony Lindgren SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS, 830*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 831*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 832*4d38bd12STony Lindgren }; 833*4d38bd12STony Lindgren 834*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mcspi_class = { 835*4d38bd12STony Lindgren .name = "mcspi", 836*4d38bd12STony Lindgren .sysc = &dm816x_mcspi_sysc, 837*4d38bd12STony Lindgren .rev = OMAP3_MCSPI_REV, 838*4d38bd12STony Lindgren }; 839*4d38bd12STony Lindgren 840*4d38bd12STony Lindgren static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = { 841*4d38bd12STony Lindgren .num_chipselect = 4, 842*4d38bd12STony Lindgren }; 843*4d38bd12STony Lindgren 844*4d38bd12STony Lindgren static struct omap_hwmod dm816x_mcspi1_hwmod = { 845*4d38bd12STony Lindgren .name = "mcspi1", 846*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 847*4d38bd12STony Lindgren .main_clk = "sysclk10_ck", 848*4d38bd12STony Lindgren .prcm = { 849*4d38bd12STony Lindgren .omap4 = { 850*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_SPI_CLKCTRL, 851*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 852*4d38bd12STony Lindgren }, 853*4d38bd12STony Lindgren }, 854*4d38bd12STony Lindgren .class = &dm816x_mcspi_class, 855*4d38bd12STony Lindgren .dev_attr = &dm816x_mcspi1_dev_attr, 856*4d38bd12STony Lindgren }; 857*4d38bd12STony Lindgren 858*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mcspi1 = { 859*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 860*4d38bd12STony Lindgren .slave = &dm816x_mcspi1_hwmod, 861*4d38bd12STony Lindgren .clk = "sysclk6_ck", 862*4d38bd12STony Lindgren .user = OCP_USER_MPU, 863*4d38bd12STony Lindgren }; 864*4d38bd12STony Lindgren 865*4d38bd12STony Lindgren static struct omap_hwmod_class_sysconfig dm816x_mailbox_sysc = { 866*4d38bd12STony Lindgren .rev_offs = 0x000, 867*4d38bd12STony Lindgren .sysc_offs = 0x010, 868*4d38bd12STony Lindgren .syss_offs = 0x014, 869*4d38bd12STony Lindgren .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | 870*4d38bd12STony Lindgren SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE, 871*4d38bd12STony Lindgren .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART, 872*4d38bd12STony Lindgren .sysc_fields = &omap_hwmod_sysc_type1, 873*4d38bd12STony Lindgren }; 874*4d38bd12STony Lindgren 875*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_mailbox_hwmod_class = { 876*4d38bd12STony Lindgren .name = "mailbox", 877*4d38bd12STony Lindgren .sysc = &dm816x_mailbox_sysc, 878*4d38bd12STony Lindgren }; 879*4d38bd12STony Lindgren 880*4d38bd12STony Lindgren static struct omap_hwmod dm816x_mailbox_hwmod = { 881*4d38bd12STony Lindgren .name = "mailbox", 882*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 883*4d38bd12STony Lindgren .class = &dm816x_mailbox_hwmod_class, 884*4d38bd12STony Lindgren .main_clk = "sysclk6_ck", 885*4d38bd12STony Lindgren .prcm = { 886*4d38bd12STony Lindgren .omap4 = { 887*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_MAILBOX_CLKCTRL, 888*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 889*4d38bd12STony Lindgren }, 890*4d38bd12STony Lindgren }, 891*4d38bd12STony Lindgren }; 892*4d38bd12STony Lindgren 893*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if dm816x_l4_ls__mailbox = { 894*4d38bd12STony Lindgren .master = &dm816x_l4_ls_hwmod, 895*4d38bd12STony Lindgren .slave = &dm816x_mailbox_hwmod, 896*4d38bd12STony Lindgren .user = OCP_USER_MPU, 897*4d38bd12STony Lindgren }; 898*4d38bd12STony Lindgren 899*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tpcc_hwmod_class = { 900*4d38bd12STony Lindgren .name = "tpcc", 901*4d38bd12STony Lindgren }; 902*4d38bd12STony Lindgren 903*4d38bd12STony Lindgren struct omap_hwmod dm816x_tpcc_hwmod = { 904*4d38bd12STony Lindgren .name = "tpcc", 905*4d38bd12STony Lindgren .class = &dm816x_tpcc_hwmod_class, 906*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 907*4d38bd12STony Lindgren .main_clk = "sysclk4_ck", 908*4d38bd12STony Lindgren .prcm = { 909*4d38bd12STony Lindgren .omap4 = { 910*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TPCC_CLKCTRL, 911*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 912*4d38bd12STony Lindgren }, 913*4d38bd12STony Lindgren }, 914*4d38bd12STony Lindgren }; 915*4d38bd12STony Lindgren 916*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tpcc = { 917*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_fast_hwmod, 918*4d38bd12STony Lindgren .slave = &dm816x_tpcc_hwmod, 919*4d38bd12STony Lindgren .clk = "sysclk4_ck", 920*4d38bd12STony Lindgren .user = OCP_USER_MPU, 921*4d38bd12STony Lindgren }; 922*4d38bd12STony Lindgren 923*4d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc0_addr_space[] = { 924*4d38bd12STony Lindgren { 925*4d38bd12STony Lindgren .pa_start = 0x49800000, 926*4d38bd12STony Lindgren .pa_end = 0x49800000 + SZ_8K - 1, 927*4d38bd12STony Lindgren .flags = ADDR_TYPE_RT, 928*4d38bd12STony Lindgren }, 929*4d38bd12STony Lindgren { }, 930*4d38bd12STony Lindgren }; 931*4d38bd12STony Lindgren 932*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc0_hwmod_class = { 933*4d38bd12STony Lindgren .name = "tptc0", 934*4d38bd12STony Lindgren }; 935*4d38bd12STony Lindgren 936*4d38bd12STony Lindgren struct omap_hwmod dm816x_tptc0_hwmod = { 937*4d38bd12STony Lindgren .name = "tptc0", 938*4d38bd12STony Lindgren .class = &dm816x_tptc0_hwmod_class, 939*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 940*4d38bd12STony Lindgren .main_clk = "sysclk4_ck", 941*4d38bd12STony Lindgren .prcm = { 942*4d38bd12STony Lindgren .omap4 = { 943*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TPTC0_CLKCTRL, 944*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 945*4d38bd12STony Lindgren }, 946*4d38bd12STony Lindgren }, 947*4d38bd12STony Lindgren }; 948*4d38bd12STony Lindgren 949*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc0 = { 950*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_fast_hwmod, 951*4d38bd12STony Lindgren .slave = &dm816x_tptc0_hwmod, 952*4d38bd12STony Lindgren .clk = "sysclk4_ck", 953*4d38bd12STony Lindgren .addr = dm816x_tptc0_addr_space, 954*4d38bd12STony Lindgren .user = OCP_USER_MPU, 955*4d38bd12STony Lindgren }; 956*4d38bd12STony Lindgren 957*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_tptc0__alwon_l3_fast = { 958*4d38bd12STony Lindgren .master = &dm816x_tptc0_hwmod, 959*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_fast_hwmod, 960*4d38bd12STony Lindgren .clk = "sysclk4_ck", 961*4d38bd12STony Lindgren .addr = dm816x_tptc0_addr_space, 962*4d38bd12STony Lindgren .user = OCP_USER_MPU, 963*4d38bd12STony Lindgren }; 964*4d38bd12STony Lindgren 965*4d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc1_addr_space[] = { 966*4d38bd12STony Lindgren { 967*4d38bd12STony Lindgren .pa_start = 0x49900000, 968*4d38bd12STony Lindgren .pa_end = 0x49900000 + SZ_8K - 1, 969*4d38bd12STony Lindgren .flags = ADDR_TYPE_RT, 970*4d38bd12STony Lindgren }, 971*4d38bd12STony Lindgren { }, 972*4d38bd12STony Lindgren }; 973*4d38bd12STony Lindgren 974*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc1_hwmod_class = { 975*4d38bd12STony Lindgren .name = "tptc1", 976*4d38bd12STony Lindgren }; 977*4d38bd12STony Lindgren 978*4d38bd12STony Lindgren struct omap_hwmod dm816x_tptc1_hwmod = { 979*4d38bd12STony Lindgren .name = "tptc1", 980*4d38bd12STony Lindgren .class = &dm816x_tptc1_hwmod_class, 981*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 982*4d38bd12STony Lindgren .main_clk = "sysclk4_ck", 983*4d38bd12STony Lindgren .prcm = { 984*4d38bd12STony Lindgren .omap4 = { 985*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TPTC1_CLKCTRL, 986*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 987*4d38bd12STony Lindgren }, 988*4d38bd12STony Lindgren }, 989*4d38bd12STony Lindgren }; 990*4d38bd12STony Lindgren 991*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc1 = { 992*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_fast_hwmod, 993*4d38bd12STony Lindgren .slave = &dm816x_tptc1_hwmod, 994*4d38bd12STony Lindgren .clk = "sysclk4_ck", 995*4d38bd12STony Lindgren .addr = dm816x_tptc1_addr_space, 996*4d38bd12STony Lindgren .user = OCP_USER_MPU, 997*4d38bd12STony Lindgren }; 998*4d38bd12STony Lindgren 999*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_tptc1__alwon_l3_fast = { 1000*4d38bd12STony Lindgren .master = &dm816x_tptc1_hwmod, 1001*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_fast_hwmod, 1002*4d38bd12STony Lindgren .clk = "sysclk4_ck", 1003*4d38bd12STony Lindgren .addr = dm816x_tptc1_addr_space, 1004*4d38bd12STony Lindgren .user = OCP_USER_MPU, 1005*4d38bd12STony Lindgren }; 1006*4d38bd12STony Lindgren 1007*4d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc2_addr_space[] = { 1008*4d38bd12STony Lindgren { 1009*4d38bd12STony Lindgren .pa_start = 0x49a00000, 1010*4d38bd12STony Lindgren .pa_end = 0x49a00000 + SZ_8K - 1, 1011*4d38bd12STony Lindgren .flags = ADDR_TYPE_RT, 1012*4d38bd12STony Lindgren }, 1013*4d38bd12STony Lindgren { }, 1014*4d38bd12STony Lindgren }; 1015*4d38bd12STony Lindgren 1016*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc2_hwmod_class = { 1017*4d38bd12STony Lindgren .name = "tptc2", 1018*4d38bd12STony Lindgren }; 1019*4d38bd12STony Lindgren 1020*4d38bd12STony Lindgren struct omap_hwmod dm816x_tptc2_hwmod = { 1021*4d38bd12STony Lindgren .name = "tptc2", 1022*4d38bd12STony Lindgren .class = &dm816x_tptc2_hwmod_class, 1023*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1024*4d38bd12STony Lindgren .main_clk = "sysclk4_ck", 1025*4d38bd12STony Lindgren .prcm = { 1026*4d38bd12STony Lindgren .omap4 = { 1027*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TPTC2_CLKCTRL, 1028*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1029*4d38bd12STony Lindgren }, 1030*4d38bd12STony Lindgren }, 1031*4d38bd12STony Lindgren }; 1032*4d38bd12STony Lindgren 1033*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc2 = { 1034*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_fast_hwmod, 1035*4d38bd12STony Lindgren .slave = &dm816x_tptc2_hwmod, 1036*4d38bd12STony Lindgren .clk = "sysclk4_ck", 1037*4d38bd12STony Lindgren .addr = dm816x_tptc2_addr_space, 1038*4d38bd12STony Lindgren .user = OCP_USER_MPU, 1039*4d38bd12STony Lindgren }; 1040*4d38bd12STony Lindgren 1041*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_tptc2__alwon_l3_fast = { 1042*4d38bd12STony Lindgren .master = &dm816x_tptc2_hwmod, 1043*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_fast_hwmod, 1044*4d38bd12STony Lindgren .clk = "sysclk4_ck", 1045*4d38bd12STony Lindgren .addr = dm816x_tptc2_addr_space, 1046*4d38bd12STony Lindgren .user = OCP_USER_MPU, 1047*4d38bd12STony Lindgren }; 1048*4d38bd12STony Lindgren 1049*4d38bd12STony Lindgren static struct omap_hwmod_addr_space dm816x_tptc3_addr_space[] = { 1050*4d38bd12STony Lindgren { 1051*4d38bd12STony Lindgren .pa_start = 0x49b00000, 1052*4d38bd12STony Lindgren .pa_end = 0x49b00000 + SZ_8K - 1, 1053*4d38bd12STony Lindgren .flags = ADDR_TYPE_RT, 1054*4d38bd12STony Lindgren }, 1055*4d38bd12STony Lindgren { }, 1056*4d38bd12STony Lindgren }; 1057*4d38bd12STony Lindgren 1058*4d38bd12STony Lindgren static struct omap_hwmod_class dm816x_tptc3_hwmod_class = { 1059*4d38bd12STony Lindgren .name = "tptc3", 1060*4d38bd12STony Lindgren }; 1061*4d38bd12STony Lindgren 1062*4d38bd12STony Lindgren struct omap_hwmod dm816x_tptc3_hwmod = { 1063*4d38bd12STony Lindgren .name = "tptc3", 1064*4d38bd12STony Lindgren .class = &dm816x_tptc3_hwmod_class, 1065*4d38bd12STony Lindgren .clkdm_name = "alwon_l3s_clkdm", 1066*4d38bd12STony Lindgren .main_clk = "sysclk4_ck", 1067*4d38bd12STony Lindgren .prcm = { 1068*4d38bd12STony Lindgren .omap4 = { 1069*4d38bd12STony Lindgren .clkctrl_offs = DM816X_CM_ALWON_TPTC3_CLKCTRL, 1070*4d38bd12STony Lindgren .modulemode = MODULEMODE_SWCTRL, 1071*4d38bd12STony Lindgren }, 1072*4d38bd12STony Lindgren }, 1073*4d38bd12STony Lindgren }; 1074*4d38bd12STony Lindgren 1075*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_alwon_l3_fast__tptc3 = { 1076*4d38bd12STony Lindgren .master = &dm816x_alwon_l3_fast_hwmod, 1077*4d38bd12STony Lindgren .slave = &dm816x_tptc3_hwmod, 1078*4d38bd12STony Lindgren .clk = "sysclk4_ck", 1079*4d38bd12STony Lindgren .addr = dm816x_tptc3_addr_space, 1080*4d38bd12STony Lindgren .user = OCP_USER_MPU, 1081*4d38bd12STony Lindgren }; 1082*4d38bd12STony Lindgren 1083*4d38bd12STony Lindgren struct omap_hwmod_ocp_if dm816x_tptc3__alwon_l3_fast = { 1084*4d38bd12STony Lindgren .master = &dm816x_tptc3_hwmod, 1085*4d38bd12STony Lindgren .slave = &dm816x_alwon_l3_fast_hwmod, 1086*4d38bd12STony Lindgren .clk = "sysclk4_ck", 1087*4d38bd12STony Lindgren .addr = dm816x_tptc3_addr_space, 1088*4d38bd12STony Lindgren .user = OCP_USER_MPU, 1089*4d38bd12STony Lindgren }; 1090*4d38bd12STony Lindgren 1091*4d38bd12STony Lindgren static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = { 1092*4d38bd12STony Lindgren &dm816x_mpu__alwon_l3_slow, 1093*4d38bd12STony Lindgren &dm816x_mpu__alwon_l3_med, 1094*4d38bd12STony Lindgren &dm816x_alwon_l3_slow__l4_ls, 1095*4d38bd12STony Lindgren &dm816x_alwon_l3_slow__l4_hs, 1096*4d38bd12STony Lindgren &dm816x_l4_ls__uart1, 1097*4d38bd12STony Lindgren &dm816x_l4_ls__uart2, 1098*4d38bd12STony Lindgren &dm816x_l4_ls__uart3, 1099*4d38bd12STony Lindgren &dm816x_l4_ls__wd_timer1, 1100*4d38bd12STony Lindgren &dm816x_l4_ls__i2c1, 1101*4d38bd12STony Lindgren &dm816x_l4_ls__i2c2, 1102*4d38bd12STony Lindgren &dm81xx_l4_ls__gpio1, 1103*4d38bd12STony Lindgren &dm81xx_l4_ls__gpio2, 1104*4d38bd12STony Lindgren &dm81xx_l4_ls__elm, 1105*4d38bd12STony Lindgren &dm816x_l4_ls__mmc1, 1106*4d38bd12STony Lindgren &dm816x_l4_ls__timer1, 1107*4d38bd12STony Lindgren &dm816x_l4_ls__timer2, 1108*4d38bd12STony Lindgren &dm816x_l4_ls__timer3, 1109*4d38bd12STony Lindgren &dm816x_l4_ls__timer4, 1110*4d38bd12STony Lindgren &dm816x_l4_ls__timer5, 1111*4d38bd12STony Lindgren &dm816x_l4_ls__timer6, 1112*4d38bd12STony Lindgren &dm816x_l4_ls__timer7, 1113*4d38bd12STony Lindgren &dm816x_l4_ls__mcspi1, 1114*4d38bd12STony Lindgren &dm816x_l4_ls__mailbox, 1115*4d38bd12STony Lindgren &dm816x_l4_hs__emac0, 1116*4d38bd12STony Lindgren &dm816x_emac0__mdio, 1117*4d38bd12STony Lindgren &dm816x_l4_hs__emac1, 1118*4d38bd12STony Lindgren &dm816x_alwon_l3_fast__tpcc, 1119*4d38bd12STony Lindgren &dm816x_alwon_l3_fast__tptc0, 1120*4d38bd12STony Lindgren &dm816x_alwon_l3_fast__tptc1, 1121*4d38bd12STony Lindgren &dm816x_alwon_l3_fast__tptc2, 1122*4d38bd12STony Lindgren &dm816x_alwon_l3_fast__tptc3, 1123*4d38bd12STony Lindgren &dm816x_tptc0__alwon_l3_fast, 1124*4d38bd12STony Lindgren &dm816x_tptc1__alwon_l3_fast, 1125*4d38bd12STony Lindgren &dm816x_tptc2__alwon_l3_fast, 1126*4d38bd12STony Lindgren &dm816x_tptc3__alwon_l3_fast, 1127*4d38bd12STony Lindgren &dm81xx_alwon_l3_slow__gpmc, 1128*4d38bd12STony Lindgren &dm81xx_default_l3_slow__usbss, 1129*4d38bd12STony Lindgren NULL, 1130*4d38bd12STony Lindgren }; 1131*4d38bd12STony Lindgren 1132*4d38bd12STony Lindgren int __init ti81xx_hwmod_init(void) 1133*4d38bd12STony Lindgren { 1134*4d38bd12STony Lindgren omap_hwmod_init(); 1135*4d38bd12STony Lindgren return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs); 1136*4d38bd12STony Lindgren } 1137