Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 1 | /* |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 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 | 02bfc03 | 2009-09-03 20:14:05 +0300 | [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 | * XXX handle crossbar/shared link difference for L3? |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 13 | * XXX these should be marked initdata for multi-OMAP kernels |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 14 | */ |
Tony Lindgren | 3a8761c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 15 | |
| 16 | #include <linux/i2c-omap.h> |
Arnd Bergmann | 2203747 | 2012-08-24 15:21:06 +0200 | [diff] [blame] | 17 | #include <linux/platform_data/spi-omap2-mcspi.h> |
Tony Lindgren | 45c3eb7 | 2012-11-30 08:41:50 -0800 | [diff] [blame] | 18 | #include <linux/omap-dma.h> |
Thara Gopinath | eddb126 | 2011-02-23 00:14:04 -0700 | [diff] [blame] | 19 | #include <plat/dmtimer.h> |
Tony Lindgren | 2a296c8 | 2012-10-02 17:41:35 -0700 | [diff] [blame] | 20 | |
| 21 | #include "omap_hwmod.h" |
Tony Lindgren | 1e0f51a | 2012-09-20 11:42:02 -0700 | [diff] [blame] | 22 | #include "l3_2xxx.h" |
Tony Lindgren | 70606b1 | 2012-09-20 11:42:07 -0700 | [diff] [blame] | 23 | #include "l4_2xxx.h" |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 24 | |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 25 | #include "omap_hwmod_common_data.h" |
| 26 | |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame] | 27 | #include "cm-regbits-24xx.h" |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 28 | #include "prm-regbits-24xx.h" |
Tony Lindgren | 3a8761c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 29 | #include "i2c.h" |
Tony Lindgren | 68f39e7 | 2012-10-15 12:09:43 -0700 | [diff] [blame] | 30 | #include "mmc.h" |
Tony Lindgren | 3d82cbb | 2012-10-15 12:50:46 -0700 | [diff] [blame] | 31 | #include "serial.h" |
Paul Walmsley | ff2516f | 2010-12-21 15:39:15 -0700 | [diff] [blame] | 32 | #include "wd_timer.h" |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 33 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 34 | /* |
| 35 | * OMAP2420 hardware module integration data |
| 36 | * |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 37 | * All of the data in this section should be autogeneratable from the |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 38 | * TI hardware database or other technical documentation. Data that |
| 39 | * is driver-specific or driver-kernel integration-specific belongs |
| 40 | * elsewhere. |
| 41 | */ |
| 42 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 43 | /* |
| 44 | * IP blocks |
| 45 | */ |
Senthilvadivu Guruswamy | 996746c | 2011-02-22 09:50:36 +0200 | [diff] [blame] | 46 | |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 47 | /* IVA1 (IVA1) */ |
| 48 | static struct omap_hwmod_class iva1_hwmod_class = { |
| 49 | .name = "iva1", |
| 50 | }; |
| 51 | |
| 52 | static struct omap_hwmod_rst_info omap2420_iva_resets[] = { |
| 53 | { .name = "iva", .rst_shift = 8 }, |
| 54 | }; |
| 55 | |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 56 | static struct omap_hwmod omap2420_iva_hwmod = { |
| 57 | .name = "iva", |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 58 | .class = &iva1_hwmod_class, |
| 59 | .clkdm_name = "iva1_clkdm", |
| 60 | .rst_lines = omap2420_iva_resets, |
| 61 | .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets), |
| 62 | .main_clk = "iva1_ifck", |
| 63 | }; |
| 64 | |
| 65 | /* DSP */ |
| 66 | static struct omap_hwmod_class dsp_hwmod_class = { |
| 67 | .name = "dsp", |
| 68 | }; |
| 69 | |
| 70 | static struct omap_hwmod_rst_info omap2420_dsp_resets[] = { |
| 71 | { .name = "logic", .rst_shift = 0 }, |
| 72 | { .name = "mmu", .rst_shift = 1 }, |
| 73 | }; |
| 74 | |
| 75 | static struct omap_hwmod omap2420_dsp_hwmod = { |
| 76 | .name = "dsp", |
| 77 | .class = &dsp_hwmod_class, |
| 78 | .clkdm_name = "dsp_clkdm", |
| 79 | .rst_lines = omap2420_dsp_resets, |
| 80 | .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets), |
| 81 | .main_clk = "dsp_fck", |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 82 | }; |
| 83 | |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 84 | /* I2C common */ |
| 85 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 86 | .rev_offs = 0x00, |
| 87 | .sysc_offs = 0x20, |
| 88 | .syss_offs = 0x10, |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 89 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 90 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 91 | }; |
| 92 | |
| 93 | static struct omap_hwmod_class i2c_class = { |
| 94 | .name = "i2c", |
| 95 | .sysc = &i2c_sysc, |
Andy Green | db791a7 | 2011-07-10 05:27:15 -0600 | [diff] [blame] | 96 | .rev = OMAP_I2C_IP_VERSION_1, |
Avinash.H.M | 6d3c55f | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 97 | .reset = &omap_i2c_reset, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 98 | }; |
| 99 | |
Andy Green | 4d4441a | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 100 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
| 101 | .flags = OMAP_I2C_FLAG_NO_FIFO | |
| 102 | OMAP_I2C_FLAG_SIMPLE_CLOCK | |
| 103 | OMAP_I2C_FLAG_16BIT_DATA_REG | |
| 104 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
| 105 | }; |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 106 | |
| 107 | /* I2C1 */ |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 108 | static struct omap_hwmod omap2420_i2c1_hwmod = { |
| 109 | .name = "i2c1", |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 110 | .main_clk = "i2c1_fck", |
| 111 | .prcm = { |
| 112 | .omap2 = { |
| 113 | .module_offs = CORE_MOD, |
| 114 | .prcm_reg_id = 1, |
| 115 | .module_bit = OMAP2420_EN_I2C1_SHIFT, |
| 116 | .idlest_reg_id = 1, |
| 117 | .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT, |
| 118 | }, |
| 119 | }, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 120 | .class = &i2c_class, |
| 121 | .dev_attr = &i2c_dev_attr, |
Paul Walmsley | aff2f7d | 2013-01-26 00:48:56 -0700 | [diff] [blame] | 122 | /* |
| 123 | * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state |
| 124 | * while a transfer is active seems to cause the I2C block to |
| 125 | * timeout. Why? Good question." |
| 126 | */ |
| 127 | .flags = (HWMOD_16BIT_REG | HWMOD_BLOCK_WFI), |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 128 | }; |
| 129 | |
| 130 | /* I2C2 */ |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 131 | static struct omap_hwmod omap2420_i2c2_hwmod = { |
| 132 | .name = "i2c2", |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 133 | .main_clk = "i2c2_fck", |
| 134 | .prcm = { |
| 135 | .omap2 = { |
| 136 | .module_offs = CORE_MOD, |
| 137 | .prcm_reg_id = 1, |
| 138 | .module_bit = OMAP2420_EN_I2C2_SHIFT, |
| 139 | .idlest_reg_id = 1, |
| 140 | .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT, |
| 141 | }, |
| 142 | }, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 143 | .class = &i2c_class, |
| 144 | .dev_attr = &i2c_dev_attr, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 145 | .flags = HWMOD_16BIT_REG, |
| 146 | }; |
| 147 | |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 148 | /* dma attributes */ |
| 149 | static struct omap_dma_dev_attr dma_dev_attr = { |
| 150 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
| 151 | IS_CSSA_32 | IS_CDSA_32, |
| 152 | .lch_count = 32, |
| 153 | }; |
| 154 | |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 155 | static struct omap_hwmod omap2420_dma_system_hwmod = { |
| 156 | .name = "dma", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 157 | .class = &omap2xxx_dma_hwmod_class, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 158 | .mpu_irqs = omap2_dma_system_irqs, |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 159 | .main_clk = "core_l3_ck", |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 160 | .dev_attr = &dma_dev_attr, |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 161 | .flags = HWMOD_NO_IDLEST, |
| 162 | }; |
| 163 | |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 164 | /* mailbox */ |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 165 | static struct omap_hwmod omap2420_mailbox_hwmod = { |
| 166 | .name = "mailbox", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 167 | .class = &omap2xxx_mailbox_hwmod_class, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 168 | .main_clk = "mailboxes_ick", |
| 169 | .prcm = { |
| 170 | .omap2 = { |
| 171 | .prcm_reg_id = 1, |
| 172 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, |
| 173 | .module_offs = CORE_MOD, |
| 174 | .idlest_reg_id = 1, |
| 175 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
| 176 | }, |
| 177 | }, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 178 | }; |
| 179 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 180 | /* |
| 181 | * 'mcbsp' class |
| 182 | * multi channel buffered serial port controller |
| 183 | */ |
| 184 | |
| 185 | static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { |
| 186 | .name = "mcbsp", |
| 187 | }; |
| 188 | |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 189 | static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = { |
| 190 | { .role = "pad_fck", .clk = "mcbsp_clks" }, |
| 191 | { .role = "prcm_fck", .clk = "func_96m_ck" }, |
| 192 | }; |
| 193 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 194 | /* mcbsp1 */ |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 195 | static struct omap_hwmod omap2420_mcbsp1_hwmod = { |
| 196 | .name = "mcbsp1", |
| 197 | .class = &omap2420_mcbsp_hwmod_class, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 198 | .main_clk = "mcbsp1_fck", |
| 199 | .prcm = { |
| 200 | .omap2 = { |
| 201 | .prcm_reg_id = 1, |
| 202 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 203 | .module_offs = CORE_MOD, |
| 204 | .idlest_reg_id = 1, |
| 205 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, |
| 206 | }, |
| 207 | }, |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 208 | .opt_clks = mcbsp_opt_clks, |
| 209 | .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks), |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 210 | }; |
| 211 | |
| 212 | /* mcbsp2 */ |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 213 | static struct omap_hwmod omap2420_mcbsp2_hwmod = { |
| 214 | .name = "mcbsp2", |
| 215 | .class = &omap2420_mcbsp_hwmod_class, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 216 | .main_clk = "mcbsp2_fck", |
| 217 | .prcm = { |
| 218 | .omap2 = { |
| 219 | .prcm_reg_id = 1, |
| 220 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 221 | .module_offs = CORE_MOD, |
| 222 | .idlest_reg_id = 1, |
| 223 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, |
| 224 | }, |
| 225 | }, |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 226 | .opt_clks = mcbsp_opt_clks, |
| 227 | .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks), |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 228 | }; |
| 229 | |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 230 | static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = { |
| 231 | .rev_offs = 0x3c, |
| 232 | .sysc_offs = 0x64, |
| 233 | .syss_offs = 0x68, |
| 234 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
| 235 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 236 | }; |
| 237 | |
| 238 | static struct omap_hwmod_class omap2420_msdi_hwmod_class = { |
| 239 | .name = "msdi", |
| 240 | .sysc = &omap2420_msdi_sysc, |
| 241 | .reset = &omap_msdi_reset, |
| 242 | }; |
| 243 | |
| 244 | /* msdi1 */ |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 245 | static struct omap_hwmod omap2420_msdi1_hwmod = { |
| 246 | .name = "msdi1", |
| 247 | .class = &omap2420_msdi_hwmod_class, |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 248 | .main_clk = "mmc_fck", |
| 249 | .prcm = { |
| 250 | .omap2 = { |
| 251 | .prcm_reg_id = 1, |
| 252 | .module_bit = OMAP2420_EN_MMC_SHIFT, |
| 253 | .module_offs = CORE_MOD, |
| 254 | .idlest_reg_id = 1, |
| 255 | .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT, |
| 256 | }, |
| 257 | }, |
| 258 | .flags = HWMOD_16BIT_REG, |
| 259 | }; |
| 260 | |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 261 | /* HDQ1W/1-wire */ |
| 262 | static struct omap_hwmod omap2420_hdq1w_hwmod = { |
| 263 | .name = "hdq1w", |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 264 | .main_clk = "hdq_fck", |
| 265 | .prcm = { |
| 266 | .omap2 = { |
| 267 | .module_offs = CORE_MOD, |
| 268 | .prcm_reg_id = 1, |
| 269 | .module_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 270 | .idlest_reg_id = 1, |
| 271 | .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT, |
| 272 | }, |
| 273 | }, |
| 274 | .class = &omap2_hdq1w_class, |
| 275 | }; |
| 276 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 277 | /* |
| 278 | * interfaces |
| 279 | */ |
| 280 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 281 | /* L4 CORE -> I2C1 interface */ |
| 282 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 283 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 284 | .slave = &omap2420_i2c1_hwmod, |
| 285 | .clk = "i2c1_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 286 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 287 | }; |
| 288 | |
| 289 | /* L4 CORE -> I2C2 interface */ |
| 290 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 291 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 292 | .slave = &omap2420_i2c2_hwmod, |
| 293 | .clk = "i2c2_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 294 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 295 | }; |
| 296 | |
| 297 | /* IVA <- L3 interface */ |
| 298 | static struct omap_hwmod_ocp_if omap2420_l3__iva = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 299 | .master = &omap2xxx_l3_main_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 300 | .slave = &omap2420_iva_hwmod, |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 301 | .clk = "core_l3_ck", |
| 302 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 303 | }; |
| 304 | |
| 305 | /* DSP <- L3 interface */ |
| 306 | static struct omap_hwmod_ocp_if omap2420_l3__dsp = { |
| 307 | .master = &omap2xxx_l3_main_hwmod, |
| 308 | .slave = &omap2420_dsp_hwmod, |
| 309 | .clk = "dsp_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 310 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 311 | }; |
| 312 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 313 | /* l4_wkup -> timer1 */ |
| 314 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 315 | .master = &omap2xxx_l4_wkup_hwmod, |
| 316 | .slave = &omap2xxx_timer1_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 317 | .clk = "gpt1_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 318 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 319 | }; |
| 320 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 321 | /* l4_wkup -> wd_timer2 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 322 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 323 | .master = &omap2xxx_l4_wkup_hwmod, |
| 324 | .slave = &omap2xxx_wd_timer2_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 325 | .clk = "mpu_wdt_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 326 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 327 | }; |
| 328 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 329 | /* l4_wkup -> gpio1 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 330 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 331 | .master = &omap2xxx_l4_wkup_hwmod, |
| 332 | .slave = &omap2xxx_gpio1_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 333 | .clk = "gpios_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 334 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 335 | }; |
| 336 | |
| 337 | /* l4_wkup -> gpio2 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 338 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 339 | .master = &omap2xxx_l4_wkup_hwmod, |
| 340 | .slave = &omap2xxx_gpio2_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 341 | .clk = "gpios_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 342 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 343 | }; |
| 344 | |
| 345 | /* l4_wkup -> gpio3 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 346 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 347 | .master = &omap2xxx_l4_wkup_hwmod, |
| 348 | .slave = &omap2xxx_gpio3_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 349 | .clk = "gpios_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 350 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 351 | }; |
| 352 | |
| 353 | /* l4_wkup -> gpio4 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 354 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 355 | .master = &omap2xxx_l4_wkup_hwmod, |
| 356 | .slave = &omap2xxx_gpio4_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 357 | .clk = "gpios_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 358 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 359 | }; |
| 360 | |
| 361 | /* dma_system -> L3 */ |
| 362 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { |
| 363 | .master = &omap2420_dma_system_hwmod, |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 364 | .slave = &omap2xxx_l3_main_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 365 | .clk = "core_l3_ck", |
| 366 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 367 | }; |
| 368 | |
| 369 | /* l4_core -> dma_system */ |
| 370 | static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 371 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 372 | .slave = &omap2420_dma_system_hwmod, |
| 373 | .clk = "sdma_ick", |
| 374 | .addr = omap2_dma_system_addrs, |
| 375 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 376 | }; |
| 377 | |
| 378 | /* l4_core -> mailbox */ |
| 379 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 380 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 381 | .slave = &omap2420_mailbox_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 382 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 383 | }; |
| 384 | |
| 385 | /* l4_core -> mcbsp1 */ |
| 386 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 387 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 388 | .slave = &omap2420_mcbsp1_hwmod, |
| 389 | .clk = "mcbsp1_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 390 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 391 | }; |
| 392 | |
| 393 | /* l4_core -> mcbsp2 */ |
| 394 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 395 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 396 | .slave = &omap2420_mcbsp2_hwmod, |
| 397 | .clk = "mcbsp2_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 398 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 399 | }; |
| 400 | |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 401 | /* l4_core -> msdi1 */ |
| 402 | static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = { |
| 403 | .master = &omap2xxx_l4_core_hwmod, |
| 404 | .slave = &omap2420_msdi1_hwmod, |
| 405 | .clk = "mmc_ick", |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 406 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 407 | }; |
| 408 | |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 409 | /* l4_core -> hdq1w interface */ |
| 410 | static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = { |
| 411 | .master = &omap2xxx_l4_core_hwmod, |
| 412 | .slave = &omap2420_hdq1w_hwmod, |
| 413 | .clk = "hdq_ick", |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 414 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 415 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, |
| 416 | }; |
| 417 | |
| 418 | |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 419 | /* l4_wkup -> 32ksync_counter */ |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 420 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { |
| 421 | .master = &omap2xxx_l4_wkup_hwmod, |
| 422 | .slave = &omap2xxx_counter_32k_hwmod, |
| 423 | .clk = "sync_32k_ick", |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 424 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 425 | }; |
| 426 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 427 | static struct omap_hwmod_ocp_if omap2420_l3__gpmc = { |
| 428 | .master = &omap2xxx_l3_main_hwmod, |
| 429 | .slave = &omap2xxx_gpmc_hwmod, |
| 430 | .clk = "core_l3_ck", |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 431 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 432 | }; |
| 433 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 434 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 435 | &omap2xxx_l3_main__l4_core, |
| 436 | &omap2xxx_mpu__l3_main, |
| 437 | &omap2xxx_dss__l3, |
| 438 | &omap2xxx_l4_core__mcspi1, |
| 439 | &omap2xxx_l4_core__mcspi2, |
| 440 | &omap2xxx_l4_core__l4_wkup, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 441 | &omap2_l4_core__uart1, |
| 442 | &omap2_l4_core__uart2, |
| 443 | &omap2_l4_core__uart3, |
| 444 | &omap2420_l4_core__i2c1, |
| 445 | &omap2420_l4_core__i2c2, |
| 446 | &omap2420_l3__iva, |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 447 | &omap2420_l3__dsp, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 448 | &omap2420_l4_wkup__timer1, |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 449 | &omap2xxx_l4_core__timer2, |
| 450 | &omap2xxx_l4_core__timer3, |
| 451 | &omap2xxx_l4_core__timer4, |
| 452 | &omap2xxx_l4_core__timer5, |
| 453 | &omap2xxx_l4_core__timer6, |
| 454 | &omap2xxx_l4_core__timer7, |
| 455 | &omap2xxx_l4_core__timer8, |
| 456 | &omap2xxx_l4_core__timer9, |
| 457 | &omap2xxx_l4_core__timer10, |
| 458 | &omap2xxx_l4_core__timer11, |
| 459 | &omap2xxx_l4_core__timer12, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 460 | &omap2420_l4_wkup__wd_timer2, |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 461 | &omap2xxx_l4_core__dss, |
| 462 | &omap2xxx_l4_core__dss_dispc, |
| 463 | &omap2xxx_l4_core__dss_rfbi, |
| 464 | &omap2xxx_l4_core__dss_venc, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 465 | &omap2420_l4_wkup__gpio1, |
| 466 | &omap2420_l4_wkup__gpio2, |
| 467 | &omap2420_l4_wkup__gpio3, |
| 468 | &omap2420_l4_wkup__gpio4, |
| 469 | &omap2420_dma_system__l3, |
| 470 | &omap2420_l4_core__dma_system, |
| 471 | &omap2420_l4_core__mailbox, |
| 472 | &omap2420_l4_core__mcbsp1, |
| 473 | &omap2420_l4_core__mcbsp2, |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 474 | &omap2420_l4_core__msdi1, |
Paul Walmsley | e9b0a2f | 2012-09-23 17:28:25 -0600 | [diff] [blame] | 475 | &omap2xxx_l4_core__rng, |
Mark A. Greer | e569e99 | 2013-03-30 15:49:19 -0600 | [diff] [blame] | 476 | &omap2xxx_l4_core__sham, |
Mark A. Greer | 660ffd6 | 2012-12-21 09:28:09 -0700 | [diff] [blame] | 477 | &omap2xxx_l4_core__aes, |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 478 | &omap2420_l4_core__hdq1w, |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 479 | &omap2420_l4_wkup__counter_32k, |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 480 | &omap2420_l3__gpmc, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 481 | NULL, |
| 482 | }; |
| 483 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 484 | int __init omap2420_hwmod_init(void) |
| 485 | { |
Kevin Hilman | 9ebfd28 | 2012-06-18 12:12:23 -0600 | [diff] [blame] | 486 | omap_hwmod_init(); |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 487 | return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs); |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 488 | } |