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> |
Suman Anna | b8a7cf8 | 2013-01-28 17:21:58 -0600 | [diff] [blame^] | 19 | #include <linux/platform_data/mailbox-omap.h> |
Thara Gopinath | eddb126 | 2011-02-23 00:14:04 -0700 | [diff] [blame] | 20 | #include <plat/dmtimer.h> |
Tony Lindgren | 2a296c8 | 2012-10-02 17:41:35 -0700 | [diff] [blame] | 21 | |
| 22 | #include "omap_hwmod.h" |
Tony Lindgren | 1e0f51a | 2012-09-20 11:42:02 -0700 | [diff] [blame] | 23 | #include "l3_2xxx.h" |
Tony Lindgren | 70606b1 | 2012-09-20 11:42:07 -0700 | [diff] [blame] | 24 | #include "l4_2xxx.h" |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 25 | |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 26 | #include "omap_hwmod_common_data.h" |
| 27 | |
Varadarajan, Charulatha | a714b9c | 2010-09-23 20:02:39 +0530 | [diff] [blame] | 28 | #include "cm-regbits-24xx.h" |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 29 | #include "prm-regbits-24xx.h" |
Tony Lindgren | 3a8761c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 30 | #include "i2c.h" |
Tony Lindgren | 68f39e7 | 2012-10-15 12:09:43 -0700 | [diff] [blame] | 31 | #include "mmc.h" |
Tony Lindgren | 3d82cbb | 2012-10-15 12:50:46 -0700 | [diff] [blame] | 32 | #include "serial.h" |
Paul Walmsley | ff2516f | 2010-12-21 15:39:15 -0700 | [diff] [blame] | 33 | #include "wd_timer.h" |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 34 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 35 | /* |
| 36 | * OMAP2420 hardware module integration data |
| 37 | * |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 38 | * All of the data in this section should be autogeneratable from the |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 39 | * TI hardware database or other technical documentation. Data that |
| 40 | * is driver-specific or driver-kernel integration-specific belongs |
| 41 | * elsewhere. |
| 42 | */ |
| 43 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 44 | /* |
| 45 | * IP blocks |
| 46 | */ |
Senthilvadivu Guruswamy | 996746c | 2011-02-22 09:50:36 +0200 | [diff] [blame] | 47 | |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 48 | /* IVA1 (IVA1) */ |
| 49 | static struct omap_hwmod_class iva1_hwmod_class = { |
| 50 | .name = "iva1", |
| 51 | }; |
| 52 | |
| 53 | static struct omap_hwmod_rst_info omap2420_iva_resets[] = { |
| 54 | { .name = "iva", .rst_shift = 8 }, |
| 55 | }; |
| 56 | |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 57 | static struct omap_hwmod omap2420_iva_hwmod = { |
| 58 | .name = "iva", |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 59 | .class = &iva1_hwmod_class, |
| 60 | .clkdm_name = "iva1_clkdm", |
| 61 | .rst_lines = omap2420_iva_resets, |
| 62 | .rst_lines_cnt = ARRAY_SIZE(omap2420_iva_resets), |
| 63 | .main_clk = "iva1_ifck", |
| 64 | }; |
| 65 | |
| 66 | /* DSP */ |
| 67 | static struct omap_hwmod_class dsp_hwmod_class = { |
| 68 | .name = "dsp", |
| 69 | }; |
| 70 | |
| 71 | static struct omap_hwmod_rst_info omap2420_dsp_resets[] = { |
| 72 | { .name = "logic", .rst_shift = 0 }, |
| 73 | { .name = "mmu", .rst_shift = 1 }, |
| 74 | }; |
| 75 | |
| 76 | static struct omap_hwmod omap2420_dsp_hwmod = { |
| 77 | .name = "dsp", |
| 78 | .class = &dsp_hwmod_class, |
| 79 | .clkdm_name = "dsp_clkdm", |
| 80 | .rst_lines = omap2420_dsp_resets, |
| 81 | .rst_lines_cnt = ARRAY_SIZE(omap2420_dsp_resets), |
| 82 | .main_clk = "dsp_fck", |
Paul Walmsley | 08072ac | 2010-07-26 16:34:33 -0600 | [diff] [blame] | 83 | }; |
| 84 | |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 85 | /* I2C common */ |
| 86 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 87 | .rev_offs = 0x00, |
| 88 | .sysc_offs = 0x20, |
| 89 | .syss_offs = 0x10, |
Avinash.H.M | d73d65f | 2011-03-03 14:22:46 -0700 | [diff] [blame] | 90 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 91 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 92 | }; |
| 93 | |
| 94 | static struct omap_hwmod_class i2c_class = { |
| 95 | .name = "i2c", |
| 96 | .sysc = &i2c_sysc, |
Andy Green | db791a7 | 2011-07-10 05:27:15 -0600 | [diff] [blame] | 97 | .rev = OMAP_I2C_IP_VERSION_1, |
Avinash.H.M | 6d3c55f | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 98 | .reset = &omap_i2c_reset, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 99 | }; |
| 100 | |
Andy Green | 4d4441a | 2011-07-10 05:27:16 -0600 | [diff] [blame] | 101 | static struct omap_i2c_dev_attr i2c_dev_attr = { |
| 102 | .flags = OMAP_I2C_FLAG_NO_FIFO | |
| 103 | OMAP_I2C_FLAG_SIMPLE_CLOCK | |
| 104 | OMAP_I2C_FLAG_16BIT_DATA_REG | |
| 105 | OMAP_I2C_FLAG_BUS_SHIFT_2, |
| 106 | }; |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 107 | |
| 108 | /* I2C1 */ |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 109 | static struct omap_hwmod omap2420_i2c1_hwmod = { |
| 110 | .name = "i2c1", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 111 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 112 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 113 | .main_clk = "i2c1_fck", |
| 114 | .prcm = { |
| 115 | .omap2 = { |
| 116 | .module_offs = CORE_MOD, |
| 117 | .prcm_reg_id = 1, |
| 118 | .module_bit = OMAP2420_EN_I2C1_SHIFT, |
| 119 | .idlest_reg_id = 1, |
| 120 | .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT, |
| 121 | }, |
| 122 | }, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 123 | .class = &i2c_class, |
| 124 | .dev_attr = &i2c_dev_attr, |
Paul Walmsley | aff2f7d | 2013-01-26 00:48:56 -0700 | [diff] [blame] | 125 | /* |
| 126 | * From mach-omap2/pm24xx.c: "Putting MPU into the WFI state |
| 127 | * while a transfer is active seems to cause the I2C block to |
| 128 | * timeout. Why? Good question." |
| 129 | */ |
| 130 | .flags = (HWMOD_16BIT_REG | HWMOD_BLOCK_WFI), |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 131 | }; |
| 132 | |
| 133 | /* I2C2 */ |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 134 | static struct omap_hwmod omap2420_i2c2_hwmod = { |
| 135 | .name = "i2c2", |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 136 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 137 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 138 | .main_clk = "i2c2_fck", |
| 139 | .prcm = { |
| 140 | .omap2 = { |
| 141 | .module_offs = CORE_MOD, |
| 142 | .prcm_reg_id = 1, |
| 143 | .module_bit = OMAP2420_EN_I2C2_SHIFT, |
| 144 | .idlest_reg_id = 1, |
| 145 | .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT, |
| 146 | }, |
| 147 | }, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 148 | .class = &i2c_class, |
| 149 | .dev_attr = &i2c_dev_attr, |
Paul Walmsley | 2004290 | 2010-09-30 02:40:12 +0530 | [diff] [blame] | 150 | .flags = HWMOD_16BIT_REG, |
| 151 | }; |
| 152 | |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 153 | /* dma attributes */ |
| 154 | static struct omap_dma_dev_attr dma_dev_attr = { |
| 155 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
| 156 | IS_CSSA_32 | IS_CDSA_32, |
| 157 | .lch_count = 32, |
| 158 | }; |
| 159 | |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 160 | static struct omap_hwmod omap2420_dma_system_hwmod = { |
| 161 | .name = "dma", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 162 | .class = &omap2xxx_dma_hwmod_class, |
Paul Walmsley | 0d619a8 | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 163 | .mpu_irqs = omap2_dma_system_irqs, |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 164 | .main_clk = "core_l3_ck", |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 165 | .dev_attr = &dma_dev_attr, |
G, Manjunath Kondaiah | 745685df9 | 2010-12-20 18:27:18 -0800 | [diff] [blame] | 166 | .flags = HWMOD_NO_IDLEST, |
| 167 | }; |
| 168 | |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 169 | /* mailbox */ |
Suman Anna | b8a7cf8 | 2013-01-28 17:21:58 -0600 | [diff] [blame^] | 170 | static struct omap_mbox_dev_info omap2420_mailbox_info[] = { |
| 171 | { .name = "dsp", .tx_id = 0, .rx_id = 1, .irq_id = 0, .usr_id = 0 }, |
| 172 | { .name = "iva", .tx_id = 2, .rx_id = 3, .irq_id = 1, .usr_id = 3 }, |
| 173 | }; |
| 174 | |
| 175 | static struct omap_mbox_pdata omap2420_mailbox_attrs = { |
| 176 | .info_cnt = ARRAY_SIZE(omap2420_mailbox_info), |
| 177 | .info = omap2420_mailbox_info, |
| 178 | }; |
| 179 | |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 180 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 181 | { .name = "dsp", .irq = 26 + OMAP_INTC_START, }, |
| 182 | { .name = "iva", .irq = 34 + OMAP_INTC_START, }, |
| 183 | { .irq = -1 }, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 184 | }; |
| 185 | |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 186 | static struct omap_hwmod omap2420_mailbox_hwmod = { |
| 187 | .name = "mailbox", |
Paul Walmsley | 273b946 | 2011-07-09 19:14:08 -0600 | [diff] [blame] | 188 | .class = &omap2xxx_mailbox_hwmod_class, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 189 | .mpu_irqs = omap2420_mailbox_irqs, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 190 | .main_clk = "mailboxes_ick", |
| 191 | .prcm = { |
| 192 | .omap2 = { |
| 193 | .prcm_reg_id = 1, |
| 194 | .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT, |
| 195 | .module_offs = CORE_MOD, |
| 196 | .idlest_reg_id = 1, |
| 197 | .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT, |
| 198 | }, |
| 199 | }, |
Suman Anna | b8a7cf8 | 2013-01-28 17:21:58 -0600 | [diff] [blame^] | 200 | .dev_attr = &omap2420_mailbox_attrs, |
Omar Ramirez Luna | fca1ab5 | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 201 | }; |
| 202 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 203 | /* |
| 204 | * 'mcbsp' class |
| 205 | * multi channel buffered serial port controller |
| 206 | */ |
| 207 | |
| 208 | static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { |
| 209 | .name = "mcbsp", |
| 210 | }; |
| 211 | |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 212 | static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = { |
| 213 | { .role = "pad_fck", .clk = "mcbsp_clks" }, |
| 214 | { .role = "prcm_fck", .clk = "func_96m_ck" }, |
| 215 | }; |
| 216 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 217 | /* mcbsp1 */ |
| 218 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 219 | { .name = "tx", .irq = 59 + OMAP_INTC_START, }, |
| 220 | { .name = "rx", .irq = 60 + OMAP_INTC_START, }, |
| 221 | { .irq = -1 }, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 222 | }; |
| 223 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 224 | static struct omap_hwmod omap2420_mcbsp1_hwmod = { |
| 225 | .name = "mcbsp1", |
| 226 | .class = &omap2420_mcbsp_hwmod_class, |
| 227 | .mpu_irqs = omap2420_mcbsp1_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 228 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 229 | .main_clk = "mcbsp1_fck", |
| 230 | .prcm = { |
| 231 | .omap2 = { |
| 232 | .prcm_reg_id = 1, |
| 233 | .module_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
| 234 | .module_offs = CORE_MOD, |
| 235 | .idlest_reg_id = 1, |
| 236 | .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT, |
| 237 | }, |
| 238 | }, |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 239 | .opt_clks = mcbsp_opt_clks, |
| 240 | .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks), |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 241 | }; |
| 242 | |
| 243 | /* mcbsp2 */ |
| 244 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 245 | { .name = "tx", .irq = 62 + OMAP_INTC_START, }, |
| 246 | { .name = "rx", .irq = 63 + OMAP_INTC_START, }, |
| 247 | { .irq = -1 }, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 248 | }; |
| 249 | |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 250 | static struct omap_hwmod omap2420_mcbsp2_hwmod = { |
| 251 | .name = "mcbsp2", |
| 252 | .class = &omap2420_mcbsp_hwmod_class, |
| 253 | .mpu_irqs = omap2420_mcbsp2_irqs, |
Paul Walmsley | d826ebf | 2011-07-09 19:14:07 -0600 | [diff] [blame] | 254 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 255 | .main_clk = "mcbsp2_fck", |
| 256 | .prcm = { |
| 257 | .omap2 = { |
| 258 | .prcm_reg_id = 1, |
| 259 | .module_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
| 260 | .module_offs = CORE_MOD, |
| 261 | .idlest_reg_id = 1, |
| 262 | .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT, |
| 263 | }, |
| 264 | }, |
Peter Ujfalusi | b315310 | 2012-06-18 16:18:42 -0600 | [diff] [blame] | 265 | .opt_clks = mcbsp_opt_clks, |
| 266 | .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks), |
Charulatha V | 3cb72fa | 2011-02-24 12:51:46 -0800 | [diff] [blame] | 267 | }; |
| 268 | |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 269 | static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = { |
| 270 | .rev_offs = 0x3c, |
| 271 | .sysc_offs = 0x64, |
| 272 | .syss_offs = 0x68, |
| 273 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
| 274 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 275 | }; |
| 276 | |
| 277 | static struct omap_hwmod_class omap2420_msdi_hwmod_class = { |
| 278 | .name = "msdi", |
| 279 | .sysc = &omap2420_msdi_sysc, |
| 280 | .reset = &omap_msdi_reset, |
| 281 | }; |
| 282 | |
| 283 | /* msdi1 */ |
| 284 | static struct omap_hwmod_irq_info omap2420_msdi1_irqs[] = { |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 285 | { .irq = 83 + OMAP_INTC_START, }, |
| 286 | { .irq = -1 }, |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 287 | }; |
| 288 | |
| 289 | static struct omap_hwmod_dma_info omap2420_msdi1_sdma_reqs[] = { |
| 290 | { .name = "tx", .dma_req = 61 }, /* OMAP24XX_DMA_MMC1_TX */ |
| 291 | { .name = "rx", .dma_req = 62 }, /* OMAP24XX_DMA_MMC1_RX */ |
| 292 | { .dma_req = -1 } |
| 293 | }; |
| 294 | |
| 295 | static struct omap_hwmod omap2420_msdi1_hwmod = { |
| 296 | .name = "msdi1", |
| 297 | .class = &omap2420_msdi_hwmod_class, |
| 298 | .mpu_irqs = omap2420_msdi1_irqs, |
| 299 | .sdma_reqs = omap2420_msdi1_sdma_reqs, |
| 300 | .main_clk = "mmc_fck", |
| 301 | .prcm = { |
| 302 | .omap2 = { |
| 303 | .prcm_reg_id = 1, |
| 304 | .module_bit = OMAP2420_EN_MMC_SHIFT, |
| 305 | .module_offs = CORE_MOD, |
| 306 | .idlest_reg_id = 1, |
| 307 | .idlest_idle_bit = OMAP2420_ST_MMC_SHIFT, |
| 308 | }, |
| 309 | }, |
| 310 | .flags = HWMOD_16BIT_REG, |
| 311 | }; |
| 312 | |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 313 | /* HDQ1W/1-wire */ |
| 314 | static struct omap_hwmod omap2420_hdq1w_hwmod = { |
| 315 | .name = "hdq1w", |
| 316 | .mpu_irqs = omap2_hdq1w_mpu_irqs, |
| 317 | .main_clk = "hdq_fck", |
| 318 | .prcm = { |
| 319 | .omap2 = { |
| 320 | .module_offs = CORE_MOD, |
| 321 | .prcm_reg_id = 1, |
| 322 | .module_bit = OMAP24XX_EN_HDQ_SHIFT, |
| 323 | .idlest_reg_id = 1, |
| 324 | .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT, |
| 325 | }, |
| 326 | }, |
| 327 | .class = &omap2_hdq1w_class, |
| 328 | }; |
| 329 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 330 | /* |
| 331 | * interfaces |
| 332 | */ |
| 333 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 334 | /* L4 CORE -> I2C1 interface */ |
| 335 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 336 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 337 | .slave = &omap2420_i2c1_hwmod, |
| 338 | .clk = "i2c1_ick", |
| 339 | .addr = omap2_i2c1_addr_space, |
| 340 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 341 | }; |
| 342 | |
| 343 | /* L4 CORE -> I2C2 interface */ |
| 344 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 345 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 346 | .slave = &omap2420_i2c2_hwmod, |
| 347 | .clk = "i2c2_ick", |
| 348 | .addr = omap2_i2c2_addr_space, |
| 349 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 350 | }; |
| 351 | |
| 352 | /* IVA <- L3 interface */ |
| 353 | static struct omap_hwmod_ocp_if omap2420_l3__iva = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 354 | .master = &omap2xxx_l3_main_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 355 | .slave = &omap2420_iva_hwmod, |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 356 | .clk = "core_l3_ck", |
| 357 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 358 | }; |
| 359 | |
| 360 | /* DSP <- L3 interface */ |
| 361 | static struct omap_hwmod_ocp_if omap2420_l3__dsp = { |
| 362 | .master = &omap2xxx_l3_main_hwmod, |
| 363 | .slave = &omap2420_dsp_hwmod, |
| 364 | .clk = "dsp_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 365 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 366 | }; |
| 367 | |
| 368 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { |
| 369 | { |
| 370 | .pa_start = 0x48028000, |
| 371 | .pa_end = 0x48028000 + SZ_1K - 1, |
| 372 | .flags = ADDR_TYPE_RT |
| 373 | }, |
| 374 | { } |
| 375 | }; |
| 376 | |
| 377 | /* l4_wkup -> timer1 */ |
| 378 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 379 | .master = &omap2xxx_l4_wkup_hwmod, |
| 380 | .slave = &omap2xxx_timer1_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 381 | .clk = "gpt1_ick", |
| 382 | .addr = omap2420_timer1_addrs, |
| 383 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 384 | }; |
| 385 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 386 | /* l4_wkup -> wd_timer2 */ |
| 387 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { |
| 388 | { |
| 389 | .pa_start = 0x48022000, |
| 390 | .pa_end = 0x4802207f, |
| 391 | .flags = ADDR_TYPE_RT |
| 392 | }, |
| 393 | { } |
| 394 | }; |
| 395 | |
| 396 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 397 | .master = &omap2xxx_l4_wkup_hwmod, |
| 398 | .slave = &omap2xxx_wd_timer2_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 399 | .clk = "mpu_wdt_ick", |
| 400 | .addr = omap2420_wd_timer2_addrs, |
| 401 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 402 | }; |
| 403 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 404 | /* l4_wkup -> gpio1 */ |
| 405 | static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { |
| 406 | { |
| 407 | .pa_start = 0x48018000, |
| 408 | .pa_end = 0x480181ff, |
| 409 | .flags = ADDR_TYPE_RT |
| 410 | }, |
| 411 | { } |
| 412 | }; |
| 413 | |
| 414 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 415 | .master = &omap2xxx_l4_wkup_hwmod, |
| 416 | .slave = &omap2xxx_gpio1_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 417 | .clk = "gpios_ick", |
| 418 | .addr = omap2420_gpio1_addr_space, |
| 419 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 420 | }; |
| 421 | |
| 422 | /* l4_wkup -> gpio2 */ |
| 423 | static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = { |
| 424 | { |
| 425 | .pa_start = 0x4801a000, |
| 426 | .pa_end = 0x4801a1ff, |
| 427 | .flags = ADDR_TYPE_RT |
| 428 | }, |
| 429 | { } |
| 430 | }; |
| 431 | |
| 432 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 433 | .master = &omap2xxx_l4_wkup_hwmod, |
| 434 | .slave = &omap2xxx_gpio2_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 435 | .clk = "gpios_ick", |
| 436 | .addr = omap2420_gpio2_addr_space, |
| 437 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 438 | }; |
| 439 | |
| 440 | /* l4_wkup -> gpio3 */ |
| 441 | static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = { |
| 442 | { |
| 443 | .pa_start = 0x4801c000, |
| 444 | .pa_end = 0x4801c1ff, |
| 445 | .flags = ADDR_TYPE_RT |
| 446 | }, |
| 447 | { } |
| 448 | }; |
| 449 | |
| 450 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 451 | .master = &omap2xxx_l4_wkup_hwmod, |
| 452 | .slave = &omap2xxx_gpio3_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 453 | .clk = "gpios_ick", |
| 454 | .addr = omap2420_gpio3_addr_space, |
| 455 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 456 | }; |
| 457 | |
| 458 | /* l4_wkup -> gpio4 */ |
| 459 | static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = { |
| 460 | { |
| 461 | .pa_start = 0x4801e000, |
| 462 | .pa_end = 0x4801e1ff, |
| 463 | .flags = ADDR_TYPE_RT |
| 464 | }, |
| 465 | { } |
| 466 | }; |
| 467 | |
| 468 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 469 | .master = &omap2xxx_l4_wkup_hwmod, |
| 470 | .slave = &omap2xxx_gpio4_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 471 | .clk = "gpios_ick", |
| 472 | .addr = omap2420_gpio4_addr_space, |
| 473 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 474 | }; |
| 475 | |
| 476 | /* dma_system -> L3 */ |
| 477 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { |
| 478 | .master = &omap2420_dma_system_hwmod, |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 479 | .slave = &omap2xxx_l3_main_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 480 | .clk = "core_l3_ck", |
| 481 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 482 | }; |
| 483 | |
| 484 | /* l4_core -> dma_system */ |
| 485 | static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 486 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 487 | .slave = &omap2420_dma_system_hwmod, |
| 488 | .clk = "sdma_ick", |
| 489 | .addr = omap2_dma_system_addrs, |
| 490 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 491 | }; |
| 492 | |
| 493 | /* l4_core -> mailbox */ |
| 494 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 495 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 496 | .slave = &omap2420_mailbox_hwmod, |
| 497 | .addr = omap2_mailbox_addrs, |
| 498 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 499 | }; |
| 500 | |
| 501 | /* l4_core -> mcbsp1 */ |
| 502 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 503 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 504 | .slave = &omap2420_mcbsp1_hwmod, |
| 505 | .clk = "mcbsp1_ick", |
| 506 | .addr = omap2_mcbsp1_addrs, |
| 507 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 508 | }; |
| 509 | |
| 510 | /* l4_core -> mcbsp2 */ |
| 511 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { |
Paul Walmsley | cb48427 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 512 | .master = &omap2xxx_l4_core_hwmod, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 513 | .slave = &omap2420_mcbsp2_hwmod, |
| 514 | .clk = "mcbsp2_ick", |
| 515 | .addr = omap2xxx_mcbsp2_addrs, |
| 516 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 517 | }; |
| 518 | |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 519 | static struct omap_hwmod_addr_space omap2420_msdi1_addrs[] = { |
| 520 | { |
| 521 | .pa_start = 0x4809c000, |
| 522 | .pa_end = 0x4809c000 + SZ_128 - 1, |
| 523 | .flags = ADDR_TYPE_RT, |
| 524 | }, |
| 525 | { } |
| 526 | }; |
| 527 | |
| 528 | /* l4_core -> msdi1 */ |
| 529 | static struct omap_hwmod_ocp_if omap2420_l4_core__msdi1 = { |
| 530 | .master = &omap2xxx_l4_core_hwmod, |
| 531 | .slave = &omap2420_msdi1_hwmod, |
| 532 | .clk = "mmc_ick", |
| 533 | .addr = omap2420_msdi1_addrs, |
| 534 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 535 | }; |
| 536 | |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 537 | /* l4_core -> hdq1w interface */ |
| 538 | static struct omap_hwmod_ocp_if omap2420_l4_core__hdq1w = { |
| 539 | .master = &omap2xxx_l4_core_hwmod, |
| 540 | .slave = &omap2420_hdq1w_hwmod, |
| 541 | .clk = "hdq_ick", |
| 542 | .addr = omap2_hdq1w_addr_space, |
| 543 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 544 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, |
| 545 | }; |
| 546 | |
| 547 | |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 548 | /* l4_wkup -> 32ksync_counter */ |
| 549 | static struct omap_hwmod_addr_space omap2420_counter_32k_addrs[] = { |
| 550 | { |
| 551 | .pa_start = 0x48004000, |
| 552 | .pa_end = 0x4800401f, |
| 553 | .flags = ADDR_TYPE_RT |
| 554 | }, |
| 555 | { } |
| 556 | }; |
| 557 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 558 | static struct omap_hwmod_addr_space omap2420_gpmc_addrs[] = { |
| 559 | { |
| 560 | .pa_start = 0x6800a000, |
| 561 | .pa_end = 0x6800afff, |
| 562 | .flags = ADDR_TYPE_RT |
| 563 | }, |
| 564 | { } |
| 565 | }; |
| 566 | |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 567 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__counter_32k = { |
| 568 | .master = &omap2xxx_l4_wkup_hwmod, |
| 569 | .slave = &omap2xxx_counter_32k_hwmod, |
| 570 | .clk = "sync_32k_ick", |
| 571 | .addr = omap2420_counter_32k_addrs, |
| 572 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 573 | }; |
| 574 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 575 | static struct omap_hwmod_ocp_if omap2420_l3__gpmc = { |
| 576 | .master = &omap2xxx_l3_main_hwmod, |
| 577 | .slave = &omap2xxx_gpmc_hwmod, |
| 578 | .clk = "core_l3_ck", |
| 579 | .addr = omap2420_gpmc_addrs, |
| 580 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 581 | }; |
| 582 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 583 | static struct omap_hwmod_ocp_if *omap2420_hwmod_ocp_ifs[] __initdata = { |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 584 | &omap2xxx_l3_main__l4_core, |
| 585 | &omap2xxx_mpu__l3_main, |
| 586 | &omap2xxx_dss__l3, |
| 587 | &omap2xxx_l4_core__mcspi1, |
| 588 | &omap2xxx_l4_core__mcspi2, |
| 589 | &omap2xxx_l4_core__l4_wkup, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 590 | &omap2_l4_core__uart1, |
| 591 | &omap2_l4_core__uart2, |
| 592 | &omap2_l4_core__uart3, |
| 593 | &omap2420_l4_core__i2c1, |
| 594 | &omap2420_l4_core__i2c2, |
| 595 | &omap2420_l3__iva, |
Paul Walmsley | 3af35fb | 2012-04-19 04:04:38 -0600 | [diff] [blame] | 596 | &omap2420_l3__dsp, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 597 | &omap2420_l4_wkup__timer1, |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 598 | &omap2xxx_l4_core__timer2, |
| 599 | &omap2xxx_l4_core__timer3, |
| 600 | &omap2xxx_l4_core__timer4, |
| 601 | &omap2xxx_l4_core__timer5, |
| 602 | &omap2xxx_l4_core__timer6, |
| 603 | &omap2xxx_l4_core__timer7, |
| 604 | &omap2xxx_l4_core__timer8, |
| 605 | &omap2xxx_l4_core__timer9, |
| 606 | &omap2xxx_l4_core__timer10, |
| 607 | &omap2xxx_l4_core__timer11, |
| 608 | &omap2xxx_l4_core__timer12, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 609 | &omap2420_l4_wkup__wd_timer2, |
Paul Walmsley | 6a29755 | 2012-04-19 04:04:34 -0600 | [diff] [blame] | 610 | &omap2xxx_l4_core__dss, |
| 611 | &omap2xxx_l4_core__dss_dispc, |
| 612 | &omap2xxx_l4_core__dss_rfbi, |
| 613 | &omap2xxx_l4_core__dss_venc, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 614 | &omap2420_l4_wkup__gpio1, |
| 615 | &omap2420_l4_wkup__gpio2, |
| 616 | &omap2420_l4_wkup__gpio3, |
| 617 | &omap2420_l4_wkup__gpio4, |
| 618 | &omap2420_dma_system__l3, |
| 619 | &omap2420_l4_core__dma_system, |
| 620 | &omap2420_l4_core__mailbox, |
| 621 | &omap2420_l4_core__mcbsp1, |
| 622 | &omap2420_l4_core__mcbsp2, |
Tony Lindgren | ad1b666 | 2012-05-08 17:23:33 -0600 | [diff] [blame] | 623 | &omap2420_l4_core__msdi1, |
Paul Walmsley | e9b0a2f | 2012-09-23 17:28:25 -0600 | [diff] [blame] | 624 | &omap2xxx_l4_core__rng, |
Mark A. Greer | e569e99 | 2013-03-30 15:49:19 -0600 | [diff] [blame] | 625 | &omap2xxx_l4_core__sham, |
Mark A. Greer | 660ffd6 | 2012-12-21 09:28:09 -0700 | [diff] [blame] | 626 | &omap2xxx_l4_core__aes, |
Paul Walmsley | f32bd77 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 627 | &omap2420_l4_core__hdq1w, |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 628 | &omap2420_l4_wkup__counter_32k, |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 629 | &omap2420_l3__gpmc, |
Paul Walmsley | 02bfc03 | 2009-09-03 20:14:05 +0300 | [diff] [blame] | 630 | NULL, |
| 631 | }; |
| 632 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 633 | int __init omap2420_hwmod_init(void) |
| 634 | { |
Kevin Hilman | 9ebfd28 | 2012-06-18 12:12:23 -0600 | [diff] [blame] | 635 | omap_hwmod_init(); |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 636 | return omap_hwmod_register_links(omap2420_hwmod_ocp_ifs); |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 637 | } |