Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1 | /* |
| 2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips |
| 3 | * |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 5 | * Copyright (C) 2012 Texas Instruments, Inc. |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 6 | * Paul Walmsley |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | * The data in this file should be completely autogeneratable from |
| 13 | * the TI hardware database or other technical documentation. |
| 14 | * |
| 15 | * XXX these should be marked initdata for multi-OMAP kernels |
| 16 | */ |
| 17 | #include <plat/omap_hwmod.h> |
| 18 | #include <mach/irqs.h> |
| 19 | #include <plat/cpu.h> |
| 20 | #include <plat/dma.h> |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 21 | #include <plat/serial.h> |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 22 | #include <plat/l3_3xxx.h> |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 23 | #include <plat/l4_3xxx.h> |
| 24 | #include <plat/i2c.h> |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 25 | #include <plat/gpio.h> |
Kishore Kadiyala | 6ab8946 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 26 | #include <plat/mmc.h> |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 27 | #include <plat/mcbsp.h> |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 28 | #include <plat/mcspi.h> |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 29 | #include <plat/dmtimer.h> |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 30 | |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 31 | #include "omap_hwmod_common_data.h" |
| 32 | |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 33 | #include "smartreflex.h" |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 34 | #include "prm-regbits-34xx.h" |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 35 | #include "cm-regbits-34xx.h" |
Paul Walmsley | ff2516f | 2010-12-21 15:39:15 -0700 | [diff] [blame] | 36 | #include "wd_timer.h" |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 37 | #include <mach/am35xx.h> |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 38 | |
| 39 | /* |
| 40 | * OMAP3xxx hardware module integration data |
| 41 | * |
| 42 | * ALl of the data in this section should be autogeneratable from the |
| 43 | * TI hardware database or other technical documentation. Data that |
| 44 | * is driver-specific or driver-kernel integration-specific belongs |
| 45 | * elsewhere. |
| 46 | */ |
| 47 | |
| 48 | static struct omap_hwmod omap3xxx_mpu_hwmod; |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 49 | static struct omap_hwmod omap3xxx_iva_hwmod; |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 50 | static struct omap_hwmod omap3xxx_l3_main_hwmod; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 51 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
| 52 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 53 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 54 | static struct omap_hwmod omap3430es1_dss_core_hwmod; |
| 55 | static struct omap_hwmod omap3xxx_dss_core_hwmod; |
| 56 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod; |
| 57 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; |
| 58 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; |
| 59 | static struct omap_hwmod omap3xxx_dss_venc_hwmod; |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 60 | static struct omap_hwmod omap3xxx_i2c1_hwmod; |
| 61 | static struct omap_hwmod omap3xxx_i2c2_hwmod; |
| 62 | static struct omap_hwmod omap3xxx_i2c3_hwmod; |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 63 | static struct omap_hwmod omap3xxx_gpio1_hwmod; |
| 64 | static struct omap_hwmod omap3xxx_gpio2_hwmod; |
| 65 | static struct omap_hwmod omap3xxx_gpio3_hwmod; |
| 66 | static struct omap_hwmod omap3xxx_gpio4_hwmod; |
| 67 | static struct omap_hwmod omap3xxx_gpio5_hwmod; |
| 68 | static struct omap_hwmod omap3xxx_gpio6_hwmod; |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 69 | static struct omap_hwmod omap34xx_sr1_hwmod; |
| 70 | static struct omap_hwmod omap34xx_sr2_hwmod; |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 71 | static struct omap_hwmod omap34xx_mcspi1; |
| 72 | static struct omap_hwmod omap34xx_mcspi2; |
| 73 | static struct omap_hwmod omap34xx_mcspi3; |
| 74 | static struct omap_hwmod omap34xx_mcspi4; |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 75 | static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod; |
| 76 | static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod; |
| 77 | static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod; |
| 78 | static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod; |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 79 | static struct omap_hwmod omap3xxx_mmc3_hwmod; |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 80 | static struct omap_hwmod am35xx_usbhsotg_hwmod; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 81 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 82 | static struct omap_hwmod omap3xxx_dma_system_hwmod; |
| 83 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 84 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod; |
| 85 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod; |
| 86 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod; |
| 87 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod; |
| 88 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod; |
| 89 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod; |
| 90 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod; |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 91 | static struct omap_hwmod omap3xxx_usb_host_hs_hwmod; |
| 92 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod; |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 93 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 94 | /* L3 -> L4_CORE interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 95 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
| 96 | .master = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 97 | .slave = &omap3xxx_l4_core_hwmod, |
| 98 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 99 | }; |
| 100 | |
| 101 | /* L3 -> L4_PER interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 102 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { |
| 103 | .master = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 104 | .slave = &omap3xxx_l4_per_hwmod, |
| 105 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 106 | }; |
| 107 | |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 108 | /* L3 taret configuration and error log registers */ |
| 109 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { |
| 110 | { .irq = INT_34XX_L3_DBG_IRQ }, |
| 111 | { .irq = INT_34XX_L3_APP_IRQ }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 112 | { .irq = -1 } |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 113 | }; |
| 114 | |
| 115 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { |
| 116 | { |
| 117 | .pa_start = 0x68000000, |
| 118 | .pa_end = 0x6800ffff, |
| 119 | .flags = ADDR_TYPE_RT, |
| 120 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 121 | { } |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 122 | }; |
| 123 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 124 | /* MPU -> L3 interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 125 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 126 | .master = &omap3xxx_mpu_hwmod, |
| 127 | .slave = &omap3xxx_l3_main_hwmod, |
| 128 | .addr = omap3xxx_l3_main_addrs, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 129 | .user = OCP_USER_MPU, |
| 130 | }; |
| 131 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 132 | /* DSS -> l3 */ |
Paul Walmsley | d69dc64 | 2012-04-19 04:03:52 -0600 | [diff] [blame] | 133 | static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { |
| 134 | .master = &omap3430es1_dss_core_hwmod, |
| 135 | .slave = &omap3xxx_l3_main_hwmod, |
| 136 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 137 | }; |
| 138 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 139 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { |
| 140 | .master = &omap3xxx_dss_core_hwmod, |
| 141 | .slave = &omap3xxx_l3_main_hwmod, |
| 142 | .fw = { |
| 143 | .omap2 = { |
| 144 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, |
| 145 | .flags = OMAP_FIREWALL_L3, |
| 146 | } |
| 147 | }, |
| 148 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 149 | }; |
| 150 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 151 | /* L3 */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 152 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 153 | .name = "l3_main", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 154 | .class = &l3_hwmod_class, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 155 | .mpu_irqs = omap3xxx_l3_main_irqs, |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 156 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 157 | }; |
| 158 | |
| 159 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 160 | static struct omap_hwmod omap3xxx_l4_sec_hwmod; |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 161 | static struct omap_hwmod omap3xxx_uart1_hwmod; |
| 162 | static struct omap_hwmod omap3xxx_uart2_hwmod; |
| 163 | static struct omap_hwmod omap3xxx_uart3_hwmod; |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 164 | static struct omap_hwmod omap36xx_uart4_hwmod; |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 165 | static struct omap_hwmod am35xx_uart4_hwmod; |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 166 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 167 | |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 168 | /* l3_core -> usbhsotg interface */ |
| 169 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { |
| 170 | .master = &omap3xxx_usbhsotg_hwmod, |
| 171 | .slave = &omap3xxx_l3_main_hwmod, |
| 172 | .clk = "core_l3_ick", |
| 173 | .user = OCP_USER_MPU, |
| 174 | }; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 175 | |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 176 | /* l3_core -> am35xx_usbhsotg interface */ |
| 177 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { |
| 178 | .master = &am35xx_usbhsotg_hwmod, |
| 179 | .slave = &omap3xxx_l3_main_hwmod, |
| 180 | .clk = "core_l3_ick", |
| 181 | .user = OCP_USER_MPU, |
| 182 | }; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 183 | /* L4_CORE -> L4_WKUP interface */ |
| 184 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
| 185 | .master = &omap3xxx_l4_core_hwmod, |
| 186 | .slave = &omap3xxx_l4_wkup_hwmod, |
| 187 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 188 | }; |
| 189 | |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 190 | /* L4 CORE -> MMC1 interface */ |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 191 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 192 | .master = &omap3xxx_l4_core_hwmod, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 193 | .slave = &omap3xxx_pre_es3_mmc1_hwmod, |
| 194 | .clk = "mmchs1_ick", |
| 195 | .addr = omap2430_mmc1_addr_space, |
| 196 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 197 | .flags = OMAP_FIREWALL_L4 |
| 198 | }; |
| 199 | |
| 200 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = { |
| 201 | .master = &omap3xxx_l4_core_hwmod, |
| 202 | .slave = &omap3xxx_es3plus_mmc1_hwmod, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 203 | .clk = "mmchs1_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 204 | .addr = omap2430_mmc1_addr_space, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 205 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 206 | .flags = OMAP_FIREWALL_L4 |
| 207 | }; |
| 208 | |
| 209 | /* L4 CORE -> MMC2 interface */ |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 210 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 211 | .master = &omap3xxx_l4_core_hwmod, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 212 | .slave = &omap3xxx_pre_es3_mmc2_hwmod, |
| 213 | .clk = "mmchs2_ick", |
| 214 | .addr = omap2430_mmc2_addr_space, |
| 215 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 216 | .flags = OMAP_FIREWALL_L4 |
| 217 | }; |
| 218 | |
| 219 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = { |
| 220 | .master = &omap3xxx_l4_core_hwmod, |
| 221 | .slave = &omap3xxx_es3plus_mmc2_hwmod, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 222 | .clk = "mmchs2_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 223 | .addr = omap2430_mmc2_addr_space, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 224 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 225 | .flags = OMAP_FIREWALL_L4 |
| 226 | }; |
| 227 | |
| 228 | /* L4 CORE -> MMC3 interface */ |
| 229 | static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { |
| 230 | { |
| 231 | .pa_start = 0x480ad000, |
| 232 | .pa_end = 0x480ad1ff, |
| 233 | .flags = ADDR_TYPE_RT, |
| 234 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 235 | { } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 236 | }; |
| 237 | |
| 238 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { |
| 239 | .master = &omap3xxx_l4_core_hwmod, |
| 240 | .slave = &omap3xxx_mmc3_hwmod, |
| 241 | .clk = "mmchs3_ick", |
| 242 | .addr = omap3xxx_mmc3_addr_space, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 243 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 244 | .flags = OMAP_FIREWALL_L4 |
| 245 | }; |
| 246 | |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 247 | /* L4 CORE -> UART1 interface */ |
| 248 | static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { |
| 249 | { |
| 250 | .pa_start = OMAP3_UART1_BASE, |
| 251 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, |
| 252 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
| 253 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 254 | { } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 255 | }; |
| 256 | |
| 257 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { |
| 258 | .master = &omap3xxx_l4_core_hwmod, |
| 259 | .slave = &omap3xxx_uart1_hwmod, |
| 260 | .clk = "uart1_ick", |
| 261 | .addr = omap3xxx_uart1_addr_space, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 262 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 263 | }; |
| 264 | |
| 265 | /* L4 CORE -> UART2 interface */ |
| 266 | static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = { |
| 267 | { |
| 268 | .pa_start = OMAP3_UART2_BASE, |
| 269 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, |
| 270 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
| 271 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 272 | { } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 273 | }; |
| 274 | |
| 275 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { |
| 276 | .master = &omap3xxx_l4_core_hwmod, |
| 277 | .slave = &omap3xxx_uart2_hwmod, |
| 278 | .clk = "uart2_ick", |
| 279 | .addr = omap3xxx_uart2_addr_space, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 280 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 281 | }; |
| 282 | |
| 283 | /* L4 PER -> UART3 interface */ |
| 284 | static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = { |
| 285 | { |
| 286 | .pa_start = OMAP3_UART3_BASE, |
| 287 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, |
| 288 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
| 289 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 290 | { } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { |
| 294 | .master = &omap3xxx_l4_per_hwmod, |
| 295 | .slave = &omap3xxx_uart3_hwmod, |
| 296 | .clk = "uart3_ick", |
| 297 | .addr = omap3xxx_uart3_addr_space, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 298 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 299 | }; |
| 300 | |
| 301 | /* L4 PER -> UART4 interface */ |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 302 | static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = { |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 303 | { |
| 304 | .pa_start = OMAP3_UART4_BASE, |
| 305 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, |
| 306 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
| 307 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 308 | { } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 309 | }; |
| 310 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 311 | static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = { |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 312 | .master = &omap3xxx_l4_per_hwmod, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 313 | .slave = &omap36xx_uart4_hwmod, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 314 | .clk = "uart4_ick", |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 315 | .addr = omap36xx_uart4_addr_space, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 316 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 317 | }; |
| 318 | |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 319 | /* AM35xx: L4 CORE -> UART4 interface */ |
| 320 | static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = { |
| 321 | { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 322 | .pa_start = OMAP3_UART4_AM35XX_BASE, |
| 323 | .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1, |
| 324 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 325 | }, |
| 326 | }; |
| 327 | |
| 328 | static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 329 | .master = &omap3xxx_l4_core_hwmod, |
| 330 | .slave = &am35xx_uart4_hwmod, |
| 331 | .clk = "uart4_ick", |
| 332 | .addr = am35xx_uart4_addr_space, |
| 333 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 334 | }; |
| 335 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 336 | /* L4 CORE -> I2C1 interface */ |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 337 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { |
| 338 | .master = &omap3xxx_l4_core_hwmod, |
| 339 | .slave = &omap3xxx_i2c1_hwmod, |
| 340 | .clk = "i2c1_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 341 | .addr = omap2_i2c1_addr_space, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 342 | .fw = { |
| 343 | .omap2 = { |
| 344 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, |
| 345 | .l4_prot_group = 7, |
| 346 | .flags = OMAP_FIREWALL_L4, |
| 347 | } |
| 348 | }, |
| 349 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 350 | }; |
| 351 | |
| 352 | /* L4 CORE -> I2C2 interface */ |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 353 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { |
| 354 | .master = &omap3xxx_l4_core_hwmod, |
| 355 | .slave = &omap3xxx_i2c2_hwmod, |
| 356 | .clk = "i2c2_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 357 | .addr = omap2_i2c2_addr_space, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 358 | .fw = { |
| 359 | .omap2 = { |
| 360 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, |
| 361 | .l4_prot_group = 7, |
| 362 | .flags = OMAP_FIREWALL_L4, |
| 363 | } |
| 364 | }, |
| 365 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 366 | }; |
| 367 | |
| 368 | /* L4 CORE -> I2C3 interface */ |
| 369 | static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { |
| 370 | { |
| 371 | .pa_start = 0x48060000, |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 372 | .pa_end = 0x48060000 + SZ_128 - 1, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 373 | .flags = ADDR_TYPE_RT, |
| 374 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 375 | { } |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 376 | }; |
| 377 | |
| 378 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { |
| 379 | .master = &omap3xxx_l4_core_hwmod, |
| 380 | .slave = &omap3xxx_i2c3_hwmod, |
| 381 | .clk = "i2c3_ick", |
| 382 | .addr = omap3xxx_i2c3_addr_space, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 383 | .fw = { |
| 384 | .omap2 = { |
| 385 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, |
| 386 | .l4_prot_group = 7, |
| 387 | .flags = OMAP_FIREWALL_L4, |
| 388 | } |
| 389 | }, |
| 390 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 391 | }; |
| 392 | |
Nishanth Menon | d62bc78 | 2012-02-29 23:33:43 +0100 | [diff] [blame] | 393 | static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { |
| 394 | { .irq = 18}, |
| 395 | { .irq = -1 } |
| 396 | }; |
| 397 | |
| 398 | static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { |
| 399 | { .irq = 19}, |
| 400 | { .irq = -1 } |
| 401 | }; |
| 402 | |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 403 | /* L4 CORE -> SR1 interface */ |
| 404 | static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = { |
| 405 | { |
| 406 | .pa_start = OMAP34XX_SR1_BASE, |
| 407 | .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, |
| 408 | .flags = ADDR_TYPE_RT, |
| 409 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 410 | { } |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 411 | }; |
| 412 | |
| 413 | static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { |
| 414 | .master = &omap3xxx_l4_core_hwmod, |
| 415 | .slave = &omap34xx_sr1_hwmod, |
| 416 | .clk = "sr_l4_ick", |
| 417 | .addr = omap3_sr1_addr_space, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 418 | .user = OCP_USER_MPU, |
| 419 | }; |
| 420 | |
| 421 | /* L4 CORE -> SR1 interface */ |
| 422 | static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = { |
| 423 | { |
| 424 | .pa_start = OMAP34XX_SR2_BASE, |
| 425 | .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, |
| 426 | .flags = ADDR_TYPE_RT, |
| 427 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 428 | { } |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 429 | }; |
| 430 | |
| 431 | static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { |
| 432 | .master = &omap3xxx_l4_core_hwmod, |
| 433 | .slave = &omap34xx_sr2_hwmod, |
| 434 | .clk = "sr_l4_ick", |
| 435 | .addr = omap3_sr2_addr_space, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 436 | .user = OCP_USER_MPU, |
| 437 | }; |
| 438 | |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 439 | /* |
| 440 | * usbhsotg interface data |
| 441 | */ |
| 442 | |
| 443 | static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { |
| 444 | { |
| 445 | .pa_start = OMAP34XX_HSUSB_OTG_BASE, |
| 446 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, |
| 447 | .flags = ADDR_TYPE_RT |
| 448 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 449 | { } |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 450 | }; |
| 451 | |
| 452 | /* l4_core -> usbhsotg */ |
| 453 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { |
| 454 | .master = &omap3xxx_l4_core_hwmod, |
| 455 | .slave = &omap3xxx_usbhsotg_hwmod, |
| 456 | .clk = "l4_ick", |
| 457 | .addr = omap3xxx_usbhsotg_addrs, |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 458 | .user = OCP_USER_MPU, |
| 459 | }; |
| 460 | |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 461 | static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { |
| 462 | { |
| 463 | .pa_start = AM35XX_IPSS_USBOTGSS_BASE, |
| 464 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, |
| 465 | .flags = ADDR_TYPE_RT |
| 466 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 467 | { } |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 468 | }; |
| 469 | |
| 470 | /* l4_core -> usbhsotg */ |
| 471 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { |
| 472 | .master = &omap3xxx_l4_core_hwmod, |
| 473 | .slave = &am35xx_usbhsotg_hwmod, |
| 474 | .clk = "l4_ick", |
| 475 | .addr = am35xx_usbhsotg_addrs, |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 476 | .user = OCP_USER_MPU, |
| 477 | }; |
| 478 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 479 | /* L4 CORE */ |
| 480 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 481 | .name = "l4_core", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 482 | .class = &l4_hwmod_class, |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 483 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 484 | }; |
| 485 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 486 | /* L4 PER */ |
| 487 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 488 | .name = "l4_per", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 489 | .class = &l4_hwmod_class, |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 490 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 491 | }; |
| 492 | |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 493 | /* L4_WKUP -> L4_SEC interface */ |
| 494 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = { |
| 495 | .master = &omap3xxx_l4_wkup_hwmod, |
| 496 | .slave = &omap3xxx_l4_sec_hwmod, |
| 497 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 498 | }; |
| 499 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 500 | /* L4 WKUP */ |
| 501 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { |
Benoit Cousson | fa98347 | 2010-07-26 16:34:29 -0600 | [diff] [blame] | 502 | .name = "l4_wkup", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 503 | .class = &l4_hwmod_class, |
Kevin Hilman | 2eb1875 | 2010-07-26 16:34:28 -0600 | [diff] [blame] | 504 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 505 | }; |
| 506 | |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 507 | /* L4 SEC */ |
| 508 | static struct omap_hwmod omap3xxx_l4_sec_hwmod = { |
| 509 | .name = "l4_sec", |
| 510 | .class = &l4_hwmod_class, |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 511 | .flags = HWMOD_NO_IDLEST, |
| 512 | }; |
| 513 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 514 | /* MPU */ |
| 515 | static struct omap_hwmod omap3xxx_mpu_hwmod = { |
Benoit Cousson | 5c2c029 | 2010-05-20 12:31:10 -0600 | [diff] [blame] | 516 | .name = "mpu", |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 517 | .class = &mpu_hwmod_class, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 518 | .main_clk = "arm_fck", |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 519 | }; |
| 520 | |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 521 | /* |
| 522 | * IVA2_2 interface data |
| 523 | */ |
| 524 | |
| 525 | /* IVA2 <- L3 interface */ |
| 526 | static struct omap_hwmod_ocp_if omap3xxx_l3__iva = { |
| 527 | .master = &omap3xxx_l3_main_hwmod, |
| 528 | .slave = &omap3xxx_iva_hwmod, |
| 529 | .clk = "iva2_ck", |
| 530 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 531 | }; |
| 532 | |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 533 | /* |
| 534 | * IVA2 (IVA2) |
| 535 | */ |
| 536 | |
| 537 | static struct omap_hwmod omap3xxx_iva_hwmod = { |
| 538 | .name = "iva", |
| 539 | .class = &iva_hwmod_class, |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 540 | }; |
| 541 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 542 | /* timer class */ |
| 543 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { |
| 544 | .rev_offs = 0x0000, |
| 545 | .sysc_offs = 0x0010, |
| 546 | .syss_offs = 0x0014, |
| 547 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 548 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 549 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE), |
| 550 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 551 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 552 | }; |
| 553 | |
| 554 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { |
| 555 | .name = "timer", |
| 556 | .sysc = &omap3xxx_timer_1ms_sysc, |
| 557 | .rev = OMAP_TIMER_IP_VERSION_1, |
| 558 | }; |
| 559 | |
| 560 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { |
| 561 | .rev_offs = 0x0000, |
| 562 | .sysc_offs = 0x0010, |
| 563 | .syss_offs = 0x0014, |
| 564 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
| 565 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 566 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 567 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 568 | }; |
| 569 | |
| 570 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { |
| 571 | .name = "timer", |
| 572 | .sysc = &omap3xxx_timer_sysc, |
| 573 | .rev = OMAP_TIMER_IP_VERSION_1, |
| 574 | }; |
| 575 | |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 576 | /* secure timers dev attribute */ |
| 577 | static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 578 | .timer_capability = OMAP_TIMER_SECURE, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 579 | }; |
| 580 | |
| 581 | /* always-on timers dev attribute */ |
| 582 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 583 | .timer_capability = OMAP_TIMER_ALWON, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 584 | }; |
| 585 | |
| 586 | /* pwm timers dev attribute */ |
| 587 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { |
| 588 | .timer_capability = OMAP_TIMER_HAS_PWM, |
| 589 | }; |
| 590 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 591 | /* timer1 */ |
| 592 | static struct omap_hwmod omap3xxx_timer1_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 593 | |
| 594 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { |
| 595 | { |
| 596 | .pa_start = 0x48318000, |
| 597 | .pa_end = 0x48318000 + SZ_1K - 1, |
| 598 | .flags = ADDR_TYPE_RT |
| 599 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 600 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 601 | }; |
| 602 | |
| 603 | /* l4_wkup -> timer1 */ |
| 604 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { |
| 605 | .master = &omap3xxx_l4_wkup_hwmod, |
| 606 | .slave = &omap3xxx_timer1_hwmod, |
| 607 | .clk = "gpt1_ick", |
| 608 | .addr = omap3xxx_timer1_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 609 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 610 | }; |
| 611 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 612 | /* timer1 hwmod */ |
| 613 | static struct omap_hwmod omap3xxx_timer1_hwmod = { |
| 614 | .name = "timer1", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 615 | .mpu_irqs = omap2_timer1_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 616 | .main_clk = "gpt1_fck", |
| 617 | .prcm = { |
| 618 | .omap2 = { |
| 619 | .prcm_reg_id = 1, |
| 620 | .module_bit = OMAP3430_EN_GPT1_SHIFT, |
| 621 | .module_offs = WKUP_MOD, |
| 622 | .idlest_reg_id = 1, |
| 623 | .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT, |
| 624 | }, |
| 625 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 626 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 627 | .class = &omap3xxx_timer_1ms_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 628 | }; |
| 629 | |
| 630 | /* timer2 */ |
| 631 | static struct omap_hwmod omap3xxx_timer2_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 632 | |
| 633 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { |
| 634 | { |
| 635 | .pa_start = 0x49032000, |
| 636 | .pa_end = 0x49032000 + SZ_1K - 1, |
| 637 | .flags = ADDR_TYPE_RT |
| 638 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 639 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 640 | }; |
| 641 | |
| 642 | /* l4_per -> timer2 */ |
| 643 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { |
| 644 | .master = &omap3xxx_l4_per_hwmod, |
| 645 | .slave = &omap3xxx_timer2_hwmod, |
| 646 | .clk = "gpt2_ick", |
| 647 | .addr = omap3xxx_timer2_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 648 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 649 | }; |
| 650 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 651 | /* timer2 hwmod */ |
| 652 | static struct omap_hwmod omap3xxx_timer2_hwmod = { |
| 653 | .name = "timer2", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 654 | .mpu_irqs = omap2_timer2_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 655 | .main_clk = "gpt2_fck", |
| 656 | .prcm = { |
| 657 | .omap2 = { |
| 658 | .prcm_reg_id = 1, |
| 659 | .module_bit = OMAP3430_EN_GPT2_SHIFT, |
| 660 | .module_offs = OMAP3430_PER_MOD, |
| 661 | .idlest_reg_id = 1, |
| 662 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, |
| 663 | }, |
| 664 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 665 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 666 | .class = &omap3xxx_timer_1ms_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 667 | }; |
| 668 | |
| 669 | /* timer3 */ |
| 670 | static struct omap_hwmod omap3xxx_timer3_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 671 | |
| 672 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { |
| 673 | { |
| 674 | .pa_start = 0x49034000, |
| 675 | .pa_end = 0x49034000 + SZ_1K - 1, |
| 676 | .flags = ADDR_TYPE_RT |
| 677 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 678 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 679 | }; |
| 680 | |
| 681 | /* l4_per -> timer3 */ |
| 682 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { |
| 683 | .master = &omap3xxx_l4_per_hwmod, |
| 684 | .slave = &omap3xxx_timer3_hwmod, |
| 685 | .clk = "gpt3_ick", |
| 686 | .addr = omap3xxx_timer3_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 687 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 688 | }; |
| 689 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 690 | /* timer3 hwmod */ |
| 691 | static struct omap_hwmod omap3xxx_timer3_hwmod = { |
| 692 | .name = "timer3", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 693 | .mpu_irqs = omap2_timer3_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 694 | .main_clk = "gpt3_fck", |
| 695 | .prcm = { |
| 696 | .omap2 = { |
| 697 | .prcm_reg_id = 1, |
| 698 | .module_bit = OMAP3430_EN_GPT3_SHIFT, |
| 699 | .module_offs = OMAP3430_PER_MOD, |
| 700 | .idlest_reg_id = 1, |
| 701 | .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT, |
| 702 | }, |
| 703 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 704 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 705 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 706 | }; |
| 707 | |
| 708 | /* timer4 */ |
| 709 | static struct omap_hwmod omap3xxx_timer4_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 710 | |
| 711 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { |
| 712 | { |
| 713 | .pa_start = 0x49036000, |
| 714 | .pa_end = 0x49036000 + SZ_1K - 1, |
| 715 | .flags = ADDR_TYPE_RT |
| 716 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 717 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 718 | }; |
| 719 | |
| 720 | /* l4_per -> timer4 */ |
| 721 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { |
| 722 | .master = &omap3xxx_l4_per_hwmod, |
| 723 | .slave = &omap3xxx_timer4_hwmod, |
| 724 | .clk = "gpt4_ick", |
| 725 | .addr = omap3xxx_timer4_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 726 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 727 | }; |
| 728 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 729 | /* timer4 hwmod */ |
| 730 | static struct omap_hwmod omap3xxx_timer4_hwmod = { |
| 731 | .name = "timer4", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 732 | .mpu_irqs = omap2_timer4_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 733 | .main_clk = "gpt4_fck", |
| 734 | .prcm = { |
| 735 | .omap2 = { |
| 736 | .prcm_reg_id = 1, |
| 737 | .module_bit = OMAP3430_EN_GPT4_SHIFT, |
| 738 | .module_offs = OMAP3430_PER_MOD, |
| 739 | .idlest_reg_id = 1, |
| 740 | .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT, |
| 741 | }, |
| 742 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 743 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 744 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 745 | }; |
| 746 | |
| 747 | /* timer5 */ |
| 748 | static struct omap_hwmod omap3xxx_timer5_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 749 | |
| 750 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { |
| 751 | { |
| 752 | .pa_start = 0x49038000, |
| 753 | .pa_end = 0x49038000 + SZ_1K - 1, |
| 754 | .flags = ADDR_TYPE_RT |
| 755 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 756 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 757 | }; |
| 758 | |
| 759 | /* l4_per -> timer5 */ |
| 760 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { |
| 761 | .master = &omap3xxx_l4_per_hwmod, |
| 762 | .slave = &omap3xxx_timer5_hwmod, |
| 763 | .clk = "gpt5_ick", |
| 764 | .addr = omap3xxx_timer5_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 765 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 766 | }; |
| 767 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 768 | /* timer5 hwmod */ |
| 769 | static struct omap_hwmod omap3xxx_timer5_hwmod = { |
| 770 | .name = "timer5", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 771 | .mpu_irqs = omap2_timer5_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 772 | .main_clk = "gpt5_fck", |
| 773 | .prcm = { |
| 774 | .omap2 = { |
| 775 | .prcm_reg_id = 1, |
| 776 | .module_bit = OMAP3430_EN_GPT5_SHIFT, |
| 777 | .module_offs = OMAP3430_PER_MOD, |
| 778 | .idlest_reg_id = 1, |
| 779 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, |
| 780 | }, |
| 781 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 782 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 783 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 784 | }; |
| 785 | |
| 786 | /* timer6 */ |
| 787 | static struct omap_hwmod omap3xxx_timer6_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 788 | |
| 789 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { |
| 790 | { |
| 791 | .pa_start = 0x4903A000, |
| 792 | .pa_end = 0x4903A000 + SZ_1K - 1, |
| 793 | .flags = ADDR_TYPE_RT |
| 794 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 795 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 796 | }; |
| 797 | |
| 798 | /* l4_per -> timer6 */ |
| 799 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { |
| 800 | .master = &omap3xxx_l4_per_hwmod, |
| 801 | .slave = &omap3xxx_timer6_hwmod, |
| 802 | .clk = "gpt6_ick", |
| 803 | .addr = omap3xxx_timer6_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 804 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 805 | }; |
| 806 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 807 | /* timer6 hwmod */ |
| 808 | static struct omap_hwmod omap3xxx_timer6_hwmod = { |
| 809 | .name = "timer6", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 810 | .mpu_irqs = omap2_timer6_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 811 | .main_clk = "gpt6_fck", |
| 812 | .prcm = { |
| 813 | .omap2 = { |
| 814 | .prcm_reg_id = 1, |
| 815 | .module_bit = OMAP3430_EN_GPT6_SHIFT, |
| 816 | .module_offs = OMAP3430_PER_MOD, |
| 817 | .idlest_reg_id = 1, |
| 818 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, |
| 819 | }, |
| 820 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 821 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 822 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 823 | }; |
| 824 | |
| 825 | /* timer7 */ |
| 826 | static struct omap_hwmod omap3xxx_timer7_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 827 | |
| 828 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { |
| 829 | { |
| 830 | .pa_start = 0x4903C000, |
| 831 | .pa_end = 0x4903C000 + SZ_1K - 1, |
| 832 | .flags = ADDR_TYPE_RT |
| 833 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 834 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 835 | }; |
| 836 | |
| 837 | /* l4_per -> timer7 */ |
| 838 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { |
| 839 | .master = &omap3xxx_l4_per_hwmod, |
| 840 | .slave = &omap3xxx_timer7_hwmod, |
| 841 | .clk = "gpt7_ick", |
| 842 | .addr = omap3xxx_timer7_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 843 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 844 | }; |
| 845 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 846 | /* timer7 hwmod */ |
| 847 | static struct omap_hwmod omap3xxx_timer7_hwmod = { |
| 848 | .name = "timer7", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 849 | .mpu_irqs = omap2_timer7_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 850 | .main_clk = "gpt7_fck", |
| 851 | .prcm = { |
| 852 | .omap2 = { |
| 853 | .prcm_reg_id = 1, |
| 854 | .module_bit = OMAP3430_EN_GPT7_SHIFT, |
| 855 | .module_offs = OMAP3430_PER_MOD, |
| 856 | .idlest_reg_id = 1, |
| 857 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, |
| 858 | }, |
| 859 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 860 | .dev_attr = &capability_alwon_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 861 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 862 | }; |
| 863 | |
| 864 | /* timer8 */ |
| 865 | static struct omap_hwmod omap3xxx_timer8_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 866 | |
| 867 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { |
| 868 | { |
| 869 | .pa_start = 0x4903E000, |
| 870 | .pa_end = 0x4903E000 + SZ_1K - 1, |
| 871 | .flags = ADDR_TYPE_RT |
| 872 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 873 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 874 | }; |
| 875 | |
| 876 | /* l4_per -> timer8 */ |
| 877 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { |
| 878 | .master = &omap3xxx_l4_per_hwmod, |
| 879 | .slave = &omap3xxx_timer8_hwmod, |
| 880 | .clk = "gpt8_ick", |
| 881 | .addr = omap3xxx_timer8_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 882 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 883 | }; |
| 884 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 885 | /* timer8 hwmod */ |
| 886 | static struct omap_hwmod omap3xxx_timer8_hwmod = { |
| 887 | .name = "timer8", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 888 | .mpu_irqs = omap2_timer8_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 889 | .main_clk = "gpt8_fck", |
| 890 | .prcm = { |
| 891 | .omap2 = { |
| 892 | .prcm_reg_id = 1, |
| 893 | .module_bit = OMAP3430_EN_GPT8_SHIFT, |
| 894 | .module_offs = OMAP3430_PER_MOD, |
| 895 | .idlest_reg_id = 1, |
| 896 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, |
| 897 | }, |
| 898 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 899 | .dev_attr = &capability_pwm_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 900 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 901 | }; |
| 902 | |
| 903 | /* timer9 */ |
| 904 | static struct omap_hwmod omap3xxx_timer9_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 905 | |
| 906 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { |
| 907 | { |
| 908 | .pa_start = 0x49040000, |
| 909 | .pa_end = 0x49040000 + SZ_1K - 1, |
| 910 | .flags = ADDR_TYPE_RT |
| 911 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 912 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 913 | }; |
| 914 | |
| 915 | /* l4_per -> timer9 */ |
| 916 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { |
| 917 | .master = &omap3xxx_l4_per_hwmod, |
| 918 | .slave = &omap3xxx_timer9_hwmod, |
| 919 | .clk = "gpt9_ick", |
| 920 | .addr = omap3xxx_timer9_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 921 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 922 | }; |
| 923 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 924 | /* timer9 hwmod */ |
| 925 | static struct omap_hwmod omap3xxx_timer9_hwmod = { |
| 926 | .name = "timer9", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 927 | .mpu_irqs = omap2_timer9_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 928 | .main_clk = "gpt9_fck", |
| 929 | .prcm = { |
| 930 | .omap2 = { |
| 931 | .prcm_reg_id = 1, |
| 932 | .module_bit = OMAP3430_EN_GPT9_SHIFT, |
| 933 | .module_offs = OMAP3430_PER_MOD, |
| 934 | .idlest_reg_id = 1, |
| 935 | .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT, |
| 936 | }, |
| 937 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 938 | .dev_attr = &capability_pwm_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 939 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 940 | }; |
| 941 | |
| 942 | /* timer10 */ |
| 943 | static struct omap_hwmod omap3xxx_timer10_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 944 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 945 | /* l4_core -> timer10 */ |
| 946 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { |
| 947 | .master = &omap3xxx_l4_core_hwmod, |
| 948 | .slave = &omap3xxx_timer10_hwmod, |
| 949 | .clk = "gpt10_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 950 | .addr = omap2_timer10_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 951 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 952 | }; |
| 953 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 954 | /* timer10 hwmod */ |
| 955 | static struct omap_hwmod omap3xxx_timer10_hwmod = { |
| 956 | .name = "timer10", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 957 | .mpu_irqs = omap2_timer10_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 958 | .main_clk = "gpt10_fck", |
| 959 | .prcm = { |
| 960 | .omap2 = { |
| 961 | .prcm_reg_id = 1, |
| 962 | .module_bit = OMAP3430_EN_GPT10_SHIFT, |
| 963 | .module_offs = CORE_MOD, |
| 964 | .idlest_reg_id = 1, |
| 965 | .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT, |
| 966 | }, |
| 967 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 968 | .dev_attr = &capability_pwm_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 969 | .class = &omap3xxx_timer_1ms_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 970 | }; |
| 971 | |
| 972 | /* timer11 */ |
| 973 | static struct omap_hwmod omap3xxx_timer11_hwmod; |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 974 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 975 | /* l4_core -> timer11 */ |
| 976 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { |
| 977 | .master = &omap3xxx_l4_core_hwmod, |
| 978 | .slave = &omap3xxx_timer11_hwmod, |
| 979 | .clk = "gpt11_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 980 | .addr = omap2_timer11_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 981 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 982 | }; |
| 983 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 984 | /* timer11 hwmod */ |
| 985 | static struct omap_hwmod omap3xxx_timer11_hwmod = { |
| 986 | .name = "timer11", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 987 | .mpu_irqs = omap2_timer11_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 988 | .main_clk = "gpt11_fck", |
| 989 | .prcm = { |
| 990 | .omap2 = { |
| 991 | .prcm_reg_id = 1, |
| 992 | .module_bit = OMAP3430_EN_GPT11_SHIFT, |
| 993 | .module_offs = CORE_MOD, |
| 994 | .idlest_reg_id = 1, |
| 995 | .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT, |
| 996 | }, |
| 997 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 998 | .dev_attr = &capability_pwm_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 999 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1000 | }; |
| 1001 | |
Paul Walmsley | bec9381 | 2012-04-19 04:03:50 -0600 | [diff] [blame] | 1002 | /* timer12 */ |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1003 | static struct omap_hwmod omap3xxx_timer12_hwmod; |
| 1004 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { |
| 1005 | { .irq = 95, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1006 | { .irq = -1 } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1007 | }; |
| 1008 | |
| 1009 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { |
| 1010 | { |
| 1011 | .pa_start = 0x48304000, |
| 1012 | .pa_end = 0x48304000 + SZ_1K - 1, |
| 1013 | .flags = ADDR_TYPE_RT |
| 1014 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1015 | { } |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1016 | }; |
| 1017 | |
| 1018 | /* l4_core -> timer12 */ |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 1019 | static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = { |
| 1020 | .master = &omap3xxx_l4_sec_hwmod, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1021 | .slave = &omap3xxx_timer12_hwmod, |
| 1022 | .clk = "gpt12_ick", |
| 1023 | .addr = omap3xxx_timer12_addrs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1024 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1025 | }; |
| 1026 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1027 | /* timer12 hwmod */ |
| 1028 | static struct omap_hwmod omap3xxx_timer12_hwmod = { |
| 1029 | .name = "timer12", |
| 1030 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1031 | .main_clk = "gpt12_fck", |
| 1032 | .prcm = { |
| 1033 | .omap2 = { |
| 1034 | .prcm_reg_id = 1, |
| 1035 | .module_bit = OMAP3430_EN_GPT12_SHIFT, |
| 1036 | .module_offs = WKUP_MOD, |
| 1037 | .idlest_reg_id = 1, |
| 1038 | .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT, |
| 1039 | }, |
| 1040 | }, |
Tarun Kanti DebBarma | c345c8b | 2011-09-20 17:00:18 +0530 | [diff] [blame] | 1041 | .dev_attr = &capability_secure_dev_attr, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1042 | .class = &omap3xxx_timer_hwmod_class, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 1043 | }; |
| 1044 | |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1045 | /* l4_wkup -> wd_timer2 */ |
| 1046 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { |
| 1047 | { |
| 1048 | .pa_start = 0x48314000, |
| 1049 | .pa_end = 0x4831407f, |
| 1050 | .flags = ADDR_TYPE_RT |
| 1051 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1052 | { } |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1053 | }; |
| 1054 | |
| 1055 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { |
| 1056 | .master = &omap3xxx_l4_wkup_hwmod, |
| 1057 | .slave = &omap3xxx_wd_timer2_hwmod, |
| 1058 | .clk = "wdt2_ick", |
| 1059 | .addr = omap3xxx_wd_timer2_addrs, |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1060 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1061 | }; |
| 1062 | |
| 1063 | /* |
| 1064 | * 'wd_timer' class |
| 1065 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
| 1066 | * overflow condition |
| 1067 | */ |
| 1068 | |
| 1069 | static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = { |
| 1070 | .rev_offs = 0x0000, |
| 1071 | .sysc_offs = 0x0010, |
| 1072 | .syss_offs = 0x0014, |
| 1073 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | |
| 1074 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 1075 | SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | |
| 1076 | SYSS_HAS_RESET_STATUS), |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1077 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1078 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1079 | }; |
| 1080 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1081 | /* I2C common */ |
| 1082 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 1083 | .rev_offs = 0x00, |
| 1084 | .sysc_offs = 0x20, |
| 1085 | .syss_offs = 0x10, |
| 1086 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 1087 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 1088 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1089 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
Shubhrajyoti D | 3e47dc6 | 2011-12-13 16:25:54 +0530 | [diff] [blame] | 1090 | .clockact = CLOCKACT_TEST_ICLK, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1091 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1092 | }; |
| 1093 | |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1094 | static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { |
Paul Walmsley | ff2516f | 2010-12-21 15:39:15 -0700 | [diff] [blame] | 1095 | .name = "wd_timer", |
| 1096 | .sysc = &omap3xxx_wd_timer_sysc, |
| 1097 | .pre_shutdown = &omap2_wd_timer_disable |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1098 | }; |
| 1099 | |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1100 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { |
| 1101 | .name = "wd_timer2", |
| 1102 | .class = &omap3xxx_wd_timer_hwmod_class, |
| 1103 | .main_clk = "wdt2_fck", |
| 1104 | .prcm = { |
| 1105 | .omap2 = { |
| 1106 | .prcm_reg_id = 1, |
| 1107 | .module_bit = OMAP3430_EN_WDT2_SHIFT, |
| 1108 | .module_offs = WKUP_MOD, |
| 1109 | .idlest_reg_id = 1, |
| 1110 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, |
| 1111 | }, |
| 1112 | }, |
Paul Walmsley | 2f4dd59 | 2011-03-10 22:40:06 -0700 | [diff] [blame] | 1113 | /* |
| 1114 | * XXX: Use software supervised mode, HW supervised smartidle seems to |
| 1115 | * block CORE power domain idle transitions. Maybe a HW bug in wdt2? |
| 1116 | */ |
| 1117 | .flags = HWMOD_SWSUP_SIDLE, |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 1118 | }; |
| 1119 | |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1120 | /* UART1 */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1121 | static struct omap_hwmod omap3xxx_uart1_hwmod = { |
| 1122 | .name = "uart1", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1123 | .mpu_irqs = omap2_uart1_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1124 | .sdma_reqs = omap2_uart1_sdma_reqs, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1125 | .main_clk = "uart1_fck", |
| 1126 | .prcm = { |
| 1127 | .omap2 = { |
| 1128 | .module_offs = CORE_MOD, |
| 1129 | .prcm_reg_id = 1, |
| 1130 | .module_bit = OMAP3430_EN_UART1_SHIFT, |
| 1131 | .idlest_reg_id = 1, |
| 1132 | .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, |
| 1133 | }, |
| 1134 | }, |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1135 | .class = &omap2_uart_class, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1136 | }; |
| 1137 | |
| 1138 | /* UART2 */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1139 | static struct omap_hwmod omap3xxx_uart2_hwmod = { |
| 1140 | .name = "uart2", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1141 | .mpu_irqs = omap2_uart2_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1142 | .sdma_reqs = omap2_uart2_sdma_reqs, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1143 | .main_clk = "uart2_fck", |
| 1144 | .prcm = { |
| 1145 | .omap2 = { |
| 1146 | .module_offs = CORE_MOD, |
| 1147 | .prcm_reg_id = 1, |
| 1148 | .module_bit = OMAP3430_EN_UART2_SHIFT, |
| 1149 | .idlest_reg_id = 1, |
| 1150 | .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, |
| 1151 | }, |
| 1152 | }, |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1153 | .class = &omap2_uart_class, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1154 | }; |
| 1155 | |
| 1156 | /* UART3 */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1157 | static struct omap_hwmod omap3xxx_uart3_hwmod = { |
| 1158 | .name = "uart3", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1159 | .mpu_irqs = omap2_uart3_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1160 | .sdma_reqs = omap2_uart3_sdma_reqs, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1161 | .main_clk = "uart3_fck", |
| 1162 | .prcm = { |
| 1163 | .omap2 = { |
| 1164 | .module_offs = OMAP3430_PER_MOD, |
| 1165 | .prcm_reg_id = 1, |
| 1166 | .module_bit = OMAP3430_EN_UART3_SHIFT, |
| 1167 | .idlest_reg_id = 1, |
| 1168 | .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, |
| 1169 | }, |
| 1170 | }, |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1171 | .class = &omap2_uart_class, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1172 | }; |
| 1173 | |
| 1174 | /* UART4 */ |
| 1175 | |
| 1176 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { |
| 1177 | { .irq = INT_36XX_UART4_IRQ, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1178 | { .irq = -1 } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1179 | }; |
| 1180 | |
| 1181 | static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { |
| 1182 | { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, |
| 1183 | { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1184 | { .dma_req = -1 } |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1185 | }; |
| 1186 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 1187 | static struct omap_hwmod omap36xx_uart4_hwmod = { |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1188 | .name = "uart4", |
| 1189 | .mpu_irqs = uart4_mpu_irqs, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1190 | .sdma_reqs = uart4_sdma_reqs, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1191 | .main_clk = "uart4_fck", |
| 1192 | .prcm = { |
| 1193 | .omap2 = { |
| 1194 | .module_offs = OMAP3430_PER_MOD, |
| 1195 | .prcm_reg_id = 1, |
| 1196 | .module_bit = OMAP3630_EN_UART4_SHIFT, |
| 1197 | .idlest_reg_id = 1, |
| 1198 | .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, |
| 1199 | }, |
| 1200 | }, |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1201 | .class = &omap2_uart_class, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1202 | }; |
| 1203 | |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1204 | static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { |
| 1205 | { .irq = INT_35XX_UART4_IRQ, }, |
| 1206 | }; |
| 1207 | |
| 1208 | static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { |
| 1209 | { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, }, |
| 1210 | { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, |
| 1211 | }; |
| 1212 | |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1213 | static struct omap_hwmod am35xx_uart4_hwmod = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 1214 | .name = "uart4", |
| 1215 | .mpu_irqs = am35xx_uart4_mpu_irqs, |
| 1216 | .sdma_reqs = am35xx_uart4_sdma_reqs, |
| 1217 | .main_clk = "uart4_fck", |
| 1218 | .prcm = { |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1219 | .omap2 = { |
| 1220 | .module_offs = CORE_MOD, |
| 1221 | .prcm_reg_id = 1, |
| 1222 | .module_bit = OMAP3430_EN_UART4_SHIFT, |
| 1223 | .idlest_reg_id = 1, |
| 1224 | .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, |
| 1225 | }, |
| 1226 | }, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 1227 | .class = &omap2_uart_class, |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1228 | }; |
| 1229 | |
| 1230 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1231 | static struct omap_hwmod_class i2c_class = { |
Avinash.H.M | 6d3c55f | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 1232 | .name = "i2c", |
| 1233 | .sysc = &i2c_sysc, |
| 1234 | .rev = OMAP_I2C_IP_VERSION_1, |
| 1235 | .reset = &omap_i2c_reset, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1236 | }; |
| 1237 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1238 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { |
| 1239 | { .name = "dispc", .dma_req = 5 }, |
| 1240 | { .name = "dsi1", .dma_req = 74 }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1241 | { .dma_req = -1 } |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1242 | }; |
| 1243 | |
| 1244 | /* dss */ |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1245 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1246 | /* l4_core -> dss */ |
| 1247 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { |
| 1248 | .master = &omap3xxx_l4_core_hwmod, |
| 1249 | .slave = &omap3430es1_dss_core_hwmod, |
| 1250 | .clk = "dss_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1251 | .addr = omap2_dss_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1252 | .fw = { |
| 1253 | .omap2 = { |
| 1254 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, |
| 1255 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 1256 | .flags = OMAP_FIREWALL_L4, |
| 1257 | } |
| 1258 | }, |
| 1259 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1260 | }; |
| 1261 | |
| 1262 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { |
| 1263 | .master = &omap3xxx_l4_core_hwmod, |
| 1264 | .slave = &omap3xxx_dss_core_hwmod, |
| 1265 | .clk = "dss_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1266 | .addr = omap2_dss_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1267 | .fw = { |
| 1268 | .omap2 = { |
| 1269 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, |
| 1270 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 1271 | .flags = OMAP_FIREWALL_L4, |
| 1272 | } |
| 1273 | }, |
| 1274 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1275 | }; |
| 1276 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1277 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
Tomi Valkeinen | 8c3105c | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1278 | /* |
| 1279 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core |
| 1280 | * driver does not use these clocks. |
| 1281 | */ |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1282 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
Tomi Valkeinen | 8c3105c | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1283 | { .role = "tv_clk", .clk = "dss_tv_fck" }, |
| 1284 | /* required only on OMAP3430 */ |
| 1285 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1286 | }; |
| 1287 | |
| 1288 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { |
| 1289 | .name = "dss_core", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1290 | .class = &omap2_dss_hwmod_class, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1291 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1292 | .sdma_reqs = omap3xxx_dss_sdma_chs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1293 | .prcm = { |
| 1294 | .omap2 = { |
| 1295 | .prcm_reg_id = 1, |
| 1296 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1297 | .module_offs = OMAP3430_DSS_MOD, |
| 1298 | .idlest_reg_id = 1, |
| 1299 | .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT, |
| 1300 | }, |
| 1301 | }, |
| 1302 | .opt_clks = dss_opt_clks, |
| 1303 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
Tomi Valkeinen | 8c3105c | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1304 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1305 | }; |
| 1306 | |
| 1307 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { |
| 1308 | .name = "dss_core", |
Tomi Valkeinen | 8c3105c | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1309 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1310 | .class = &omap2_dss_hwmod_class, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1311 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1312 | .sdma_reqs = omap3xxx_dss_sdma_chs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1313 | .prcm = { |
| 1314 | .omap2 = { |
| 1315 | .prcm_reg_id = 1, |
| 1316 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1317 | .module_offs = OMAP3430_DSS_MOD, |
| 1318 | .idlest_reg_id = 1, |
| 1319 | .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT, |
| 1320 | .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT, |
| 1321 | }, |
| 1322 | }, |
| 1323 | .opt_clks = dss_opt_clks, |
| 1324 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1325 | }; |
| 1326 | |
Tomi Valkeinen | 1ac6d46 | 2012-01-23 14:15:28 +0200 | [diff] [blame] | 1327 | /* |
| 1328 | * 'dispc' class |
| 1329 | * display controller |
| 1330 | */ |
| 1331 | |
| 1332 | static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = { |
| 1333 | .rev_offs = 0x0000, |
| 1334 | .sysc_offs = 0x0010, |
| 1335 | .syss_offs = 0x0014, |
| 1336 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | |
Tomi Valkeinen | b0a85fa | 2012-01-23 14:15:29 +0200 | [diff] [blame] | 1337 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 1338 | SYSC_HAS_ENAWAKEUP), |
Tomi Valkeinen | 1ac6d46 | 2012-01-23 14:15:28 +0200 | [diff] [blame] | 1339 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1340 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1341 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1342 | }; |
| 1343 | |
| 1344 | static struct omap_hwmod_class omap3_dispc_hwmod_class = { |
| 1345 | .name = "dispc", |
| 1346 | .sysc = &omap3_dispc_sysc, |
| 1347 | }; |
| 1348 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1349 | /* l4_core -> dss_dispc */ |
| 1350 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { |
| 1351 | .master = &omap3xxx_l4_core_hwmod, |
| 1352 | .slave = &omap3xxx_dss_dispc_hwmod, |
| 1353 | .clk = "dss_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1354 | .addr = omap2_dss_dispc_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1355 | .fw = { |
| 1356 | .omap2 = { |
| 1357 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, |
| 1358 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 1359 | .flags = OMAP_FIREWALL_L4, |
| 1360 | } |
| 1361 | }, |
| 1362 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1363 | }; |
| 1364 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1365 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { |
| 1366 | .name = "dss_dispc", |
Tomi Valkeinen | 1ac6d46 | 2012-01-23 14:15:28 +0200 | [diff] [blame] | 1367 | .class = &omap3_dispc_hwmod_class, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1368 | .mpu_irqs = omap2_dispc_irqs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1369 | .main_clk = "dss1_alwon_fck", |
| 1370 | .prcm = { |
| 1371 | .omap2 = { |
| 1372 | .prcm_reg_id = 1, |
| 1373 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1374 | .module_offs = OMAP3430_DSS_MOD, |
| 1375 | }, |
| 1376 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1377 | .flags = HWMOD_NO_IDLEST, |
Archit Taneja | b923d40 | 2011-10-06 18:04:08 -0600 | [diff] [blame] | 1378 | .dev_attr = &omap2_3_dss_dispc_dev_attr |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1379 | }; |
| 1380 | |
| 1381 | /* |
| 1382 | * 'dsi' class |
| 1383 | * display serial interface controller |
| 1384 | */ |
| 1385 | |
| 1386 | static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { |
| 1387 | .name = "dsi", |
| 1388 | }; |
| 1389 | |
archit taneja | affe360 | 2011-02-23 08:41:03 +0000 | [diff] [blame] | 1390 | static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { |
| 1391 | { .irq = 25 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1392 | { .irq = -1 } |
archit taneja | affe360 | 2011-02-23 08:41:03 +0000 | [diff] [blame] | 1393 | }; |
| 1394 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1395 | /* dss_dsi1 */ |
| 1396 | static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { |
| 1397 | { |
| 1398 | .pa_start = 0x4804FC00, |
| 1399 | .pa_end = 0x4804FFFF, |
| 1400 | .flags = ADDR_TYPE_RT |
| 1401 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1402 | { } |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1403 | }; |
| 1404 | |
| 1405 | /* l4_core -> dss_dsi1 */ |
| 1406 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { |
| 1407 | .master = &omap3xxx_l4_core_hwmod, |
| 1408 | .slave = &omap3xxx_dss_dsi1_hwmod, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1409 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1410 | .addr = omap3xxx_dss_dsi1_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1411 | .fw = { |
| 1412 | .omap2 = { |
| 1413 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, |
| 1414 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 1415 | .flags = OMAP_FIREWALL_L4, |
| 1416 | } |
| 1417 | }, |
| 1418 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1419 | }; |
| 1420 | |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1421 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { |
| 1422 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
| 1423 | }; |
| 1424 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1425 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { |
| 1426 | .name = "dss_dsi1", |
| 1427 | .class = &omap3xxx_dsi_hwmod_class, |
archit taneja | affe360 | 2011-02-23 08:41:03 +0000 | [diff] [blame] | 1428 | .mpu_irqs = omap3xxx_dsi1_irqs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1429 | .main_clk = "dss1_alwon_fck", |
| 1430 | .prcm = { |
| 1431 | .omap2 = { |
| 1432 | .prcm_reg_id = 1, |
| 1433 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1434 | .module_offs = OMAP3430_DSS_MOD, |
| 1435 | }, |
| 1436 | }, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1437 | .opt_clks = dss_dsi1_opt_clks, |
| 1438 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1439 | .flags = HWMOD_NO_IDLEST, |
| 1440 | }; |
| 1441 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1442 | /* l4_core -> dss_rfbi */ |
| 1443 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { |
| 1444 | .master = &omap3xxx_l4_core_hwmod, |
| 1445 | .slave = &omap3xxx_dss_rfbi_hwmod, |
| 1446 | .clk = "dss_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1447 | .addr = omap2_dss_rfbi_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1448 | .fw = { |
| 1449 | .omap2 = { |
| 1450 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, |
| 1451 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , |
| 1452 | .flags = OMAP_FIREWALL_L4, |
| 1453 | } |
| 1454 | }, |
| 1455 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1456 | }; |
| 1457 | |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1458 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { |
| 1459 | { .role = "ick", .clk = "dss_ick" }, |
| 1460 | }; |
| 1461 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1462 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { |
| 1463 | .name = "dss_rfbi", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1464 | .class = &omap2_rfbi_hwmod_class, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1465 | .main_clk = "dss1_alwon_fck", |
| 1466 | .prcm = { |
| 1467 | .omap2 = { |
| 1468 | .prcm_reg_id = 1, |
| 1469 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1470 | .module_offs = OMAP3430_DSS_MOD, |
| 1471 | }, |
| 1472 | }, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1473 | .opt_clks = dss_rfbi_opt_clks, |
| 1474 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1475 | .flags = HWMOD_NO_IDLEST, |
| 1476 | }; |
| 1477 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1478 | /* l4_core -> dss_venc */ |
| 1479 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { |
| 1480 | .master = &omap3xxx_l4_core_hwmod, |
| 1481 | .slave = &omap3xxx_dss_venc_hwmod, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1482 | .clk = "dss_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1483 | .addr = omap2_dss_venc_addrs, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1484 | .fw = { |
| 1485 | .omap2 = { |
| 1486 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, |
| 1487 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 1488 | .flags = OMAP_FIREWALL_L4, |
| 1489 | } |
| 1490 | }, |
| 1491 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1492 | }; |
| 1493 | |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1494 | static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { |
| 1495 | /* required only on OMAP3430 */ |
| 1496 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, |
| 1497 | }; |
| 1498 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1499 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { |
| 1500 | .name = "dss_venc", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 1501 | .class = &omap2_venc_hwmod_class, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1502 | .main_clk = "dss_tv_fck", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1503 | .prcm = { |
| 1504 | .omap2 = { |
| 1505 | .prcm_reg_id = 1, |
| 1506 | .module_bit = OMAP3430_EN_DSS1_SHIFT, |
| 1507 | .module_offs = OMAP3430_DSS_MOD, |
| 1508 | }, |
| 1509 | }, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 1510 | .opt_clks = dss_venc_opt_clks, |
| 1511 | .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1512 | .flags = HWMOD_NO_IDLEST, |
| 1513 | }; |
| 1514 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1515 | /* I2C1 */ |
| 1516 | |
| 1517 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
| 1518 | .fifo_depth = 8, /* bytes */ |
Andy Green | 4d4441a | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 1519 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
| 1520 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | |
| 1521 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1522 | }; |
| 1523 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1524 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { |
| 1525 | .name = "i2c1", |
Shubhrajyoti D | 3e47dc6 | 2011-12-13 16:25:54 +0530 | [diff] [blame] | 1526 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1527 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1528 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1529 | .main_clk = "i2c1_fck", |
| 1530 | .prcm = { |
| 1531 | .omap2 = { |
| 1532 | .module_offs = CORE_MOD, |
| 1533 | .prcm_reg_id = 1, |
| 1534 | .module_bit = OMAP3430_EN_I2C1_SHIFT, |
| 1535 | .idlest_reg_id = 1, |
| 1536 | .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, |
| 1537 | }, |
| 1538 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1539 | .class = &i2c_class, |
| 1540 | .dev_attr = &i2c1_dev_attr, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1541 | }; |
| 1542 | |
| 1543 | /* I2C2 */ |
| 1544 | |
| 1545 | static struct omap_i2c_dev_attr i2c2_dev_attr = { |
| 1546 | .fifo_depth = 8, /* bytes */ |
Andy Green | 4d4441a | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 1547 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
| 1548 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | |
| 1549 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1550 | }; |
| 1551 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1552 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { |
| 1553 | .name = "i2c2", |
Shubhrajyoti D | 3e47dc6 | 2011-12-13 16:25:54 +0530 | [diff] [blame] | 1554 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1555 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1556 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1557 | .main_clk = "i2c2_fck", |
| 1558 | .prcm = { |
| 1559 | .omap2 = { |
| 1560 | .module_offs = CORE_MOD, |
| 1561 | .prcm_reg_id = 1, |
| 1562 | .module_bit = OMAP3430_EN_I2C2_SHIFT, |
| 1563 | .idlest_reg_id = 1, |
| 1564 | .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, |
| 1565 | }, |
| 1566 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1567 | .class = &i2c_class, |
| 1568 | .dev_attr = &i2c2_dev_attr, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1569 | }; |
| 1570 | |
| 1571 | /* I2C3 */ |
| 1572 | |
| 1573 | static struct omap_i2c_dev_attr i2c3_dev_attr = { |
| 1574 | .fifo_depth = 64, /* bytes */ |
Andy Green | 4d4441a | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 1575 | .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 | |
| 1576 | OMAP_I2C_FLAG_RESET_REGS_POSTIDLE | |
| 1577 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1578 | }; |
| 1579 | |
| 1580 | static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { |
| 1581 | { .irq = INT_34XX_I2C3_IRQ, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1582 | { .irq = -1 } |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1583 | }; |
| 1584 | |
| 1585 | static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { |
| 1586 | { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX }, |
| 1587 | { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1588 | { .dma_req = -1 } |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1589 | }; |
| 1590 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1591 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { |
| 1592 | .name = "i2c3", |
Shubhrajyoti D | 3e47dc6 | 2011-12-13 16:25:54 +0530 | [diff] [blame] | 1593 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1594 | .mpu_irqs = i2c3_mpu_irqs, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1595 | .sdma_reqs = i2c3_sdma_reqs, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1596 | .main_clk = "i2c3_fck", |
| 1597 | .prcm = { |
| 1598 | .omap2 = { |
| 1599 | .module_offs = CORE_MOD, |
| 1600 | .prcm_reg_id = 1, |
| 1601 | .module_bit = OMAP3430_EN_I2C3_SHIFT, |
| 1602 | .idlest_reg_id = 1, |
| 1603 | .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, |
| 1604 | }, |
| 1605 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1606 | .class = &i2c_class, |
| 1607 | .dev_attr = &i2c3_dev_attr, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1608 | }; |
| 1609 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1610 | /* l4_wkup -> gpio1 */ |
| 1611 | static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = { |
| 1612 | { |
| 1613 | .pa_start = 0x48310000, |
| 1614 | .pa_end = 0x483101ff, |
| 1615 | .flags = ADDR_TYPE_RT |
| 1616 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1617 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1618 | }; |
| 1619 | |
| 1620 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { |
| 1621 | .master = &omap3xxx_l4_wkup_hwmod, |
| 1622 | .slave = &omap3xxx_gpio1_hwmod, |
| 1623 | .addr = omap3xxx_gpio1_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1624 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1625 | }; |
| 1626 | |
| 1627 | /* l4_per -> gpio2 */ |
| 1628 | static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = { |
| 1629 | { |
| 1630 | .pa_start = 0x49050000, |
| 1631 | .pa_end = 0x490501ff, |
| 1632 | .flags = ADDR_TYPE_RT |
| 1633 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1634 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1635 | }; |
| 1636 | |
| 1637 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { |
| 1638 | .master = &omap3xxx_l4_per_hwmod, |
| 1639 | .slave = &omap3xxx_gpio2_hwmod, |
| 1640 | .addr = omap3xxx_gpio2_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1641 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1642 | }; |
| 1643 | |
| 1644 | /* l4_per -> gpio3 */ |
| 1645 | static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = { |
| 1646 | { |
| 1647 | .pa_start = 0x49052000, |
| 1648 | .pa_end = 0x490521ff, |
| 1649 | .flags = ADDR_TYPE_RT |
| 1650 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1651 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1652 | }; |
| 1653 | |
| 1654 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { |
| 1655 | .master = &omap3xxx_l4_per_hwmod, |
| 1656 | .slave = &omap3xxx_gpio3_hwmod, |
| 1657 | .addr = omap3xxx_gpio3_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1658 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1659 | }; |
| 1660 | |
| 1661 | /* l4_per -> gpio4 */ |
| 1662 | static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { |
| 1663 | { |
| 1664 | .pa_start = 0x49054000, |
| 1665 | .pa_end = 0x490541ff, |
| 1666 | .flags = ADDR_TYPE_RT |
| 1667 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1668 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1669 | }; |
| 1670 | |
| 1671 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { |
| 1672 | .master = &omap3xxx_l4_per_hwmod, |
| 1673 | .slave = &omap3xxx_gpio4_hwmod, |
| 1674 | .addr = omap3xxx_gpio4_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1675 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1676 | }; |
| 1677 | |
| 1678 | /* l4_per -> gpio5 */ |
| 1679 | static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = { |
| 1680 | { |
| 1681 | .pa_start = 0x49056000, |
| 1682 | .pa_end = 0x490561ff, |
| 1683 | .flags = ADDR_TYPE_RT |
| 1684 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1685 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1686 | }; |
| 1687 | |
| 1688 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { |
| 1689 | .master = &omap3xxx_l4_per_hwmod, |
| 1690 | .slave = &omap3xxx_gpio5_hwmod, |
| 1691 | .addr = omap3xxx_gpio5_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1692 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1693 | }; |
| 1694 | |
| 1695 | /* l4_per -> gpio6 */ |
| 1696 | static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = { |
| 1697 | { |
| 1698 | .pa_start = 0x49058000, |
| 1699 | .pa_end = 0x490581ff, |
| 1700 | .flags = ADDR_TYPE_RT |
| 1701 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1702 | { } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1703 | }; |
| 1704 | |
| 1705 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { |
| 1706 | .master = &omap3xxx_l4_per_hwmod, |
| 1707 | .slave = &omap3xxx_gpio6_hwmod, |
| 1708 | .addr = omap3xxx_gpio6_addrs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1709 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1710 | }; |
| 1711 | |
| 1712 | /* |
| 1713 | * 'gpio' class |
| 1714 | * general purpose io module |
| 1715 | */ |
| 1716 | |
| 1717 | static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = { |
| 1718 | .rev_offs = 0x0000, |
| 1719 | .sysc_offs = 0x0010, |
| 1720 | .syss_offs = 0x0014, |
| 1721 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 1722 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 1723 | SYSS_HAS_RESET_STATUS), |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1724 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1725 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1726 | }; |
| 1727 | |
| 1728 | static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = { |
| 1729 | .name = "gpio", |
| 1730 | .sysc = &omap3xxx_gpio_sysc, |
| 1731 | .rev = 1, |
| 1732 | }; |
| 1733 | |
| 1734 | /* gpio_dev_attr*/ |
| 1735 | static struct omap_gpio_dev_attr gpio_dev_attr = { |
| 1736 | .bank_width = 32, |
| 1737 | .dbck_flag = true, |
| 1738 | }; |
| 1739 | |
| 1740 | /* gpio1 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1741 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
| 1742 | { .role = "dbclk", .clk = "gpio1_dbck", }, |
| 1743 | }; |
| 1744 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1745 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { |
| 1746 | .name = "gpio1", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1747 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1748 | .mpu_irqs = omap2_gpio1_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1749 | .main_clk = "gpio1_ick", |
| 1750 | .opt_clks = gpio1_opt_clks, |
| 1751 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
| 1752 | .prcm = { |
| 1753 | .omap2 = { |
| 1754 | .prcm_reg_id = 1, |
| 1755 | .module_bit = OMAP3430_EN_GPIO1_SHIFT, |
| 1756 | .module_offs = WKUP_MOD, |
| 1757 | .idlest_reg_id = 1, |
| 1758 | .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, |
| 1759 | }, |
| 1760 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1761 | .class = &omap3xxx_gpio_hwmod_class, |
| 1762 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1763 | }; |
| 1764 | |
| 1765 | /* gpio2 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1766 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
| 1767 | { .role = "dbclk", .clk = "gpio2_dbck", }, |
| 1768 | }; |
| 1769 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1770 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { |
| 1771 | .name = "gpio2", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1772 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1773 | .mpu_irqs = omap2_gpio2_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1774 | .main_clk = "gpio2_ick", |
| 1775 | .opt_clks = gpio2_opt_clks, |
| 1776 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
| 1777 | .prcm = { |
| 1778 | .omap2 = { |
| 1779 | .prcm_reg_id = 1, |
| 1780 | .module_bit = OMAP3430_EN_GPIO2_SHIFT, |
| 1781 | .module_offs = OMAP3430_PER_MOD, |
| 1782 | .idlest_reg_id = 1, |
| 1783 | .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, |
| 1784 | }, |
| 1785 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1786 | .class = &omap3xxx_gpio_hwmod_class, |
| 1787 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1788 | }; |
| 1789 | |
| 1790 | /* gpio3 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1791 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
| 1792 | { .role = "dbclk", .clk = "gpio3_dbck", }, |
| 1793 | }; |
| 1794 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1795 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { |
| 1796 | .name = "gpio3", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1797 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1798 | .mpu_irqs = omap2_gpio3_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1799 | .main_clk = "gpio3_ick", |
| 1800 | .opt_clks = gpio3_opt_clks, |
| 1801 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
| 1802 | .prcm = { |
| 1803 | .omap2 = { |
| 1804 | .prcm_reg_id = 1, |
| 1805 | .module_bit = OMAP3430_EN_GPIO3_SHIFT, |
| 1806 | .module_offs = OMAP3430_PER_MOD, |
| 1807 | .idlest_reg_id = 1, |
| 1808 | .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, |
| 1809 | }, |
| 1810 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1811 | .class = &omap3xxx_gpio_hwmod_class, |
| 1812 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1813 | }; |
| 1814 | |
| 1815 | /* gpio4 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1816 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { |
| 1817 | { .role = "dbclk", .clk = "gpio4_dbck", }, |
| 1818 | }; |
| 1819 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1820 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { |
| 1821 | .name = "gpio4", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1822 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1823 | .mpu_irqs = omap2_gpio4_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1824 | .main_clk = "gpio4_ick", |
| 1825 | .opt_clks = gpio4_opt_clks, |
| 1826 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), |
| 1827 | .prcm = { |
| 1828 | .omap2 = { |
| 1829 | .prcm_reg_id = 1, |
| 1830 | .module_bit = OMAP3430_EN_GPIO4_SHIFT, |
| 1831 | .module_offs = OMAP3430_PER_MOD, |
| 1832 | .idlest_reg_id = 1, |
| 1833 | .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, |
| 1834 | }, |
| 1835 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1836 | .class = &omap3xxx_gpio_hwmod_class, |
| 1837 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1838 | }; |
| 1839 | |
| 1840 | /* gpio5 */ |
| 1841 | static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { |
| 1842 | { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1843 | { .irq = -1 } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1844 | }; |
| 1845 | |
| 1846 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { |
| 1847 | { .role = "dbclk", .clk = "gpio5_dbck", }, |
| 1848 | }; |
| 1849 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1850 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { |
| 1851 | .name = "gpio5", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1852 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1853 | .mpu_irqs = omap3xxx_gpio5_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1854 | .main_clk = "gpio5_ick", |
| 1855 | .opt_clks = gpio5_opt_clks, |
| 1856 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), |
| 1857 | .prcm = { |
| 1858 | .omap2 = { |
| 1859 | .prcm_reg_id = 1, |
| 1860 | .module_bit = OMAP3430_EN_GPIO5_SHIFT, |
| 1861 | .module_offs = OMAP3430_PER_MOD, |
| 1862 | .idlest_reg_id = 1, |
| 1863 | .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, |
| 1864 | }, |
| 1865 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1866 | .class = &omap3xxx_gpio_hwmod_class, |
| 1867 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1868 | }; |
| 1869 | |
| 1870 | /* gpio6 */ |
| 1871 | static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { |
| 1872 | { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1873 | { .irq = -1 } |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1874 | }; |
| 1875 | |
| 1876 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { |
| 1877 | { .role = "dbclk", .clk = "gpio6_dbck", }, |
| 1878 | }; |
| 1879 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1880 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { |
| 1881 | .name = "gpio6", |
Avinash.H.M | f95440c | 2011-04-05 21:10:15 +0530 | [diff] [blame] | 1882 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1883 | .mpu_irqs = omap3xxx_gpio6_irqs, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1884 | .main_clk = "gpio6_ick", |
| 1885 | .opt_clks = gpio6_opt_clks, |
| 1886 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), |
| 1887 | .prcm = { |
| 1888 | .omap2 = { |
| 1889 | .prcm_reg_id = 1, |
| 1890 | .module_bit = OMAP3430_EN_GPIO6_SHIFT, |
| 1891 | .module_offs = OMAP3430_PER_MOD, |
| 1892 | .idlest_reg_id = 1, |
| 1893 | .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, |
| 1894 | }, |
| 1895 | }, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1896 | .class = &omap3xxx_gpio_hwmod_class, |
| 1897 | .dev_attr = &gpio_dev_attr, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 1898 | }; |
| 1899 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1900 | /* dma_system -> L3 */ |
| 1901 | static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = { |
| 1902 | .master = &omap3xxx_dma_system_hwmod, |
| 1903 | .slave = &omap3xxx_l3_main_hwmod, |
| 1904 | .clk = "core_l3_ick", |
| 1905 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1906 | }; |
| 1907 | |
| 1908 | /* dma attributes */ |
| 1909 | static struct omap_dma_dev_attr dma_dev_attr = { |
| 1910 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
| 1911 | IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY, |
| 1912 | .lch_count = 32, |
| 1913 | }; |
| 1914 | |
| 1915 | static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = { |
| 1916 | .rev_offs = 0x0000, |
| 1917 | .sysc_offs = 0x002c, |
| 1918 | .syss_offs = 0x0028, |
| 1919 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 1920 | SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 1921 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE | |
| 1922 | SYSS_HAS_RESET_STATUS), |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1923 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1924 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1925 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1926 | }; |
| 1927 | |
| 1928 | static struct omap_hwmod_class omap3xxx_dma_hwmod_class = { |
| 1929 | .name = "dma", |
| 1930 | .sysc = &omap3xxx_dma_sysc, |
| 1931 | }; |
| 1932 | |
| 1933 | /* dma_system */ |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1934 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { |
| 1935 | { |
| 1936 | .pa_start = 0x48056000, |
Benoit Cousson | 1286eeb | 2011-04-19 10:15:36 -0600 | [diff] [blame] | 1937 | .pa_end = 0x48056fff, |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1938 | .flags = ADDR_TYPE_RT |
| 1939 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 1940 | { } |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1941 | }; |
| 1942 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1943 | /* l4_cfg -> dma_system */ |
| 1944 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = { |
| 1945 | .master = &omap3xxx_l4_core_hwmod, |
| 1946 | .slave = &omap3xxx_dma_system_hwmod, |
| 1947 | .clk = "core_l4_ick", |
| 1948 | .addr = omap3xxx_dma_system_addrs, |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1949 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1950 | }; |
| 1951 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1952 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { |
| 1953 | .name = "dma", |
| 1954 | .class = &omap3xxx_dma_hwmod_class, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 1955 | .mpu_irqs = omap2_dma_system_irqs, |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1956 | .main_clk = "core_l3_ick", |
| 1957 | .prcm = { |
| 1958 | .omap2 = { |
| 1959 | .module_offs = CORE_MOD, |
| 1960 | .prcm_reg_id = 1, |
| 1961 | .module_bit = OMAP3430_ST_SDMA_SHIFT, |
| 1962 | .idlest_reg_id = 1, |
| 1963 | .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, |
| 1964 | }, |
| 1965 | }, |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1966 | .dev_attr = &dma_dev_attr, |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 1967 | .flags = HWMOD_NO_IDLEST, |
| 1968 | }; |
| 1969 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 1970 | /* |
| 1971 | * 'mcbsp' class |
| 1972 | * multi channel buffered serial port controller |
| 1973 | */ |
| 1974 | |
| 1975 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = { |
| 1976 | .sysc_offs = 0x008c, |
| 1977 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | |
| 1978 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
| 1979 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1980 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1981 | .clockact = 0x2, |
| 1982 | }; |
| 1983 | |
| 1984 | static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = { |
| 1985 | .name = "mcbsp", |
| 1986 | .sysc = &omap3xxx_mcbsp_sysc, |
| 1987 | .rev = MCBSP_CONFIG_TYPE3, |
| 1988 | }; |
| 1989 | |
| 1990 | /* mcbsp1 */ |
| 1991 | static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { |
| 1992 | { .name = "irq", .irq = 16 }, |
| 1993 | { .name = "tx", .irq = 59 }, |
| 1994 | { .name = "rx", .irq = 60 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 1995 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 1996 | }; |
| 1997 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 1998 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { |
| 1999 | { |
| 2000 | .name = "mpu", |
| 2001 | .pa_start = 0x48074000, |
| 2002 | .pa_end = 0x480740ff, |
| 2003 | .flags = ADDR_TYPE_RT |
| 2004 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2005 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2006 | }; |
| 2007 | |
| 2008 | /* l4_core -> mcbsp1 */ |
| 2009 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { |
| 2010 | .master = &omap3xxx_l4_core_hwmod, |
| 2011 | .slave = &omap3xxx_mcbsp1_hwmod, |
| 2012 | .clk = "mcbsp1_ick", |
| 2013 | .addr = omap3xxx_mcbsp1_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2014 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2015 | }; |
| 2016 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2017 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { |
| 2018 | .name = "mcbsp1", |
| 2019 | .class = &omap3xxx_mcbsp_hwmod_class, |
| 2020 | .mpu_irqs = omap3xxx_mcbsp1_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2021 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2022 | .main_clk = "mcbsp1_fck", |
| 2023 | .prcm = { |
| 2024 | .omap2 = { |
| 2025 | .prcm_reg_id = 1, |
| 2026 | .module_bit = OMAP3430_EN_MCBSP1_SHIFT, |
| 2027 | .module_offs = CORE_MOD, |
| 2028 | .idlest_reg_id = 1, |
| 2029 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, |
| 2030 | }, |
| 2031 | }, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2032 | }; |
| 2033 | |
| 2034 | /* mcbsp2 */ |
| 2035 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { |
| 2036 | { .name = "irq", .irq = 17 }, |
| 2037 | { .name = "tx", .irq = 62 }, |
| 2038 | { .name = "rx", .irq = 63 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2039 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2040 | }; |
| 2041 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2042 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { |
| 2043 | { |
| 2044 | .name = "mpu", |
| 2045 | .pa_start = 0x49022000, |
| 2046 | .pa_end = 0x490220ff, |
| 2047 | .flags = ADDR_TYPE_RT |
| 2048 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2049 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2050 | }; |
| 2051 | |
| 2052 | /* l4_per -> mcbsp2 */ |
| 2053 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { |
| 2054 | .master = &omap3xxx_l4_per_hwmod, |
| 2055 | .slave = &omap3xxx_mcbsp2_hwmod, |
| 2056 | .clk = "mcbsp2_ick", |
| 2057 | .addr = omap3xxx_mcbsp2_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2058 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2059 | }; |
| 2060 | |
Kishon Vijay Abraham I | 8b1906f | 2011-02-24 15:16:51 +0530 | [diff] [blame] | 2061 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { |
| 2062 | .sidetone = "mcbsp2_sidetone", |
| 2063 | }; |
| 2064 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2065 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { |
| 2066 | .name = "mcbsp2", |
| 2067 | .class = &omap3xxx_mcbsp_hwmod_class, |
| 2068 | .mpu_irqs = omap3xxx_mcbsp2_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2069 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2070 | .main_clk = "mcbsp2_fck", |
| 2071 | .prcm = { |
| 2072 | .omap2 = { |
| 2073 | .prcm_reg_id = 1, |
| 2074 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, |
| 2075 | .module_offs = OMAP3430_PER_MOD, |
| 2076 | .idlest_reg_id = 1, |
| 2077 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, |
| 2078 | }, |
| 2079 | }, |
Kishon Vijay Abraham I | 8b1906f | 2011-02-24 15:16:51 +0530 | [diff] [blame] | 2080 | .dev_attr = &omap34xx_mcbsp2_dev_attr, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2081 | }; |
| 2082 | |
| 2083 | /* mcbsp3 */ |
| 2084 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { |
| 2085 | { .name = "irq", .irq = 22 }, |
| 2086 | { .name = "tx", .irq = 89 }, |
| 2087 | { .name = "rx", .irq = 90 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2088 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2089 | }; |
| 2090 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2091 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { |
| 2092 | { |
| 2093 | .name = "mpu", |
| 2094 | .pa_start = 0x49024000, |
| 2095 | .pa_end = 0x490240ff, |
| 2096 | .flags = ADDR_TYPE_RT |
| 2097 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2098 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2099 | }; |
| 2100 | |
| 2101 | /* l4_per -> mcbsp3 */ |
| 2102 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { |
| 2103 | .master = &omap3xxx_l4_per_hwmod, |
| 2104 | .slave = &omap3xxx_mcbsp3_hwmod, |
| 2105 | .clk = "mcbsp3_ick", |
| 2106 | .addr = omap3xxx_mcbsp3_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2107 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2108 | }; |
| 2109 | |
Kishon Vijay Abraham I | 8b1906f | 2011-02-24 15:16:51 +0530 | [diff] [blame] | 2110 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 2111 | .sidetone = "mcbsp3_sidetone", |
Kishon Vijay Abraham I | 8b1906f | 2011-02-24 15:16:51 +0530 | [diff] [blame] | 2112 | }; |
| 2113 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2114 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { |
| 2115 | .name = "mcbsp3", |
| 2116 | .class = &omap3xxx_mcbsp_hwmod_class, |
| 2117 | .mpu_irqs = omap3xxx_mcbsp3_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2118 | .sdma_reqs = omap2_mcbsp3_sdma_reqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2119 | .main_clk = "mcbsp3_fck", |
| 2120 | .prcm = { |
| 2121 | .omap2 = { |
| 2122 | .prcm_reg_id = 1, |
| 2123 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, |
| 2124 | .module_offs = OMAP3430_PER_MOD, |
| 2125 | .idlest_reg_id = 1, |
| 2126 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, |
| 2127 | }, |
| 2128 | }, |
Kishon Vijay Abraham I | 8b1906f | 2011-02-24 15:16:51 +0530 | [diff] [blame] | 2129 | .dev_attr = &omap34xx_mcbsp3_dev_attr, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2130 | }; |
| 2131 | |
| 2132 | /* mcbsp4 */ |
| 2133 | static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { |
| 2134 | { .name = "irq", .irq = 23 }, |
| 2135 | { .name = "tx", .irq = 54 }, |
| 2136 | { .name = "rx", .irq = 55 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2137 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2138 | }; |
| 2139 | |
| 2140 | static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { |
| 2141 | { .name = "rx", .dma_req = 20 }, |
| 2142 | { .name = "tx", .dma_req = 19 }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2143 | { .dma_req = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2144 | }; |
| 2145 | |
| 2146 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { |
| 2147 | { |
| 2148 | .name = "mpu", |
| 2149 | .pa_start = 0x49026000, |
| 2150 | .pa_end = 0x490260ff, |
| 2151 | .flags = ADDR_TYPE_RT |
| 2152 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2153 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2154 | }; |
| 2155 | |
| 2156 | /* l4_per -> mcbsp4 */ |
| 2157 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { |
| 2158 | .master = &omap3xxx_l4_per_hwmod, |
| 2159 | .slave = &omap3xxx_mcbsp4_hwmod, |
| 2160 | .clk = "mcbsp4_ick", |
| 2161 | .addr = omap3xxx_mcbsp4_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2162 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2163 | }; |
| 2164 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2165 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { |
| 2166 | .name = "mcbsp4", |
| 2167 | .class = &omap3xxx_mcbsp_hwmod_class, |
| 2168 | .mpu_irqs = omap3xxx_mcbsp4_irqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2169 | .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2170 | .main_clk = "mcbsp4_fck", |
| 2171 | .prcm = { |
| 2172 | .omap2 = { |
| 2173 | .prcm_reg_id = 1, |
| 2174 | .module_bit = OMAP3430_EN_MCBSP4_SHIFT, |
| 2175 | .module_offs = OMAP3430_PER_MOD, |
| 2176 | .idlest_reg_id = 1, |
| 2177 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, |
| 2178 | }, |
| 2179 | }, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2180 | }; |
| 2181 | |
| 2182 | /* mcbsp5 */ |
| 2183 | static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { |
| 2184 | { .name = "irq", .irq = 27 }, |
| 2185 | { .name = "tx", .irq = 81 }, |
| 2186 | { .name = "rx", .irq = 82 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2187 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2188 | }; |
| 2189 | |
| 2190 | static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { |
| 2191 | { .name = "rx", .dma_req = 22 }, |
| 2192 | { .name = "tx", .dma_req = 21 }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2193 | { .dma_req = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2194 | }; |
| 2195 | |
| 2196 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { |
| 2197 | { |
| 2198 | .name = "mpu", |
| 2199 | .pa_start = 0x48096000, |
| 2200 | .pa_end = 0x480960ff, |
| 2201 | .flags = ADDR_TYPE_RT |
| 2202 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2203 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2204 | }; |
| 2205 | |
| 2206 | /* l4_core -> mcbsp5 */ |
| 2207 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { |
| 2208 | .master = &omap3xxx_l4_core_hwmod, |
| 2209 | .slave = &omap3xxx_mcbsp5_hwmod, |
| 2210 | .clk = "mcbsp5_ick", |
| 2211 | .addr = omap3xxx_mcbsp5_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2212 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2213 | }; |
| 2214 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2215 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { |
| 2216 | .name = "mcbsp5", |
| 2217 | .class = &omap3xxx_mcbsp_hwmod_class, |
| 2218 | .mpu_irqs = omap3xxx_mcbsp5_irqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2219 | .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2220 | .main_clk = "mcbsp5_fck", |
| 2221 | .prcm = { |
| 2222 | .omap2 = { |
| 2223 | .prcm_reg_id = 1, |
| 2224 | .module_bit = OMAP3430_EN_MCBSP5_SHIFT, |
| 2225 | .module_offs = CORE_MOD, |
| 2226 | .idlest_reg_id = 1, |
| 2227 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, |
| 2228 | }, |
| 2229 | }, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2230 | }; |
| 2231 | /* 'mcbsp sidetone' class */ |
| 2232 | |
| 2233 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { |
| 2234 | .sysc_offs = 0x0010, |
| 2235 | .sysc_flags = SYSC_HAS_AUTOIDLE, |
| 2236 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2237 | }; |
| 2238 | |
| 2239 | static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = { |
| 2240 | .name = "mcbsp_sidetone", |
| 2241 | .sysc = &omap3xxx_mcbsp_sidetone_sysc, |
| 2242 | }; |
| 2243 | |
| 2244 | /* mcbsp2_sidetone */ |
| 2245 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { |
| 2246 | { .name = "irq", .irq = 4 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2247 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2248 | }; |
| 2249 | |
| 2250 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { |
| 2251 | { |
| 2252 | .name = "sidetone", |
| 2253 | .pa_start = 0x49028000, |
| 2254 | .pa_end = 0x490280ff, |
| 2255 | .flags = ADDR_TYPE_RT |
| 2256 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2257 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2258 | }; |
| 2259 | |
| 2260 | /* l4_per -> mcbsp2_sidetone */ |
| 2261 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { |
| 2262 | .master = &omap3xxx_l4_per_hwmod, |
| 2263 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, |
| 2264 | .clk = "mcbsp2_ick", |
| 2265 | .addr = omap3xxx_mcbsp2_sidetone_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2266 | .user = OCP_USER_MPU, |
| 2267 | }; |
| 2268 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2269 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { |
| 2270 | .name = "mcbsp2_sidetone", |
| 2271 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
| 2272 | .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2273 | .main_clk = "mcbsp2_fck", |
| 2274 | .prcm = { |
| 2275 | .omap2 = { |
| 2276 | .prcm_reg_id = 1, |
| 2277 | .module_bit = OMAP3430_EN_MCBSP2_SHIFT, |
| 2278 | .module_offs = OMAP3430_PER_MOD, |
| 2279 | .idlest_reg_id = 1, |
| 2280 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, |
| 2281 | }, |
| 2282 | }, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2283 | }; |
| 2284 | |
| 2285 | /* mcbsp3_sidetone */ |
| 2286 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { |
| 2287 | { .name = "irq", .irq = 5 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2288 | { .irq = -1 } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2289 | }; |
| 2290 | |
| 2291 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { |
| 2292 | { |
| 2293 | .name = "sidetone", |
| 2294 | .pa_start = 0x4902A000, |
| 2295 | .pa_end = 0x4902A0ff, |
| 2296 | .flags = ADDR_TYPE_RT |
| 2297 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2298 | { } |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2299 | }; |
| 2300 | |
| 2301 | /* l4_per -> mcbsp3_sidetone */ |
| 2302 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { |
| 2303 | .master = &omap3xxx_l4_per_hwmod, |
| 2304 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, |
| 2305 | .clk = "mcbsp3_ick", |
| 2306 | .addr = omap3xxx_mcbsp3_sidetone_addrs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2307 | .user = OCP_USER_MPU, |
| 2308 | }; |
| 2309 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2310 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { |
| 2311 | .name = "mcbsp3_sidetone", |
| 2312 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
| 2313 | .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2314 | .main_clk = "mcbsp3_fck", |
| 2315 | .prcm = { |
| 2316 | .omap2 = { |
| 2317 | .prcm_reg_id = 1, |
| 2318 | .module_bit = OMAP3430_EN_MCBSP3_SHIFT, |
| 2319 | .module_offs = OMAP3430_PER_MOD, |
| 2320 | .idlest_reg_id = 1, |
| 2321 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, |
| 2322 | }, |
| 2323 | }, |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2324 | }; |
| 2325 | |
| 2326 | |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2327 | /* SR common */ |
| 2328 | static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { |
| 2329 | .clkact_shift = 20, |
| 2330 | }; |
| 2331 | |
| 2332 | static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = { |
| 2333 | .sysc_offs = 0x24, |
| 2334 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE), |
| 2335 | .clockact = CLOCKACT_TEST_ICLK, |
| 2336 | .sysc_fields = &omap34xx_sr_sysc_fields, |
| 2337 | }; |
| 2338 | |
| 2339 | static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = { |
| 2340 | .name = "smartreflex", |
| 2341 | .sysc = &omap34xx_sr_sysc, |
| 2342 | .rev = 1, |
| 2343 | }; |
| 2344 | |
| 2345 | static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { |
| 2346 | .sidle_shift = 24, |
| 2347 | .enwkup_shift = 26 |
| 2348 | }; |
| 2349 | |
| 2350 | static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { |
| 2351 | .sysc_offs = 0x38, |
| 2352 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2353 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
| 2354 | SYSC_NO_CACHE), |
| 2355 | .sysc_fields = &omap36xx_sr_sysc_fields, |
| 2356 | }; |
| 2357 | |
| 2358 | static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = { |
| 2359 | .name = "smartreflex", |
| 2360 | .sysc = &omap36xx_sr_sysc, |
| 2361 | .rev = 2, |
| 2362 | }; |
| 2363 | |
| 2364 | /* SR1 */ |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2365 | static struct omap_smartreflex_dev_attr sr1_dev_attr = { |
| 2366 | .sensor_voltdm_name = "mpu_iva", |
| 2367 | }; |
| 2368 | |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2369 | static struct omap_hwmod omap34xx_sr1_hwmod = { |
Paul Walmsley | bec9381 | 2012-04-19 04:03:50 -0600 | [diff] [blame] | 2370 | .name = "sr1", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2371 | .class = &omap34xx_smartreflex_hwmod_class, |
| 2372 | .main_clk = "sr1_fck", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2373 | .prcm = { |
| 2374 | .omap2 = { |
| 2375 | .prcm_reg_id = 1, |
| 2376 | .module_bit = OMAP3430_EN_SR1_SHIFT, |
| 2377 | .module_offs = WKUP_MOD, |
| 2378 | .idlest_reg_id = 1, |
| 2379 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
| 2380 | }, |
| 2381 | }, |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2382 | .dev_attr = &sr1_dev_attr, |
Nishanth Menon | d62bc78 | 2012-02-29 23:33:43 +0100 | [diff] [blame] | 2383 | .mpu_irqs = omap3_smartreflex_mpu_irqs, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2384 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
| 2385 | }; |
| 2386 | |
| 2387 | static struct omap_hwmod omap36xx_sr1_hwmod = { |
Paul Walmsley | bec9381 | 2012-04-19 04:03:50 -0600 | [diff] [blame] | 2388 | .name = "sr1", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2389 | .class = &omap36xx_smartreflex_hwmod_class, |
| 2390 | .main_clk = "sr1_fck", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2391 | .prcm = { |
| 2392 | .omap2 = { |
| 2393 | .prcm_reg_id = 1, |
| 2394 | .module_bit = OMAP3430_EN_SR1_SHIFT, |
| 2395 | .module_offs = WKUP_MOD, |
| 2396 | .idlest_reg_id = 1, |
| 2397 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
| 2398 | }, |
| 2399 | }, |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2400 | .dev_attr = &sr1_dev_attr, |
Nishanth Menon | d62bc78 | 2012-02-29 23:33:43 +0100 | [diff] [blame] | 2401 | .mpu_irqs = omap3_smartreflex_mpu_irqs, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2402 | }; |
| 2403 | |
| 2404 | /* SR2 */ |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2405 | static struct omap_smartreflex_dev_attr sr2_dev_attr = { |
| 2406 | .sensor_voltdm_name = "core", |
| 2407 | }; |
| 2408 | |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2409 | static struct omap_hwmod omap34xx_sr2_hwmod = { |
Paul Walmsley | bec9381 | 2012-04-19 04:03:50 -0600 | [diff] [blame] | 2410 | .name = "sr2", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2411 | .class = &omap34xx_smartreflex_hwmod_class, |
| 2412 | .main_clk = "sr2_fck", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2413 | .prcm = { |
| 2414 | .omap2 = { |
| 2415 | .prcm_reg_id = 1, |
| 2416 | .module_bit = OMAP3430_EN_SR2_SHIFT, |
| 2417 | .module_offs = WKUP_MOD, |
| 2418 | .idlest_reg_id = 1, |
| 2419 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
| 2420 | }, |
| 2421 | }, |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2422 | .dev_attr = &sr2_dev_attr, |
Nishanth Menon | d62bc78 | 2012-02-29 23:33:43 +0100 | [diff] [blame] | 2423 | .mpu_irqs = omap3_smartreflex_core_irqs, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2424 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
| 2425 | }; |
| 2426 | |
| 2427 | static struct omap_hwmod omap36xx_sr2_hwmod = { |
Paul Walmsley | bec9381 | 2012-04-19 04:03:50 -0600 | [diff] [blame] | 2428 | .name = "sr2", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2429 | .class = &omap36xx_smartreflex_hwmod_class, |
| 2430 | .main_clk = "sr2_fck", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2431 | .prcm = { |
| 2432 | .omap2 = { |
| 2433 | .prcm_reg_id = 1, |
| 2434 | .module_bit = OMAP3430_EN_SR2_SHIFT, |
| 2435 | .module_offs = WKUP_MOD, |
| 2436 | .idlest_reg_id = 1, |
| 2437 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
| 2438 | }, |
| 2439 | }, |
Shweta Gulati | cea6b94 | 2012-02-29 23:33:37 +0100 | [diff] [blame] | 2440 | .dev_attr = &sr2_dev_attr, |
Nishanth Menon | d62bc78 | 2012-02-29 23:33:43 +0100 | [diff] [blame] | 2441 | .mpu_irqs = omap3_smartreflex_core_irqs, |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 2442 | }; |
| 2443 | |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2444 | /* |
| 2445 | * 'mailbox' class |
| 2446 | * mailbox module allowing communication between the on-chip processors |
| 2447 | * using a queued mailbox-interrupt mechanism. |
| 2448 | */ |
| 2449 | |
| 2450 | static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = { |
| 2451 | .rev_offs = 0x000, |
| 2452 | .sysc_offs = 0x010, |
| 2453 | .syss_offs = 0x014, |
| 2454 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 2455 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 2456 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2457 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2458 | }; |
| 2459 | |
| 2460 | static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = { |
| 2461 | .name = "mailbox", |
| 2462 | .sysc = &omap3xxx_mailbox_sysc, |
| 2463 | }; |
| 2464 | |
| 2465 | static struct omap_hwmod omap3xxx_mailbox_hwmod; |
| 2466 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { |
| 2467 | { .irq = 26 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2468 | { .irq = -1 } |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2469 | }; |
| 2470 | |
| 2471 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { |
| 2472 | { |
| 2473 | .pa_start = 0x48094000, |
| 2474 | .pa_end = 0x480941ff, |
| 2475 | .flags = ADDR_TYPE_RT, |
| 2476 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2477 | { } |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2478 | }; |
| 2479 | |
| 2480 | /* l4_core -> mailbox */ |
| 2481 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { |
| 2482 | .master = &omap3xxx_l4_core_hwmod, |
| 2483 | .slave = &omap3xxx_mailbox_hwmod, |
| 2484 | .addr = omap3xxx_mailbox_addrs, |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2485 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2486 | }; |
| 2487 | |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2488 | static struct omap_hwmod omap3xxx_mailbox_hwmod = { |
| 2489 | .name = "mailbox", |
| 2490 | .class = &omap3xxx_mailbox_hwmod_class, |
| 2491 | .mpu_irqs = omap3xxx_mailbox_irqs, |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2492 | .main_clk = "mailboxes_ick", |
| 2493 | .prcm = { |
| 2494 | .omap2 = { |
| 2495 | .prcm_reg_id = 1, |
| 2496 | .module_bit = OMAP3430_EN_MAILBOXES_SHIFT, |
| 2497 | .module_offs = CORE_MOD, |
| 2498 | .idlest_reg_id = 1, |
| 2499 | .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, |
| 2500 | }, |
| 2501 | }, |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2502 | }; |
| 2503 | |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2504 | /* l4 core -> mcspi1 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2505 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { |
| 2506 | .master = &omap3xxx_l4_core_hwmod, |
| 2507 | .slave = &omap34xx_mcspi1, |
| 2508 | .clk = "mcspi1_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2509 | .addr = omap2_mcspi1_addr_space, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2510 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2511 | }; |
| 2512 | |
| 2513 | /* l4 core -> mcspi2 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2514 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { |
| 2515 | .master = &omap3xxx_l4_core_hwmod, |
| 2516 | .slave = &omap34xx_mcspi2, |
| 2517 | .clk = "mcspi2_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2518 | .addr = omap2_mcspi2_addr_space, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2519 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2520 | }; |
| 2521 | |
| 2522 | /* l4 core -> mcspi3 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2523 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { |
| 2524 | .master = &omap3xxx_l4_core_hwmod, |
| 2525 | .slave = &omap34xx_mcspi3, |
| 2526 | .clk = "mcspi3_ick", |
Paul Walmsley | ded1138 | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2527 | .addr = omap2430_mcspi3_addr_space, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2528 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2529 | }; |
| 2530 | |
| 2531 | /* l4 core -> mcspi4 interface */ |
| 2532 | static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { |
| 2533 | { |
| 2534 | .pa_start = 0x480ba000, |
| 2535 | .pa_end = 0x480ba0ff, |
| 2536 | .flags = ADDR_TYPE_RT, |
| 2537 | }, |
Paul Walmsley | 78183f3 | 2011-07-09 19:14:05 -0600 | [diff] [blame] | 2538 | { } |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2539 | }; |
| 2540 | |
| 2541 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { |
| 2542 | .master = &omap3xxx_l4_core_hwmod, |
| 2543 | .slave = &omap34xx_mcspi4, |
| 2544 | .clk = "mcspi4_ick", |
| 2545 | .addr = omap34xx_mcspi4_addr_space, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2546 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2547 | }; |
| 2548 | |
| 2549 | /* |
| 2550 | * 'mcspi' class |
| 2551 | * multichannel serial port interface (mcspi) / master/slave synchronous serial |
| 2552 | * bus |
| 2553 | */ |
| 2554 | |
| 2555 | static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = { |
| 2556 | .rev_offs = 0x0000, |
| 2557 | .sysc_offs = 0x0010, |
| 2558 | .syss_offs = 0x0014, |
| 2559 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 2560 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 2561 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 2562 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2563 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2564 | }; |
| 2565 | |
| 2566 | static struct omap_hwmod_class omap34xx_mcspi_class = { |
| 2567 | .name = "mcspi", |
| 2568 | .sysc = &omap34xx_mcspi_sysc, |
| 2569 | .rev = OMAP3_MCSPI_REV, |
| 2570 | }; |
| 2571 | |
| 2572 | /* mcspi1 */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2573 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { |
| 2574 | .num_chipselect = 4, |
| 2575 | }; |
| 2576 | |
| 2577 | static struct omap_hwmod omap34xx_mcspi1 = { |
| 2578 | .name = "mcspi1", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2579 | .mpu_irqs = omap2_mcspi1_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2580 | .sdma_reqs = omap2_mcspi1_sdma_reqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2581 | .main_clk = "mcspi1_fck", |
| 2582 | .prcm = { |
| 2583 | .omap2 = { |
| 2584 | .module_offs = CORE_MOD, |
| 2585 | .prcm_reg_id = 1, |
| 2586 | .module_bit = OMAP3430_EN_MCSPI1_SHIFT, |
| 2587 | .idlest_reg_id = 1, |
| 2588 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, |
| 2589 | }, |
| 2590 | }, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2591 | .class = &omap34xx_mcspi_class, |
| 2592 | .dev_attr = &omap_mcspi1_dev_attr, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2593 | }; |
| 2594 | |
| 2595 | /* mcspi2 */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2596 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { |
| 2597 | .num_chipselect = 2, |
| 2598 | }; |
| 2599 | |
| 2600 | static struct omap_hwmod omap34xx_mcspi2 = { |
| 2601 | .name = "mcspi2", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2602 | .mpu_irqs = omap2_mcspi2_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2603 | .sdma_reqs = omap2_mcspi2_sdma_reqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2604 | .main_clk = "mcspi2_fck", |
| 2605 | .prcm = { |
| 2606 | .omap2 = { |
| 2607 | .module_offs = CORE_MOD, |
| 2608 | .prcm_reg_id = 1, |
| 2609 | .module_bit = OMAP3430_EN_MCSPI2_SHIFT, |
| 2610 | .idlest_reg_id = 1, |
| 2611 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, |
| 2612 | }, |
| 2613 | }, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2614 | .class = &omap34xx_mcspi_class, |
| 2615 | .dev_attr = &omap_mcspi2_dev_attr, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2616 | }; |
| 2617 | |
| 2618 | /* mcspi3 */ |
| 2619 | static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { |
| 2620 | { .name = "irq", .irq = 91 }, /* 91 */ |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2621 | { .irq = -1 } |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2622 | }; |
| 2623 | |
| 2624 | static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { |
| 2625 | { .name = "tx0", .dma_req = 15 }, |
| 2626 | { .name = "rx0", .dma_req = 16 }, |
| 2627 | { .name = "tx1", .dma_req = 23 }, |
| 2628 | { .name = "rx1", .dma_req = 24 }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2629 | { .dma_req = -1 } |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2630 | }; |
| 2631 | |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2632 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { |
| 2633 | .num_chipselect = 2, |
| 2634 | }; |
| 2635 | |
| 2636 | static struct omap_hwmod omap34xx_mcspi3 = { |
| 2637 | .name = "mcspi3", |
| 2638 | .mpu_irqs = omap34xx_mcspi3_mpu_irqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2639 | .sdma_reqs = omap34xx_mcspi3_sdma_reqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2640 | .main_clk = "mcspi3_fck", |
| 2641 | .prcm = { |
| 2642 | .omap2 = { |
| 2643 | .module_offs = CORE_MOD, |
| 2644 | .prcm_reg_id = 1, |
| 2645 | .module_bit = OMAP3430_EN_MCSPI3_SHIFT, |
| 2646 | .idlest_reg_id = 1, |
| 2647 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, |
| 2648 | }, |
| 2649 | }, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2650 | .class = &omap34xx_mcspi_class, |
| 2651 | .dev_attr = &omap_mcspi3_dev_attr, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2652 | }; |
| 2653 | |
| 2654 | /* SPI4 */ |
| 2655 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { |
| 2656 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2657 | { .irq = -1 } |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2658 | }; |
| 2659 | |
| 2660 | static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { |
| 2661 | { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ |
| 2662 | { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2663 | { .dma_req = -1 } |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2664 | }; |
| 2665 | |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2666 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { |
| 2667 | .num_chipselect = 1, |
| 2668 | }; |
| 2669 | |
| 2670 | static struct omap_hwmod omap34xx_mcspi4 = { |
| 2671 | .name = "mcspi4", |
| 2672 | .mpu_irqs = omap34xx_mcspi4_mpu_irqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2673 | .sdma_reqs = omap34xx_mcspi4_sdma_reqs, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2674 | .main_clk = "mcspi4_fck", |
| 2675 | .prcm = { |
| 2676 | .omap2 = { |
| 2677 | .module_offs = CORE_MOD, |
| 2678 | .prcm_reg_id = 1, |
| 2679 | .module_bit = OMAP3430_EN_MCSPI4_SHIFT, |
| 2680 | .idlest_reg_id = 1, |
| 2681 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, |
| 2682 | }, |
| 2683 | }, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2684 | .class = &omap34xx_mcspi_class, |
| 2685 | .dev_attr = &omap_mcspi4_dev_attr, |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2686 | }; |
| 2687 | |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2688 | /* |
| 2689 | * usbhsotg |
| 2690 | */ |
| 2691 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { |
| 2692 | .rev_offs = 0x0400, |
| 2693 | .sysc_offs = 0x0404, |
| 2694 | .syss_offs = 0x0408, |
| 2695 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| |
| 2696 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 2697 | SYSC_HAS_AUTOIDLE), |
| 2698 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 2699 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 2700 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2701 | }; |
| 2702 | |
| 2703 | static struct omap_hwmod_class usbotg_class = { |
| 2704 | .name = "usbotg", |
| 2705 | .sysc = &omap3xxx_usbhsotg_sysc, |
| 2706 | }; |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2707 | /* usb_otg_hs */ |
| 2708 | static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { |
| 2709 | |
| 2710 | { .name = "mc", .irq = 92 }, |
| 2711 | { .name = "dma", .irq = 93 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2712 | { .irq = -1 } |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2713 | }; |
| 2714 | |
| 2715 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { |
| 2716 | .name = "usb_otg_hs", |
| 2717 | .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2718 | .main_clk = "hsotgusb_ick", |
| 2719 | .prcm = { |
| 2720 | .omap2 = { |
| 2721 | .prcm_reg_id = 1, |
| 2722 | .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT, |
| 2723 | .module_offs = CORE_MOD, |
| 2724 | .idlest_reg_id = 1, |
| 2725 | .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT, |
| 2726 | .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT |
| 2727 | }, |
| 2728 | }, |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2729 | .class = &usbotg_class, |
| 2730 | |
| 2731 | /* |
| 2732 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially |
| 2733 | * broken when autoidle is enabled |
| 2734 | * workaround is to disable the autoidle bit at module level. |
| 2735 | */ |
| 2736 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
| 2737 | | HWMOD_SWSUP_MSTANDBY, |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2738 | }; |
Tony Lindgren | 04aa67d | 2011-02-22 10:54:12 -0800 | [diff] [blame] | 2739 | |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2740 | /* usb_otg_hs */ |
| 2741 | static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { |
| 2742 | |
| 2743 | { .name = "mc", .irq = 71 }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2744 | { .irq = -1 } |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2745 | }; |
| 2746 | |
| 2747 | static struct omap_hwmod_class am35xx_usbotg_class = { |
| 2748 | .name = "am35xx_usbotg", |
| 2749 | .sysc = NULL, |
| 2750 | }; |
| 2751 | |
| 2752 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { |
| 2753 | .name = "am35x_otg_hs", |
| 2754 | .mpu_irqs = am35xx_usbhsotg_mpu_irqs, |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2755 | .main_clk = NULL, |
| 2756 | .prcm = { |
| 2757 | .omap2 = { |
| 2758 | }, |
| 2759 | }, |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2760 | .class = &am35xx_usbotg_class, |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2761 | }; |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2762 | |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2763 | /* MMC/SD/SDIO common */ |
| 2764 | |
| 2765 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { |
| 2766 | .rev_offs = 0x1fc, |
| 2767 | .sysc_offs = 0x10, |
| 2768 | .syss_offs = 0x14, |
| 2769 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 2770 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 2771 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 2772 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2773 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2774 | }; |
| 2775 | |
| 2776 | static struct omap_hwmod_class omap34xx_mmc_class = { |
| 2777 | .name = "mmc", |
| 2778 | .sysc = &omap34xx_mmc_sysc, |
| 2779 | }; |
| 2780 | |
| 2781 | /* MMC/SD/SDIO1 */ |
| 2782 | |
| 2783 | static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { |
| 2784 | { .irq = 83, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2785 | { .irq = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2786 | }; |
| 2787 | |
| 2788 | static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { |
| 2789 | { .name = "tx", .dma_req = 61, }, |
| 2790 | { .name = "rx", .dma_req = 62, }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2791 | { .dma_req = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2792 | }; |
| 2793 | |
| 2794 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { |
| 2795 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 2796 | }; |
| 2797 | |
Kishore Kadiyala | 6ab8946 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2798 | static struct omap_mmc_dev_attr mmc1_dev_attr = { |
| 2799 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
| 2800 | }; |
| 2801 | |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2802 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ |
| 2803 | static struct omap_mmc_dev_attr mmc1_pre_es3_dev_attr = { |
| 2804 | .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT | |
| 2805 | OMAP_HSMMC_BROKEN_MULTIBLOCK_READ), |
| 2806 | }; |
| 2807 | |
| 2808 | static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = { |
| 2809 | .name = "mmc1", |
| 2810 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, |
| 2811 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, |
| 2812 | .opt_clks = omap34xx_mmc1_opt_clks, |
| 2813 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), |
| 2814 | .main_clk = "mmchs1_fck", |
| 2815 | .prcm = { |
| 2816 | .omap2 = { |
| 2817 | .module_offs = CORE_MOD, |
| 2818 | .prcm_reg_id = 1, |
| 2819 | .module_bit = OMAP3430_EN_MMC1_SHIFT, |
| 2820 | .idlest_reg_id = 1, |
| 2821 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, |
| 2822 | }, |
| 2823 | }, |
| 2824 | .dev_attr = &mmc1_pre_es3_dev_attr, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2825 | .class = &omap34xx_mmc_class, |
| 2826 | }; |
| 2827 | |
| 2828 | static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2829 | .name = "mmc1", |
| 2830 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2831 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2832 | .opt_clks = omap34xx_mmc1_opt_clks, |
| 2833 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), |
| 2834 | .main_clk = "mmchs1_fck", |
| 2835 | .prcm = { |
| 2836 | .omap2 = { |
| 2837 | .module_offs = CORE_MOD, |
| 2838 | .prcm_reg_id = 1, |
| 2839 | .module_bit = OMAP3430_EN_MMC1_SHIFT, |
| 2840 | .idlest_reg_id = 1, |
| 2841 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, |
| 2842 | }, |
| 2843 | }, |
Kishore Kadiyala | 6ab8946 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2844 | .dev_attr = &mmc1_dev_attr, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2845 | .class = &omap34xx_mmc_class, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2846 | }; |
| 2847 | |
| 2848 | /* MMC/SD/SDIO2 */ |
| 2849 | |
| 2850 | static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { |
| 2851 | { .irq = INT_24XX_MMC2_IRQ, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2852 | { .irq = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2853 | }; |
| 2854 | |
| 2855 | static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { |
| 2856 | { .name = "tx", .dma_req = 47, }, |
| 2857 | { .name = "rx", .dma_req = 48, }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2858 | { .dma_req = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2859 | }; |
| 2860 | |
| 2861 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { |
| 2862 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 2863 | }; |
| 2864 | |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2865 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ |
| 2866 | static struct omap_mmc_dev_attr mmc2_pre_es3_dev_attr = { |
| 2867 | .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, |
| 2868 | }; |
| 2869 | |
| 2870 | static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = { |
| 2871 | .name = "mmc2", |
| 2872 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, |
| 2873 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, |
| 2874 | .opt_clks = omap34xx_mmc2_opt_clks, |
| 2875 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), |
| 2876 | .main_clk = "mmchs2_fck", |
| 2877 | .prcm = { |
| 2878 | .omap2 = { |
| 2879 | .module_offs = CORE_MOD, |
| 2880 | .prcm_reg_id = 1, |
| 2881 | .module_bit = OMAP3430_EN_MMC2_SHIFT, |
| 2882 | .idlest_reg_id = 1, |
| 2883 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, |
| 2884 | }, |
| 2885 | }, |
| 2886 | .dev_attr = &mmc2_pre_es3_dev_attr, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2887 | .class = &omap34xx_mmc_class, |
| 2888 | }; |
| 2889 | |
| 2890 | static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2891 | .name = "mmc2", |
| 2892 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2893 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2894 | .opt_clks = omap34xx_mmc2_opt_clks, |
| 2895 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), |
| 2896 | .main_clk = "mmchs2_fck", |
| 2897 | .prcm = { |
| 2898 | .omap2 = { |
| 2899 | .module_offs = CORE_MOD, |
| 2900 | .prcm_reg_id = 1, |
| 2901 | .module_bit = OMAP3430_EN_MMC2_SHIFT, |
| 2902 | .idlest_reg_id = 1, |
| 2903 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, |
| 2904 | }, |
| 2905 | }, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2906 | .class = &omap34xx_mmc_class, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2907 | }; |
| 2908 | |
| 2909 | /* MMC/SD/SDIO3 */ |
| 2910 | |
| 2911 | static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { |
| 2912 | { .irq = 94, }, |
Paul Walmsley | 212738a | 2011-07-09 19:14:06 -0600 | [diff] [blame] | 2913 | { .irq = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2914 | }; |
| 2915 | |
| 2916 | static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { |
| 2917 | { .name = "tx", .dma_req = 77, }, |
| 2918 | { .name = "rx", .dma_req = 78, }, |
Paul Walmsley | bc61495 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 2919 | { .dma_req = -1 } |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2920 | }; |
| 2921 | |
| 2922 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { |
| 2923 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 2924 | }; |
| 2925 | |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2926 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { |
| 2927 | .name = "mmc3", |
| 2928 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2929 | .sdma_reqs = omap34xx_mmc3_sdma_reqs, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2930 | .opt_clks = omap34xx_mmc3_opt_clks, |
| 2931 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), |
| 2932 | .main_clk = "mmchs3_fck", |
| 2933 | .prcm = { |
| 2934 | .omap2 = { |
| 2935 | .prcm_reg_id = 1, |
| 2936 | .module_bit = OMAP3430_EN_MMC3_SHIFT, |
| 2937 | .idlest_reg_id = 1, |
| 2938 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, |
| 2939 | }, |
| 2940 | }, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2941 | .class = &omap34xx_mmc_class, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 2942 | }; |
| 2943 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2944 | /* |
| 2945 | * 'usb_host_hs' class |
| 2946 | * high-speed multi-port usb host controller |
| 2947 | */ |
| 2948 | static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = { |
| 2949 | .master = &omap3xxx_usb_host_hs_hwmod, |
| 2950 | .slave = &omap3xxx_l3_main_hwmod, |
| 2951 | .clk = "core_l3_ick", |
| 2952 | .user = OCP_USER_MPU, |
| 2953 | }; |
| 2954 | |
| 2955 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { |
| 2956 | .rev_offs = 0x0000, |
| 2957 | .sysc_offs = 0x0010, |
| 2958 | .syss_offs = 0x0014, |
| 2959 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 2960 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
| 2961 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 2962 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 2963 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 2964 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2965 | }; |
| 2966 | |
| 2967 | static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = { |
| 2968 | .name = "usb_host_hs", |
| 2969 | .sysc = &omap3xxx_usb_host_hs_sysc, |
| 2970 | }; |
| 2971 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2972 | static struct omap_hwmod_addr_space omap3xxx_usb_host_hs_addrs[] = { |
| 2973 | { |
| 2974 | .name = "uhh", |
| 2975 | .pa_start = 0x48064000, |
| 2976 | .pa_end = 0x480643ff, |
| 2977 | .flags = ADDR_TYPE_RT |
| 2978 | }, |
| 2979 | { |
| 2980 | .name = "ohci", |
| 2981 | .pa_start = 0x48064400, |
| 2982 | .pa_end = 0x480647ff, |
| 2983 | }, |
| 2984 | { |
| 2985 | .name = "ehci", |
| 2986 | .pa_start = 0x48064800, |
| 2987 | .pa_end = 0x48064cff, |
| 2988 | }, |
| 2989 | {} |
| 2990 | }; |
| 2991 | |
| 2992 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = { |
| 2993 | .master = &omap3xxx_l4_core_hwmod, |
| 2994 | .slave = &omap3xxx_usb_host_hs_hwmod, |
| 2995 | .clk = "usbhost_ick", |
| 2996 | .addr = omap3xxx_usb_host_hs_addrs, |
| 2997 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2998 | }; |
| 2999 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 3000 | static struct omap_hwmod_opt_clk omap3xxx_usb_host_hs_opt_clks[] = { |
| 3001 | { .role = "ehci_logic_fck", .clk = "usbhost_120m_fck", }, |
| 3002 | }; |
| 3003 | |
| 3004 | static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = { |
| 3005 | { .name = "ohci-irq", .irq = 76 }, |
| 3006 | { .name = "ehci-irq", .irq = 77 }, |
| 3007 | { .irq = -1 } |
| 3008 | }; |
| 3009 | |
| 3010 | static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { |
| 3011 | .name = "usb_host_hs", |
| 3012 | .class = &omap3xxx_usb_host_hs_hwmod_class, |
| 3013 | .clkdm_name = "l3_init_clkdm", |
| 3014 | .mpu_irqs = omap3xxx_usb_host_hs_irqs, |
| 3015 | .main_clk = "usbhost_48m_fck", |
| 3016 | .prcm = { |
| 3017 | .omap2 = { |
| 3018 | .module_offs = OMAP3430ES2_USBHOST_MOD, |
| 3019 | .prcm_reg_id = 1, |
| 3020 | .module_bit = OMAP3430ES2_EN_USBHOST1_SHIFT, |
| 3021 | .idlest_reg_id = 1, |
| 3022 | .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT, |
| 3023 | .idlest_stdby_bit = OMAP3430ES2_ST_USBHOST_STDBY_SHIFT, |
| 3024 | }, |
| 3025 | }, |
| 3026 | .opt_clks = omap3xxx_usb_host_hs_opt_clks, |
| 3027 | .opt_clks_cnt = ARRAY_SIZE(omap3xxx_usb_host_hs_opt_clks), |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 3028 | |
| 3029 | /* |
| 3030 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock |
| 3031 | * id: i660 |
| 3032 | * |
| 3033 | * Description: |
| 3034 | * In the following configuration : |
| 3035 | * - USBHOST module is set to smart-idle mode |
| 3036 | * - PRCM asserts idle_req to the USBHOST module ( This typically |
| 3037 | * happens when the system is going to a low power mode : all ports |
| 3038 | * have been suspended, the master part of the USBHOST module has |
| 3039 | * entered the standby state, and SW has cut the functional clocks) |
| 3040 | * - an USBHOST interrupt occurs before the module is able to answer |
| 3041 | * idle_ack, typically a remote wakeup IRQ. |
| 3042 | * Then the USB HOST module will enter a deadlock situation where it |
| 3043 | * is no more accessible nor functional. |
| 3044 | * |
| 3045 | * Workaround: |
| 3046 | * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE |
| 3047 | */ |
| 3048 | |
| 3049 | /* |
| 3050 | * Errata: USB host EHCI may stall when entering smart-standby mode |
| 3051 | * Id: i571 |
| 3052 | * |
| 3053 | * Description: |
| 3054 | * When the USBHOST module is set to smart-standby mode, and when it is |
| 3055 | * ready to enter the standby state (i.e. all ports are suspended and |
| 3056 | * all attached devices are in suspend mode), then it can wrongly assert |
| 3057 | * the Mstandby signal too early while there are still some residual OCP |
| 3058 | * transactions ongoing. If this condition occurs, the internal state |
| 3059 | * machine may go to an undefined state and the USB link may be stuck |
| 3060 | * upon the next resume. |
| 3061 | * |
| 3062 | * Workaround: |
| 3063 | * Don't use smart standby; use only force standby, |
| 3064 | * hence HWMOD_SWSUP_MSTANDBY |
| 3065 | */ |
| 3066 | |
| 3067 | /* |
| 3068 | * During system boot; If the hwmod framework resets the module |
| 3069 | * the module will have smart idle settings; which can lead to deadlock |
| 3070 | * (above Errata Id:i660); so, dont reset the module during boot; |
| 3071 | * Use HWMOD_INIT_NO_RESET. |
| 3072 | */ |
| 3073 | |
| 3074 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY | |
| 3075 | HWMOD_INIT_NO_RESET, |
| 3076 | }; |
| 3077 | |
| 3078 | /* |
| 3079 | * 'usb_tll_hs' class |
| 3080 | * usb_tll_hs module is the adapter on the usb_host_hs ports |
| 3081 | */ |
| 3082 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = { |
| 3083 | .rev_offs = 0x0000, |
| 3084 | .sysc_offs = 0x0010, |
| 3085 | .syss_offs = 0x0014, |
| 3086 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 3087 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 3088 | SYSC_HAS_AUTOIDLE), |
| 3089 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 3090 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 3091 | }; |
| 3092 | |
| 3093 | static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = { |
| 3094 | .name = "usb_tll_hs", |
| 3095 | .sysc = &omap3xxx_usb_tll_hs_sysc, |
| 3096 | }; |
| 3097 | |
| 3098 | static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = { |
| 3099 | { .name = "tll-irq", .irq = 78 }, |
| 3100 | { .irq = -1 } |
| 3101 | }; |
| 3102 | |
| 3103 | static struct omap_hwmod_addr_space omap3xxx_usb_tll_hs_addrs[] = { |
| 3104 | { |
| 3105 | .name = "tll", |
| 3106 | .pa_start = 0x48062000, |
| 3107 | .pa_end = 0x48062fff, |
| 3108 | .flags = ADDR_TYPE_RT |
| 3109 | }, |
| 3110 | {} |
| 3111 | }; |
| 3112 | |
| 3113 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = { |
| 3114 | .master = &omap3xxx_l4_core_hwmod, |
| 3115 | .slave = &omap3xxx_usb_tll_hs_hwmod, |
| 3116 | .clk = "usbtll_ick", |
| 3117 | .addr = omap3xxx_usb_tll_hs_addrs, |
| 3118 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 3119 | }; |
| 3120 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 3121 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { |
| 3122 | .name = "usb_tll_hs", |
| 3123 | .class = &omap3xxx_usb_tll_hs_hwmod_class, |
| 3124 | .clkdm_name = "l3_init_clkdm", |
| 3125 | .mpu_irqs = omap3xxx_usb_tll_hs_irqs, |
| 3126 | .main_clk = "usbtll_fck", |
| 3127 | .prcm = { |
| 3128 | .omap2 = { |
| 3129 | .module_offs = CORE_MOD, |
| 3130 | .prcm_reg_id = 3, |
| 3131 | .module_bit = OMAP3430ES2_EN_USBTLL_SHIFT, |
| 3132 | .idlest_reg_id = 3, |
| 3133 | .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, |
| 3134 | }, |
| 3135 | }, |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 3136 | }; |
| 3137 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3138 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { |
| 3139 | &omap3xxx_l3_main__l4_core, |
| 3140 | &omap3xxx_l3_main__l4_per, |
| 3141 | &omap3xxx_mpu__l3_main, |
| 3142 | &omap3xxx_l4_core__l4_wkup, |
| 3143 | &omap3xxx_l4_core__mmc3, |
| 3144 | &omap3_l4_core__uart1, |
| 3145 | &omap3_l4_core__uart2, |
| 3146 | &omap3_l4_per__uart3, |
| 3147 | &omap3_l4_core__i2c1, |
| 3148 | &omap3_l4_core__i2c2, |
| 3149 | &omap3_l4_core__i2c3, |
| 3150 | &omap3xxx_l4_wkup__l4_sec, |
| 3151 | &omap3xxx_l4_wkup__timer1, |
| 3152 | &omap3xxx_l4_per__timer2, |
| 3153 | &omap3xxx_l4_per__timer3, |
| 3154 | &omap3xxx_l4_per__timer4, |
| 3155 | &omap3xxx_l4_per__timer5, |
| 3156 | &omap3xxx_l4_per__timer6, |
| 3157 | &omap3xxx_l4_per__timer7, |
| 3158 | &omap3xxx_l4_per__timer8, |
| 3159 | &omap3xxx_l4_per__timer9, |
| 3160 | &omap3xxx_l4_core__timer10, |
| 3161 | &omap3xxx_l4_core__timer11, |
| 3162 | &omap3xxx_l4_wkup__wd_timer2, |
| 3163 | &omap3xxx_l4_wkup__gpio1, |
| 3164 | &omap3xxx_l4_per__gpio2, |
| 3165 | &omap3xxx_l4_per__gpio3, |
| 3166 | &omap3xxx_l4_per__gpio4, |
| 3167 | &omap3xxx_l4_per__gpio5, |
| 3168 | &omap3xxx_l4_per__gpio6, |
| 3169 | &omap3xxx_dma_system__l3, |
| 3170 | &omap3xxx_l4_core__dma_system, |
| 3171 | &omap3xxx_l4_core__mcbsp1, |
| 3172 | &omap3xxx_l4_per__mcbsp2, |
| 3173 | &omap3xxx_l4_per__mcbsp3, |
| 3174 | &omap3xxx_l4_per__mcbsp4, |
| 3175 | &omap3xxx_l4_core__mcbsp5, |
| 3176 | &omap3xxx_l4_per__mcbsp2_sidetone, |
| 3177 | &omap3xxx_l4_per__mcbsp3_sidetone, |
| 3178 | &omap34xx_l4_core__mcspi1, |
| 3179 | &omap34xx_l4_core__mcspi2, |
| 3180 | &omap34xx_l4_core__mcspi3, |
| 3181 | &omap34xx_l4_core__mcspi4, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 3182 | NULL, |
| 3183 | }; |
| 3184 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3185 | /* GP-only hwmod links */ |
| 3186 | static struct omap_hwmod_ocp_if *omap3xxx_gp_hwmod_ocp_ifs[] __initdata = { |
| 3187 | &omap3xxx_l4_sec__timer12, |
Aaro Koskinen | 91a36bd | 2011-12-15 22:38:37 -0700 | [diff] [blame] | 3188 | NULL |
| 3189 | }; |
| 3190 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3191 | /* 3430ES1-only hwmod links */ |
| 3192 | static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = { |
| 3193 | &omap3430es1_dss__l3, |
| 3194 | &omap3430es1_l4_core__dss, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3195 | NULL |
| 3196 | }; |
| 3197 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3198 | /* 3430ES2+-only hwmod links */ |
| 3199 | static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = { |
| 3200 | &omap3xxx_dss__l3, |
| 3201 | &omap3xxx_l4_core__dss, |
| 3202 | &omap3xxx_usbhsotg__l3, |
| 3203 | &omap3xxx_l4_core__usbhsotg, |
| 3204 | &omap3xxx_usb_host_hs__l3_main_2, |
| 3205 | &omap3xxx_l4_core__usb_host_hs, |
| 3206 | &omap3xxx_l4_core__usb_tll_hs, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3207 | NULL |
| 3208 | }; |
| 3209 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3210 | /* <= 3430ES3-only hwmod links */ |
| 3211 | static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = { |
| 3212 | &omap3xxx_l4_core__pre_es3_mmc1, |
| 3213 | &omap3xxx_l4_core__pre_es3_mmc2, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3214 | NULL |
| 3215 | }; |
| 3216 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3217 | /* 3430ES3+-only hwmod links */ |
| 3218 | static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = { |
| 3219 | &omap3xxx_l4_core__es3plus_mmc1, |
| 3220 | &omap3xxx_l4_core__es3plus_mmc2, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3221 | NULL |
| 3222 | }; |
| 3223 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3224 | /* 34xx-only hwmod links (all ES revisions) */ |
| 3225 | static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = { |
| 3226 | &omap3xxx_l3__iva, |
| 3227 | &omap34xx_l4_core__sr1, |
| 3228 | &omap34xx_l4_core__sr2, |
| 3229 | &omap3xxx_l4_core__mailbox, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3230 | NULL |
| 3231 | }; |
| 3232 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3233 | /* 36xx-only hwmod links (all ES revisions) */ |
| 3234 | static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = { |
| 3235 | &omap3xxx_l3__iva, |
| 3236 | &omap36xx_l4_per__uart4, |
| 3237 | &omap3xxx_dss__l3, |
| 3238 | &omap3xxx_l4_core__dss, |
| 3239 | &omap36xx_l4_core__sr1, |
| 3240 | &omap36xx_l4_core__sr2, |
| 3241 | &omap3xxx_usbhsotg__l3, |
| 3242 | &omap3xxx_l4_core__usbhsotg, |
| 3243 | &omap3xxx_l4_core__mailbox, |
| 3244 | &omap3xxx_usb_host_hs__l3_main_2, |
| 3245 | &omap3xxx_l4_core__usb_host_hs, |
| 3246 | &omap3xxx_l4_core__usb_tll_hs, |
| 3247 | &omap3xxx_l4_core__es3plus_mmc1, |
| 3248 | &omap3xxx_l4_core__es3plus_mmc2, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3249 | NULL |
| 3250 | }; |
| 3251 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3252 | static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = { |
| 3253 | &omap3xxx_dss__l3, |
| 3254 | &omap3xxx_l4_core__dss, |
| 3255 | &am35xx_usbhsotg__l3, |
| 3256 | &am35xx_l4_core__usbhsotg, |
| 3257 | &am35xx_l4_core__uart4, |
| 3258 | &omap3xxx_usb_host_hs__l3_main_2, |
| 3259 | &omap3xxx_l4_core__usb_host_hs, |
| 3260 | &omap3xxx_l4_core__usb_tll_hs, |
| 3261 | &omap3xxx_l4_core__es3plus_mmc1, |
| 3262 | &omap3xxx_l4_core__es3plus_mmc2, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3263 | NULL |
| 3264 | }; |
| 3265 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3266 | static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = { |
| 3267 | &omap3xxx_l4_core__dss_dispc, |
| 3268 | &omap3xxx_l4_core__dss_dsi1, |
| 3269 | &omap3xxx_l4_core__dss_rfbi, |
| 3270 | &omap3xxx_l4_core__dss_venc, |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 3271 | NULL |
| 3272 | }; |
| 3273 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 3274 | int __init omap3xxx_hwmod_init(void) |
| 3275 | { |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3276 | int r; |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3277 | struct omap_hwmod_ocp_if **h = NULL; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3278 | unsigned int rev; |
| 3279 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3280 | /* Register hwmod links common to all OMAP3 */ |
| 3281 | r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs); |
Paul Walmsley | ace9021 | 2011-10-06 14:39:28 -0600 | [diff] [blame] | 3282 | if (r < 0) |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3283 | return r; |
| 3284 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3285 | /* Register GP-only hwmod links. */ |
Aaro Koskinen | 91a36bd | 2011-12-15 22:38:37 -0700 | [diff] [blame] | 3286 | if (omap_type() == OMAP2_DEVICE_TYPE_GP) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3287 | r = omap_hwmod_register_links(omap3xxx_gp_hwmod_ocp_ifs); |
Aaro Koskinen | 91a36bd | 2011-12-15 22:38:37 -0700 | [diff] [blame] | 3288 | if (r < 0) |
| 3289 | return r; |
| 3290 | } |
| 3291 | |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3292 | rev = omap_rev(); |
| 3293 | |
| 3294 | /* |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3295 | * Register hwmod links common to individual OMAP3 families, all |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3296 | * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) |
| 3297 | * All possible revisions should be included in this conditional. |
| 3298 | */ |
| 3299 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
| 3300 | rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || |
| 3301 | rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3302 | h = omap34xx_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3303 | } else if (rev == OMAP3517_REV_ES1_0 || rev == OMAP3517_REV_ES1_1) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3304 | h = am35xx_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3305 | } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || |
| 3306 | rev == OMAP3630_REV_ES1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3307 | h = omap36xx_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3308 | } else { |
| 3309 | WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); |
| 3310 | return -EINVAL; |
| 3311 | }; |
| 3312 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3313 | r = omap_hwmod_register_links(h); |
Paul Walmsley | ace9021 | 2011-10-06 14:39:28 -0600 | [diff] [blame] | 3314 | if (r < 0) |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3315 | return r; |
| 3316 | |
| 3317 | /* |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3318 | * Register hwmod links specific to certain ES levels of a |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3319 | * particular family of silicon (e.g., 34xx ES1.0) |
| 3320 | */ |
| 3321 | h = NULL; |
| 3322 | if (rev == OMAP3430_REV_ES1_0) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3323 | h = omap3430es1_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3324 | } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || |
| 3325 | rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
| 3326 | rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3327 | h = omap3430es2plus_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3328 | }; |
| 3329 | |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3330 | if (h) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3331 | r = omap_hwmod_register_links(h); |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3332 | if (r < 0) |
| 3333 | return r; |
| 3334 | } |
| 3335 | |
| 3336 | h = NULL; |
| 3337 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
| 3338 | rev == OMAP3430_REV_ES2_1) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3339 | h = omap3430_pre_es3_hwmod_ocp_ifs; |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3340 | } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
| 3341 | rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3342 | h = omap3430_es3plus_hwmod_ocp_ifs; |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3343 | }; |
| 3344 | |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3345 | if (h) |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3346 | r = omap_hwmod_register_links(h); |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 3347 | if (r < 0) |
| 3348 | return r; |
| 3349 | |
| 3350 | /* |
| 3351 | * DSS code presumes that dss_core hwmod is handled first, |
| 3352 | * _before_ any other DSS related hwmods so register common |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3353 | * DSS hwmod links last to ensure that dss_core is already |
| 3354 | * registered. Otherwise some change things may happen, for |
| 3355 | * ex. if dispc is handled before dss_core and DSS is enabled |
| 3356 | * in bootloader DISPC will be reset with outputs enabled |
| 3357 | * which sometimes leads to unrecoverable L3 error. XXX The |
| 3358 | * long-term fix to this is to ensure hwmods are set up in |
| 3359 | * dependency order in the hwmod core code. |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 3360 | */ |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame^] | 3361 | r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs); |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3362 | |
| 3363 | return r; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 3364 | } |