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