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 | */ |
Tony Lindgren | 3a8761c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 17 | |
| 18 | #include <linux/i2c-omap.h> |
Jean Pihet | b86aeaf | 2012-04-25 16:06:20 +0530 | [diff] [blame] | 19 | #include <linux/power/smartreflex.h> |
Tony Lindgren | 4b25408 | 2012-08-30 15:37:24 -0700 | [diff] [blame] | 20 | #include <linux/platform_data/gpio-omap.h> |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 21 | #include <linux/platform_data/hsmmc-omap.h> |
Jean Pihet | b86aeaf | 2012-04-25 16:06:20 +0530 | [diff] [blame] | 22 | |
Tony Lindgren | 45c3eb7 | 2012-11-30 08:41:50 -0800 | [diff] [blame] | 23 | #include <linux/omap-dma.h> |
Tony Lindgren | 79e3cb22 | 2012-09-20 11:42:04 -0700 | [diff] [blame] | 24 | #include "l3_3xxx.h" |
Tony Lindgren | 957988c | 2012-09-20 11:42:10 -0700 | [diff] [blame] | 25 | #include "l4_3xxx.h" |
Arnd Bergmann | 2203747 | 2012-08-24 15:21:06 +0200 | [diff] [blame] | 26 | #include <linux/platform_data/asoc-ti-mcbsp.h> |
| 27 | #include <linux/platform_data/spi-omap2-mcspi.h> |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 28 | #include <plat/dmtimer.h> |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 29 | |
Tony Lindgren | dbc0416 | 2012-08-31 10:59:07 -0700 | [diff] [blame] | 30 | #include "soc.h" |
Tony Lindgren | 2a296c8 | 2012-10-02 17:41:35 -0700 | [diff] [blame] | 31 | #include "omap_hwmod.h" |
Paul Walmsley | 43b4099 | 2010-02-22 22:09:34 -0700 | [diff] [blame] | 32 | #include "omap_hwmod_common_data.h" |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 33 | #include "prm-regbits-34xx.h" |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 34 | #include "cm-regbits-34xx.h" |
Lokesh Vutla | d5e7c86 | 2012-10-15 14:03:51 -0700 | [diff] [blame] | 35 | |
Tony Lindgren | 3a8761c | 2012-10-08 09:11:22 -0700 | [diff] [blame] | 36 | #include "i2c.h" |
Paul Walmsley | ff2516f | 2010-12-21 15:39:15 -0700 | [diff] [blame] | 37 | #include "wd_timer.h" |
Tony Lindgren | 3d82cbb | 2012-10-15 12:50:46 -0700 | [diff] [blame] | 38 | #include "serial.h" |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 39 | |
| 40 | /* |
| 41 | * OMAP3xxx hardware module integration data |
| 42 | * |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 43 | * All of the data in this section should be autogeneratable from the |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 44 | * TI hardware database or other technical documentation. Data that |
| 45 | * is driver-specific or driver-kernel integration-specific belongs |
| 46 | * elsewhere. |
| 47 | */ |
| 48 | |
Tony Lindgren | 13eeb0f | 2015-01-13 09:00:38 -0800 | [diff] [blame] | 49 | #define AM35XX_IPSS_USBOTGSS_BASE 0x5C040000 |
| 50 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 51 | /* |
| 52 | * IP blocks |
| 53 | */ |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 54 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 55 | /* L3 */ |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 56 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 57 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { |
| 58 | .name = "l3_main", |
| 59 | .class = &l3_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 60 | .flags = HWMOD_NO_IDLEST, |
| 61 | }; |
| 62 | |
| 63 | /* L4 CORE */ |
| 64 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { |
| 65 | .name = "l4_core", |
| 66 | .class = &l4_hwmod_class, |
| 67 | .flags = HWMOD_NO_IDLEST, |
| 68 | }; |
| 69 | |
| 70 | /* L4 PER */ |
| 71 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { |
| 72 | .name = "l4_per", |
| 73 | .class = &l4_hwmod_class, |
| 74 | .flags = HWMOD_NO_IDLEST, |
| 75 | }; |
| 76 | |
| 77 | /* L4 WKUP */ |
| 78 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { |
| 79 | .name = "l4_wkup", |
| 80 | .class = &l4_hwmod_class, |
| 81 | .flags = HWMOD_NO_IDLEST, |
| 82 | }; |
| 83 | |
| 84 | /* L4 SEC */ |
| 85 | static struct omap_hwmod omap3xxx_l4_sec_hwmod = { |
| 86 | .name = "l4_sec", |
| 87 | .class = &l4_hwmod_class, |
| 88 | .flags = HWMOD_NO_IDLEST, |
| 89 | }; |
| 90 | |
| 91 | /* MPU */ |
Jon Hunter | ee75d95 | 2012-09-23 17:28:29 -0600 | [diff] [blame] | 92 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 93 | static struct omap_hwmod omap3xxx_mpu_hwmod = { |
| 94 | .name = "mpu", |
| 95 | .class = &mpu_hwmod_class, |
| 96 | .main_clk = "arm_fck", |
| 97 | }; |
| 98 | |
| 99 | /* IVA2 (IVA2) */ |
Paul Walmsley | f42c549 | 2012-04-19 04:04:37 -0600 | [diff] [blame] | 100 | static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = { |
Tero Kristo | ed73361 | 2012-09-03 11:50:52 -0600 | [diff] [blame] | 101 | { .name = "logic", .rst_shift = 0, .st_shift = 8 }, |
| 102 | { .name = "seq0", .rst_shift = 1, .st_shift = 9 }, |
| 103 | { .name = "seq1", .rst_shift = 2, .st_shift = 10 }, |
Paul Walmsley | f42c549 | 2012-04-19 04:04:37 -0600 | [diff] [blame] | 104 | }; |
| 105 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 106 | static struct omap_hwmod omap3xxx_iva_hwmod = { |
| 107 | .name = "iva", |
| 108 | .class = &iva_hwmod_class, |
Paul Walmsley | f42c549 | 2012-04-19 04:04:37 -0600 | [diff] [blame] | 109 | .clkdm_name = "iva2_clkdm", |
| 110 | .rst_lines = omap3xxx_iva_resets, |
| 111 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_iva_resets), |
| 112 | .main_clk = "iva2_ck", |
Tero Kristo | ed73361 | 2012-09-03 11:50:52 -0600 | [diff] [blame] | 113 | .prcm = { |
| 114 | .omap2 = { |
| 115 | .module_offs = OMAP3430_IVA2_MOD, |
Tero Kristo | ed73361 | 2012-09-03 11:50:52 -0600 | [diff] [blame] | 116 | .idlest_reg_id = 1, |
| 117 | .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 118 | }, |
Tero Kristo | ed73361 | 2012-09-03 11:50:52 -0600 | [diff] [blame] | 119 | }, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 120 | }; |
| 121 | |
Jon Hunter | c7dad45f | 2012-09-23 17:28:28 -0600 | [diff] [blame] | 122 | /* |
| 123 | * 'debugss' class |
| 124 | * debug and emulation sub system |
| 125 | */ |
| 126 | |
| 127 | static struct omap_hwmod_class omap3xxx_debugss_hwmod_class = { |
| 128 | .name = "debugss", |
| 129 | }; |
| 130 | |
| 131 | /* debugss */ |
| 132 | static struct omap_hwmod omap3xxx_debugss_hwmod = { |
| 133 | .name = "debugss", |
| 134 | .class = &omap3xxx_debugss_hwmod_class, |
| 135 | .clkdm_name = "emu_clkdm", |
| 136 | .main_clk = "emu_src_ck", |
| 137 | .flags = HWMOD_NO_IDLEST, |
| 138 | }; |
| 139 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 140 | /* timer class */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 141 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { |
| 142 | .rev_offs = 0x0000, |
| 143 | .sysc_offs = 0x0010, |
| 144 | .syss_offs = 0x0014, |
Jon Hunter | 725a8fe | 2012-08-28 12:49:39 -0500 | [diff] [blame] | 145 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 146 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
Jon Hunter | f3a13e7 | 2012-08-28 12:55:27 -0500 | [diff] [blame] | 147 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE | |
| 148 | SYSS_HAS_RESET_STATUS), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 149 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 150 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 151 | }; |
| 152 | |
| 153 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { |
| 154 | .name = "timer", |
| 155 | .sysc = &omap3xxx_timer_sysc, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 156 | }; |
| 157 | |
| 158 | /* secure timers dev attribute */ |
| 159 | static struct omap_timer_capability_dev_attr capability_secure_dev_attr = { |
Jon Hunter | 139486f | 2012-06-05 12:34:53 -0500 | [diff] [blame] | 160 | .timer_capability = OMAP_TIMER_ALWON | OMAP_TIMER_SECURE, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 161 | }; |
| 162 | |
| 163 | /* always-on timers dev attribute */ |
| 164 | static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = { |
| 165 | .timer_capability = OMAP_TIMER_ALWON, |
| 166 | }; |
| 167 | |
| 168 | /* pwm timers dev attribute */ |
| 169 | static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = { |
| 170 | .timer_capability = OMAP_TIMER_HAS_PWM, |
| 171 | }; |
| 172 | |
Jon Hunter | 5c3e4ec | 2012-09-23 17:28:27 -0600 | [diff] [blame] | 173 | /* timers with DSP interrupt dev attribute */ |
| 174 | static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = { |
| 175 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ, |
| 176 | }; |
| 177 | |
| 178 | /* pwm timers with DSP interrupt dev attribute */ |
| 179 | static struct omap_timer_capability_dev_attr capability_dsp_pwm_dev_attr = { |
| 180 | .timer_capability = OMAP_TIMER_HAS_DSP_IRQ | OMAP_TIMER_HAS_PWM, |
| 181 | }; |
| 182 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 183 | /* timer1 */ |
| 184 | static struct omap_hwmod omap3xxx_timer1_hwmod = { |
| 185 | .name = "timer1", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 186 | .main_clk = "gpt1_fck", |
| 187 | .prcm = { |
| 188 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 189 | .module_offs = WKUP_MOD, |
| 190 | .idlest_reg_id = 1, |
| 191 | .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT, |
| 192 | }, |
| 193 | }, |
| 194 | .dev_attr = &capability_alwon_dev_attr, |
Jon Hunter | 725a8fe | 2012-08-28 12:49:39 -0500 | [diff] [blame] | 195 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 196 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 197 | }; |
| 198 | |
| 199 | /* timer2 */ |
| 200 | static struct omap_hwmod omap3xxx_timer2_hwmod = { |
| 201 | .name = "timer2", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 202 | .main_clk = "gpt2_fck", |
| 203 | .prcm = { |
| 204 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 205 | .module_offs = OMAP3430_PER_MOD, |
| 206 | .idlest_reg_id = 1, |
| 207 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, |
| 208 | }, |
| 209 | }, |
Jon Hunter | 725a8fe | 2012-08-28 12:49:39 -0500 | [diff] [blame] | 210 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 211 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 212 | }; |
| 213 | |
| 214 | /* timer3 */ |
| 215 | static struct omap_hwmod omap3xxx_timer3_hwmod = { |
| 216 | .name = "timer3", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 217 | .main_clk = "gpt3_fck", |
| 218 | .prcm = { |
| 219 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 220 | .module_offs = OMAP3430_PER_MOD, |
| 221 | .idlest_reg_id = 1, |
| 222 | .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT, |
| 223 | }, |
| 224 | }, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 225 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 226 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 227 | }; |
| 228 | |
| 229 | /* timer4 */ |
| 230 | static struct omap_hwmod omap3xxx_timer4_hwmod = { |
| 231 | .name = "timer4", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 232 | .main_clk = "gpt4_fck", |
| 233 | .prcm = { |
| 234 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 235 | .module_offs = OMAP3430_PER_MOD, |
| 236 | .idlest_reg_id = 1, |
| 237 | .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT, |
| 238 | }, |
| 239 | }, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 240 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 241 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 242 | }; |
| 243 | |
| 244 | /* timer5 */ |
| 245 | static struct omap_hwmod omap3xxx_timer5_hwmod = { |
| 246 | .name = "timer5", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 247 | .main_clk = "gpt5_fck", |
| 248 | .prcm = { |
| 249 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 250 | .module_offs = OMAP3430_PER_MOD, |
| 251 | .idlest_reg_id = 1, |
| 252 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, |
| 253 | }, |
| 254 | }, |
Jon Hunter | 5c3e4ec | 2012-09-23 17:28:27 -0600 | [diff] [blame] | 255 | .dev_attr = &capability_dsp_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 256 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 257 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 258 | }; |
| 259 | |
| 260 | /* timer6 */ |
| 261 | static struct omap_hwmod omap3xxx_timer6_hwmod = { |
| 262 | .name = "timer6", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 263 | .main_clk = "gpt6_fck", |
| 264 | .prcm = { |
| 265 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 266 | .module_offs = OMAP3430_PER_MOD, |
| 267 | .idlest_reg_id = 1, |
| 268 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, |
| 269 | }, |
| 270 | }, |
Jon Hunter | 5c3e4ec | 2012-09-23 17:28:27 -0600 | [diff] [blame] | 271 | .dev_attr = &capability_dsp_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 272 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 273 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 274 | }; |
| 275 | |
| 276 | /* timer7 */ |
| 277 | static struct omap_hwmod omap3xxx_timer7_hwmod = { |
| 278 | .name = "timer7", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 279 | .main_clk = "gpt7_fck", |
| 280 | .prcm = { |
| 281 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 282 | .module_offs = OMAP3430_PER_MOD, |
| 283 | .idlest_reg_id = 1, |
| 284 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, |
| 285 | }, |
| 286 | }, |
Jon Hunter | 5c3e4ec | 2012-09-23 17:28:27 -0600 | [diff] [blame] | 287 | .dev_attr = &capability_dsp_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 288 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 289 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | /* timer8 */ |
| 293 | static struct omap_hwmod omap3xxx_timer8_hwmod = { |
| 294 | .name = "timer8", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 295 | .main_clk = "gpt8_fck", |
| 296 | .prcm = { |
| 297 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 298 | .module_offs = OMAP3430_PER_MOD, |
| 299 | .idlest_reg_id = 1, |
| 300 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, |
| 301 | }, |
| 302 | }, |
Jon Hunter | 5c3e4ec | 2012-09-23 17:28:27 -0600 | [diff] [blame] | 303 | .dev_attr = &capability_dsp_pwm_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 304 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 305 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 306 | }; |
| 307 | |
| 308 | /* timer9 */ |
| 309 | static struct omap_hwmod omap3xxx_timer9_hwmod = { |
| 310 | .name = "timer9", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 311 | .main_clk = "gpt9_fck", |
| 312 | .prcm = { |
| 313 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 314 | .module_offs = OMAP3430_PER_MOD, |
| 315 | .idlest_reg_id = 1, |
| 316 | .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT, |
| 317 | }, |
| 318 | }, |
| 319 | .dev_attr = &capability_pwm_dev_attr, |
| 320 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 321 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 322 | }; |
| 323 | |
| 324 | /* timer10 */ |
| 325 | static struct omap_hwmod omap3xxx_timer10_hwmod = { |
| 326 | .name = "timer10", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 327 | .main_clk = "gpt10_fck", |
| 328 | .prcm = { |
| 329 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 330 | .module_offs = CORE_MOD, |
| 331 | .idlest_reg_id = 1, |
| 332 | .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT, |
| 333 | }, |
| 334 | }, |
| 335 | .dev_attr = &capability_pwm_dev_attr, |
Jon Hunter | 725a8fe | 2012-08-28 12:49:39 -0500 | [diff] [blame] | 336 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 337 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 338 | }; |
| 339 | |
| 340 | /* timer11 */ |
| 341 | static struct omap_hwmod omap3xxx_timer11_hwmod = { |
| 342 | .name = "timer11", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 343 | .main_clk = "gpt11_fck", |
| 344 | .prcm = { |
| 345 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 346 | .module_offs = CORE_MOD, |
| 347 | .idlest_reg_id = 1, |
| 348 | .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT, |
| 349 | }, |
| 350 | }, |
| 351 | .dev_attr = &capability_pwm_dev_attr, |
| 352 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 353 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 354 | }; |
| 355 | |
| 356 | /* timer12 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 357 | |
| 358 | static struct omap_hwmod omap3xxx_timer12_hwmod = { |
| 359 | .name = "timer12", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 360 | .main_clk = "gpt12_fck", |
| 361 | .prcm = { |
| 362 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 363 | .module_offs = WKUP_MOD, |
| 364 | .idlest_reg_id = 1, |
| 365 | .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT, |
| 366 | }, |
| 367 | }, |
| 368 | .dev_attr = &capability_secure_dev_attr, |
| 369 | .class = &omap3xxx_timer_hwmod_class, |
Jon Hunter | 10759e8 | 2012-07-11 13:00:13 -0500 | [diff] [blame] | 370 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 371 | }; |
| 372 | |
| 373 | /* |
| 374 | * 'wd_timer' class |
| 375 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
| 376 | * overflow condition |
| 377 | */ |
| 378 | |
| 379 | static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = { |
| 380 | .rev_offs = 0x0000, |
| 381 | .sysc_offs = 0x0010, |
| 382 | .syss_offs = 0x0014, |
| 383 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | |
| 384 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 385 | SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | |
| 386 | SYSS_HAS_RESET_STATUS), |
| 387 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 388 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 389 | }; |
| 390 | |
| 391 | /* I2C common */ |
| 392 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
| 393 | .rev_offs = 0x00, |
| 394 | .sysc_offs = 0x20, |
| 395 | .syss_offs = 0x10, |
| 396 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 397 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 398 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 399 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 400 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 401 | }; |
| 402 | |
| 403 | static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { |
| 404 | .name = "wd_timer", |
| 405 | .sysc = &omap3xxx_wd_timer_sysc, |
Kevin Hilman | 414e412 | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 406 | .pre_shutdown = &omap2_wd_timer_disable, |
| 407 | .reset = &omap2_wd_timer_reset, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 408 | }; |
| 409 | |
| 410 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { |
| 411 | .name = "wd_timer2", |
| 412 | .class = &omap3xxx_wd_timer_hwmod_class, |
| 413 | .main_clk = "wdt2_fck", |
| 414 | .prcm = { |
| 415 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 416 | .module_offs = WKUP_MOD, |
| 417 | .idlest_reg_id = 1, |
| 418 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, |
| 419 | }, |
| 420 | }, |
| 421 | /* |
| 422 | * XXX: Use software supervised mode, HW supervised smartidle seems to |
| 423 | * block CORE power domain idle transitions. Maybe a HW bug in wdt2? |
| 424 | */ |
| 425 | .flags = HWMOD_SWSUP_SIDLE, |
| 426 | }; |
| 427 | |
| 428 | /* UART1 */ |
| 429 | static struct omap_hwmod omap3xxx_uart1_hwmod = { |
| 430 | .name = "uart1", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 431 | .main_clk = "uart1_fck", |
Tony Lindgren | a2fc366 | 2014-09-18 08:58:49 -0700 | [diff] [blame] | 432 | .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 433 | .prcm = { |
| 434 | .omap2 = { |
| 435 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 436 | .idlest_reg_id = 1, |
| 437 | .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT, |
| 438 | }, |
| 439 | }, |
| 440 | .class = &omap2_uart_class, |
| 441 | }; |
| 442 | |
| 443 | /* UART2 */ |
| 444 | static struct omap_hwmod omap3xxx_uart2_hwmod = { |
| 445 | .name = "uart2", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 446 | .main_clk = "uart2_fck", |
Tony Lindgren | a2fc366 | 2014-09-18 08:58:49 -0700 | [diff] [blame] | 447 | .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 448 | .prcm = { |
| 449 | .omap2 = { |
| 450 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 451 | .idlest_reg_id = 1, |
| 452 | .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT, |
| 453 | }, |
| 454 | }, |
| 455 | .class = &omap2_uart_class, |
| 456 | }; |
| 457 | |
| 458 | /* UART3 */ |
| 459 | static struct omap_hwmod omap3xxx_uart3_hwmod = { |
| 460 | .name = "uart3", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 461 | .main_clk = "uart3_fck", |
Rajendra Nayak | 7dedd34 | 2013-07-28 23:01:48 -0600 | [diff] [blame] | 462 | .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS | |
Tony Lindgren | a2fc366 | 2014-09-18 08:58:49 -0700 | [diff] [blame] | 463 | HWMOD_SWSUP_SIDLE, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 464 | .prcm = { |
| 465 | .omap2 = { |
| 466 | .module_offs = OMAP3430_PER_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 467 | .idlest_reg_id = 1, |
| 468 | .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT, |
| 469 | }, |
| 470 | }, |
| 471 | .class = &omap2_uart_class, |
| 472 | }; |
| 473 | |
| 474 | /* UART4 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 475 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 476 | |
| 477 | static struct omap_hwmod omap36xx_uart4_hwmod = { |
| 478 | .name = "uart4", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 479 | .main_clk = "uart4_fck", |
Tony Lindgren | a2fc366 | 2014-09-18 08:58:49 -0700 | [diff] [blame] | 480 | .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 481 | .prcm = { |
| 482 | .omap2 = { |
| 483 | .module_offs = OMAP3430_PER_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 484 | .idlest_reg_id = 1, |
| 485 | .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT, |
| 486 | }, |
| 487 | }, |
| 488 | .class = &omap2_uart_class, |
| 489 | }; |
| 490 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 491 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 492 | |
Paul Walmsley | 82ee620 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 493 | /* |
| 494 | * XXX AM35xx UART4 cannot complete its softreset without uart1_fck or |
| 495 | * uart2_fck being enabled. So we add uart1_fck as an optional clock, |
| 496 | * below, and set the HWMOD_CONTROL_OPT_CLKS_IN_RESET. This really |
| 497 | * should not be needed. The functional clock structure of the AM35xx |
| 498 | * UART4 is extremely unclear and opaque; it is unclear what the role |
| 499 | * of uart1/2_fck is for the UART4. Any clarification from either |
| 500 | * empirical testing or the AM3505/3517 hardware designers would be |
| 501 | * most welcome. |
| 502 | */ |
| 503 | static struct omap_hwmod_opt_clk am35xx_uart4_opt_clks[] = { |
| 504 | { .role = "softreset_uart1_fck", .clk = "uart1_fck" }, |
| 505 | }; |
| 506 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 507 | static struct omap_hwmod am35xx_uart4_hwmod = { |
| 508 | .name = "uart4", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 509 | .main_clk = "uart4_fck", |
| 510 | .prcm = { |
| 511 | .omap2 = { |
| 512 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 513 | .idlest_reg_id = 1, |
Paul Walmsley | bf76523 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 514 | .idlest_idle_bit = AM35XX_ST_UART4_SHIFT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 515 | }, |
| 516 | }, |
Paul Walmsley | 82ee620 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 517 | .opt_clks = am35xx_uart4_opt_clks, |
| 518 | .opt_clks_cnt = ARRAY_SIZE(am35xx_uart4_opt_clks), |
| 519 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 520 | .class = &omap2_uart_class, |
| 521 | }; |
| 522 | |
| 523 | static struct omap_hwmod_class i2c_class = { |
| 524 | .name = "i2c", |
| 525 | .sysc = &i2c_sysc, |
| 526 | .rev = OMAP_I2C_IP_VERSION_1, |
| 527 | .reset = &omap_i2c_reset, |
| 528 | }; |
| 529 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 530 | /* dss */ |
| 531 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { |
| 532 | /* |
| 533 | * The DSS HW needs all DSS clocks enabled during reset. The dss_core |
| 534 | * driver does not use these clocks. |
| 535 | */ |
| 536 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
| 537 | { .role = "tv_clk", .clk = "dss_tv_fck" }, |
| 538 | /* required only on OMAP3430 */ |
| 539 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, |
| 540 | }; |
| 541 | |
| 542 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { |
| 543 | .name = "dss_core", |
| 544 | .class = &omap2_dss_hwmod_class, |
| 545 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 546 | .prcm = { |
| 547 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 548 | .module_offs = OMAP3430_DSS_MOD, |
| 549 | .idlest_reg_id = 1, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 550 | }, |
| 551 | }, |
| 552 | .opt_clks = dss_opt_clks, |
| 553 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
| 554 | .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
| 555 | }; |
| 556 | |
| 557 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { |
| 558 | .name = "dss_core", |
| 559 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
| 560 | .class = &omap2_dss_hwmod_class, |
| 561 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 562 | .prcm = { |
| 563 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 564 | .module_offs = OMAP3430_DSS_MOD, |
| 565 | .idlest_reg_id = 1, |
| 566 | .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 567 | }, |
| 568 | }, |
| 569 | .opt_clks = dss_opt_clks, |
| 570 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), |
| 571 | }; |
| 572 | |
| 573 | /* |
| 574 | * 'dispc' class |
| 575 | * display controller |
| 576 | */ |
| 577 | |
| 578 | static struct omap_hwmod_class_sysconfig omap3_dispc_sysc = { |
| 579 | .rev_offs = 0x0000, |
| 580 | .sysc_offs = 0x0010, |
| 581 | .syss_offs = 0x0014, |
| 582 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | |
| 583 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 584 | SYSC_HAS_ENAWAKEUP), |
| 585 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 586 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 587 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 588 | }; |
| 589 | |
| 590 | static struct omap_hwmod_class omap3_dispc_hwmod_class = { |
| 591 | .name = "dispc", |
| 592 | .sysc = &omap3_dispc_sysc, |
| 593 | }; |
| 594 | |
| 595 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { |
| 596 | .name = "dss_dispc", |
| 597 | .class = &omap3_dispc_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 598 | .main_clk = "dss1_alwon_fck", |
| 599 | .prcm = { |
| 600 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 601 | .module_offs = OMAP3430_DSS_MOD, |
| 602 | }, |
| 603 | }, |
| 604 | .flags = HWMOD_NO_IDLEST, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 605 | .dev_attr = &omap2_3_dss_dispc_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 606 | }; |
| 607 | |
| 608 | /* |
| 609 | * 'dsi' class |
| 610 | * display serial interface controller |
| 611 | */ |
| 612 | |
Sebastian Reichel | b46211d | 2016-06-24 03:59:33 +0200 | [diff] [blame] | 613 | static struct omap_hwmod_class_sysconfig omap3xxx_dsi_sysc = { |
| 614 | .rev_offs = 0x0000, |
| 615 | .sysc_offs = 0x0010, |
| 616 | .syss_offs = 0x0014, |
| 617 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | |
| 618 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
| 619 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
| 620 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 621 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 622 | }; |
| 623 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 624 | static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { |
| 625 | .name = "dsi", |
Sebastian Reichel | b46211d | 2016-06-24 03:59:33 +0200 | [diff] [blame] | 626 | .sysc = &omap3xxx_dsi_sysc, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 627 | }; |
| 628 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 629 | /* dss_dsi1 */ |
| 630 | static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = { |
| 631 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, |
| 632 | }; |
| 633 | |
| 634 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { |
| 635 | .name = "dss_dsi1", |
| 636 | .class = &omap3xxx_dsi_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 637 | .main_clk = "dss1_alwon_fck", |
| 638 | .prcm = { |
| 639 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 640 | .module_offs = OMAP3430_DSS_MOD, |
| 641 | }, |
| 642 | }, |
| 643 | .opt_clks = dss_dsi1_opt_clks, |
| 644 | .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks), |
| 645 | .flags = HWMOD_NO_IDLEST, |
| 646 | }; |
| 647 | |
| 648 | static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = { |
| 649 | { .role = "ick", .clk = "dss_ick" }, |
| 650 | }; |
| 651 | |
| 652 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { |
| 653 | .name = "dss_rfbi", |
| 654 | .class = &omap2_rfbi_hwmod_class, |
| 655 | .main_clk = "dss1_alwon_fck", |
| 656 | .prcm = { |
| 657 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 658 | .module_offs = OMAP3430_DSS_MOD, |
| 659 | }, |
| 660 | }, |
| 661 | .opt_clks = dss_rfbi_opt_clks, |
| 662 | .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks), |
| 663 | .flags = HWMOD_NO_IDLEST, |
| 664 | }; |
| 665 | |
| 666 | static struct omap_hwmod_opt_clk dss_venc_opt_clks[] = { |
| 667 | /* required only on OMAP3430 */ |
| 668 | { .role = "tv_dac_clk", .clk = "dss_96m_fck" }, |
| 669 | }; |
| 670 | |
| 671 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { |
| 672 | .name = "dss_venc", |
| 673 | .class = &omap2_venc_hwmod_class, |
| 674 | .main_clk = "dss_tv_fck", |
| 675 | .prcm = { |
| 676 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 677 | .module_offs = OMAP3430_DSS_MOD, |
| 678 | }, |
| 679 | }, |
| 680 | .opt_clks = dss_venc_opt_clks, |
| 681 | .opt_clks_cnt = ARRAY_SIZE(dss_venc_opt_clks), |
| 682 | .flags = HWMOD_NO_IDLEST, |
| 683 | }; |
| 684 | |
| 685 | /* I2C1 */ |
| 686 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
| 687 | .fifo_depth = 8, /* bytes */ |
Shubhrajyoti D | 972deb4 | 2012-11-26 15:25:11 +0530 | [diff] [blame] | 688 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_2, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 689 | }; |
| 690 | |
| 691 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { |
| 692 | .name = "i2c1", |
| 693 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 694 | .main_clk = "i2c1_fck", |
| 695 | .prcm = { |
| 696 | .omap2 = { |
| 697 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 698 | .idlest_reg_id = 1, |
| 699 | .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT, |
| 700 | }, |
| 701 | }, |
| 702 | .class = &i2c_class, |
| 703 | .dev_attr = &i2c1_dev_attr, |
| 704 | }; |
| 705 | |
| 706 | /* I2C2 */ |
| 707 | static struct omap_i2c_dev_attr i2c2_dev_attr = { |
| 708 | .fifo_depth = 8, /* bytes */ |
Shubhrajyoti D | 972deb4 | 2012-11-26 15:25:11 +0530 | [diff] [blame] | 709 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_2, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 710 | }; |
| 711 | |
| 712 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { |
| 713 | .name = "i2c2", |
| 714 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 715 | .main_clk = "i2c2_fck", |
| 716 | .prcm = { |
| 717 | .omap2 = { |
| 718 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 719 | .idlest_reg_id = 1, |
| 720 | .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT, |
| 721 | }, |
| 722 | }, |
| 723 | .class = &i2c_class, |
| 724 | .dev_attr = &i2c2_dev_attr, |
| 725 | }; |
| 726 | |
| 727 | /* I2C3 */ |
| 728 | static struct omap_i2c_dev_attr i2c3_dev_attr = { |
| 729 | .fifo_depth = 64, /* bytes */ |
Shubhrajyoti D | 972deb4 | 2012-11-26 15:25:11 +0530 | [diff] [blame] | 730 | .flags = OMAP_I2C_FLAG_BUS_SHIFT_2, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 731 | }; |
| 732 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 733 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 734 | |
| 735 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { |
| 736 | .name = "i2c3", |
| 737 | .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 738 | .main_clk = "i2c3_fck", |
| 739 | .prcm = { |
| 740 | .omap2 = { |
| 741 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 742 | .idlest_reg_id = 1, |
| 743 | .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT, |
| 744 | }, |
| 745 | }, |
| 746 | .class = &i2c_class, |
| 747 | .dev_attr = &i2c3_dev_attr, |
| 748 | }; |
| 749 | |
| 750 | /* |
| 751 | * 'gpio' class |
| 752 | * general purpose io module |
| 753 | */ |
| 754 | |
| 755 | static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = { |
| 756 | .rev_offs = 0x0000, |
| 757 | .sysc_offs = 0x0010, |
| 758 | .syss_offs = 0x0014, |
| 759 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | |
| 760 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 761 | SYSS_HAS_RESET_STATUS), |
| 762 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 763 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 764 | }; |
| 765 | |
| 766 | static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = { |
| 767 | .name = "gpio", |
| 768 | .sysc = &omap3xxx_gpio_sysc, |
| 769 | .rev = 1, |
| 770 | }; |
| 771 | |
| 772 | /* gpio_dev_attr */ |
| 773 | static struct omap_gpio_dev_attr gpio_dev_attr = { |
| 774 | .bank_width = 32, |
| 775 | .dbck_flag = true, |
| 776 | }; |
| 777 | |
| 778 | /* gpio1 */ |
| 779 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
| 780 | { .role = "dbclk", .clk = "gpio1_dbck", }, |
| 781 | }; |
| 782 | |
| 783 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { |
| 784 | .name = "gpio1", |
| 785 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 786 | .main_clk = "gpio1_ick", |
| 787 | .opt_clks = gpio1_opt_clks, |
| 788 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
| 789 | .prcm = { |
| 790 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 791 | .module_offs = WKUP_MOD, |
| 792 | .idlest_reg_id = 1, |
| 793 | .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT, |
| 794 | }, |
| 795 | }, |
| 796 | .class = &omap3xxx_gpio_hwmod_class, |
| 797 | .dev_attr = &gpio_dev_attr, |
| 798 | }; |
| 799 | |
| 800 | /* gpio2 */ |
| 801 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
| 802 | { .role = "dbclk", .clk = "gpio2_dbck", }, |
| 803 | }; |
| 804 | |
| 805 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { |
| 806 | .name = "gpio2", |
| 807 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 808 | .main_clk = "gpio2_ick", |
| 809 | .opt_clks = gpio2_opt_clks, |
| 810 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
| 811 | .prcm = { |
| 812 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 813 | .module_offs = OMAP3430_PER_MOD, |
| 814 | .idlest_reg_id = 1, |
| 815 | .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT, |
| 816 | }, |
| 817 | }, |
| 818 | .class = &omap3xxx_gpio_hwmod_class, |
| 819 | .dev_attr = &gpio_dev_attr, |
| 820 | }; |
| 821 | |
| 822 | /* gpio3 */ |
| 823 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
| 824 | { .role = "dbclk", .clk = "gpio3_dbck", }, |
| 825 | }; |
| 826 | |
| 827 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { |
| 828 | .name = "gpio3", |
| 829 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 830 | .main_clk = "gpio3_ick", |
| 831 | .opt_clks = gpio3_opt_clks, |
| 832 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
| 833 | .prcm = { |
| 834 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 835 | .module_offs = OMAP3430_PER_MOD, |
| 836 | .idlest_reg_id = 1, |
| 837 | .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT, |
| 838 | }, |
| 839 | }, |
| 840 | .class = &omap3xxx_gpio_hwmod_class, |
| 841 | .dev_attr = &gpio_dev_attr, |
| 842 | }; |
| 843 | |
| 844 | /* gpio4 */ |
| 845 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { |
| 846 | { .role = "dbclk", .clk = "gpio4_dbck", }, |
| 847 | }; |
| 848 | |
| 849 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { |
| 850 | .name = "gpio4", |
| 851 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 852 | .main_clk = "gpio4_ick", |
| 853 | .opt_clks = gpio4_opt_clks, |
| 854 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), |
| 855 | .prcm = { |
| 856 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 857 | .module_offs = OMAP3430_PER_MOD, |
| 858 | .idlest_reg_id = 1, |
| 859 | .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT, |
| 860 | }, |
| 861 | }, |
| 862 | .class = &omap3xxx_gpio_hwmod_class, |
| 863 | .dev_attr = &gpio_dev_attr, |
| 864 | }; |
| 865 | |
| 866 | /* gpio5 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 867 | |
| 868 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { |
| 869 | { .role = "dbclk", .clk = "gpio5_dbck", }, |
| 870 | }; |
| 871 | |
| 872 | static struct omap_hwmod omap3xxx_gpio5_hwmod = { |
| 873 | .name = "gpio5", |
| 874 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 875 | .main_clk = "gpio5_ick", |
| 876 | .opt_clks = gpio5_opt_clks, |
| 877 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), |
| 878 | .prcm = { |
| 879 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 880 | .module_offs = OMAP3430_PER_MOD, |
| 881 | .idlest_reg_id = 1, |
| 882 | .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT, |
| 883 | }, |
| 884 | }, |
| 885 | .class = &omap3xxx_gpio_hwmod_class, |
| 886 | .dev_attr = &gpio_dev_attr, |
| 887 | }; |
| 888 | |
| 889 | /* gpio6 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 890 | |
| 891 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { |
| 892 | { .role = "dbclk", .clk = "gpio6_dbck", }, |
| 893 | }; |
| 894 | |
| 895 | static struct omap_hwmod omap3xxx_gpio6_hwmod = { |
| 896 | .name = "gpio6", |
| 897 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 898 | .main_clk = "gpio6_ick", |
| 899 | .opt_clks = gpio6_opt_clks, |
| 900 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), |
| 901 | .prcm = { |
| 902 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 903 | .module_offs = OMAP3430_PER_MOD, |
| 904 | .idlest_reg_id = 1, |
| 905 | .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT, |
| 906 | }, |
| 907 | }, |
| 908 | .class = &omap3xxx_gpio_hwmod_class, |
| 909 | .dev_attr = &gpio_dev_attr, |
| 910 | }; |
| 911 | |
| 912 | /* dma attributes */ |
| 913 | static struct omap_dma_dev_attr dma_dev_attr = { |
| 914 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
| 915 | IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY, |
| 916 | .lch_count = 32, |
| 917 | }; |
| 918 | |
| 919 | static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = { |
| 920 | .rev_offs = 0x0000, |
| 921 | .sysc_offs = 0x002c, |
| 922 | .syss_offs = 0x0028, |
| 923 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 924 | SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 925 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE | |
| 926 | SYSS_HAS_RESET_STATUS), |
| 927 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 928 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 929 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 930 | }; |
| 931 | |
| 932 | static struct omap_hwmod_class omap3xxx_dma_hwmod_class = { |
| 933 | .name = "dma", |
| 934 | .sysc = &omap3xxx_dma_sysc, |
| 935 | }; |
| 936 | |
| 937 | /* dma_system */ |
| 938 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { |
| 939 | .name = "dma", |
| 940 | .class = &omap3xxx_dma_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 941 | .main_clk = "core_l3_ick", |
| 942 | .prcm = { |
| 943 | .omap2 = { |
| 944 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 945 | .idlest_reg_id = 1, |
| 946 | .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT, |
| 947 | }, |
| 948 | }, |
| 949 | .dev_attr = &dma_dev_attr, |
| 950 | .flags = HWMOD_NO_IDLEST, |
| 951 | }; |
| 952 | |
| 953 | /* |
| 954 | * 'mcbsp' class |
| 955 | * multi channel buffered serial port controller |
| 956 | */ |
| 957 | |
| 958 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sysc = { |
| 959 | .sysc_offs = 0x008c, |
| 960 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | |
| 961 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
| 962 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 963 | .sysc_fields = &omap_hwmod_sysc_type1, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 964 | }; |
| 965 | |
| 966 | static struct omap_hwmod_class omap3xxx_mcbsp_hwmod_class = { |
| 967 | .name = "mcbsp", |
| 968 | .sysc = &omap3xxx_mcbsp_sysc, |
| 969 | .rev = MCBSP_CONFIG_TYPE3, |
| 970 | }; |
| 971 | |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 972 | /* McBSP functional clock mapping */ |
| 973 | static struct omap_hwmod_opt_clk mcbsp15_opt_clks[] = { |
| 974 | { .role = "pad_fck", .clk = "mcbsp_clks" }, |
| 975 | { .role = "prcm_fck", .clk = "core_96m_fck" }, |
| 976 | }; |
| 977 | |
| 978 | static struct omap_hwmod_opt_clk mcbsp234_opt_clks[] = { |
| 979 | { .role = "pad_fck", .clk = "mcbsp_clks" }, |
| 980 | { .role = "prcm_fck", .clk = "per_96m_fck" }, |
| 981 | }; |
| 982 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 983 | /* mcbsp1 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 984 | |
| 985 | static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { |
| 986 | .name = "mcbsp1", |
| 987 | .class = &omap3xxx_mcbsp_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 988 | .main_clk = "mcbsp1_fck", |
| 989 | .prcm = { |
| 990 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 991 | .module_offs = CORE_MOD, |
| 992 | .idlest_reg_id = 1, |
| 993 | .idlest_idle_bit = OMAP3430_ST_MCBSP1_SHIFT, |
| 994 | }, |
| 995 | }, |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 996 | .opt_clks = mcbsp15_opt_clks, |
| 997 | .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 998 | }; |
| 999 | |
| 1000 | /* mcbsp2 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1001 | |
| 1002 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = { |
| 1003 | .sidetone = "mcbsp2_sidetone", |
| 1004 | }; |
| 1005 | |
| 1006 | static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { |
| 1007 | .name = "mcbsp2", |
| 1008 | .class = &omap3xxx_mcbsp_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1009 | .main_clk = "mcbsp2_fck", |
| 1010 | .prcm = { |
| 1011 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1012 | .module_offs = OMAP3430_PER_MOD, |
| 1013 | .idlest_reg_id = 1, |
| 1014 | .idlest_idle_bit = OMAP3430_ST_MCBSP2_SHIFT, |
| 1015 | }, |
| 1016 | }, |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 1017 | .opt_clks = mcbsp234_opt_clks, |
| 1018 | .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1019 | .dev_attr = &omap34xx_mcbsp2_dev_attr, |
| 1020 | }; |
| 1021 | |
| 1022 | /* mcbsp3 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1023 | |
| 1024 | static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = { |
| 1025 | .sidetone = "mcbsp3_sidetone", |
| 1026 | }; |
| 1027 | |
| 1028 | static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { |
| 1029 | .name = "mcbsp3", |
| 1030 | .class = &omap3xxx_mcbsp_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1031 | .main_clk = "mcbsp3_fck", |
| 1032 | .prcm = { |
| 1033 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1034 | .module_offs = OMAP3430_PER_MOD, |
| 1035 | .idlest_reg_id = 1, |
| 1036 | .idlest_idle_bit = OMAP3430_ST_MCBSP3_SHIFT, |
| 1037 | }, |
| 1038 | }, |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 1039 | .opt_clks = mcbsp234_opt_clks, |
| 1040 | .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1041 | .dev_attr = &omap34xx_mcbsp3_dev_attr, |
| 1042 | }; |
| 1043 | |
| 1044 | /* mcbsp4 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1045 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1046 | |
| 1047 | static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { |
| 1048 | .name = "mcbsp4", |
| 1049 | .class = &omap3xxx_mcbsp_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1050 | .main_clk = "mcbsp4_fck", |
| 1051 | .prcm = { |
| 1052 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1053 | .module_offs = OMAP3430_PER_MOD, |
| 1054 | .idlest_reg_id = 1, |
| 1055 | .idlest_idle_bit = OMAP3430_ST_MCBSP4_SHIFT, |
| 1056 | }, |
| 1057 | }, |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 1058 | .opt_clks = mcbsp234_opt_clks, |
| 1059 | .opt_clks_cnt = ARRAY_SIZE(mcbsp234_opt_clks), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1060 | }; |
| 1061 | |
| 1062 | /* mcbsp5 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1063 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1064 | |
| 1065 | static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { |
| 1066 | .name = "mcbsp5", |
| 1067 | .class = &omap3xxx_mcbsp_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1068 | .main_clk = "mcbsp5_fck", |
| 1069 | .prcm = { |
| 1070 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1071 | .module_offs = CORE_MOD, |
| 1072 | .idlest_reg_id = 1, |
| 1073 | .idlest_idle_bit = OMAP3430_ST_MCBSP5_SHIFT, |
| 1074 | }, |
| 1075 | }, |
Peter Ujfalusi | 7039154 | 2012-06-18 16:18:43 -0600 | [diff] [blame] | 1076 | .opt_clks = mcbsp15_opt_clks, |
| 1077 | .opt_clks_cnt = ARRAY_SIZE(mcbsp15_opt_clks), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1078 | }; |
| 1079 | |
| 1080 | /* 'mcbsp sidetone' class */ |
| 1081 | static struct omap_hwmod_class_sysconfig omap3xxx_mcbsp_sidetone_sysc = { |
| 1082 | .sysc_offs = 0x0010, |
| 1083 | .sysc_flags = SYSC_HAS_AUTOIDLE, |
| 1084 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1085 | }; |
| 1086 | |
| 1087 | static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = { |
| 1088 | .name = "mcbsp_sidetone", |
| 1089 | .sysc = &omap3xxx_mcbsp_sidetone_sysc, |
| 1090 | }; |
| 1091 | |
| 1092 | /* mcbsp2_sidetone */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1093 | |
| 1094 | static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { |
| 1095 | .name = "mcbsp2_sidetone", |
| 1096 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
Peter Ujfalusi | 3b80c9b | 2016-05-30 11:23:45 +0300 | [diff] [blame] | 1097 | .main_clk = "mcbsp2_ick", |
| 1098 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1099 | }; |
| 1100 | |
| 1101 | /* mcbsp3_sidetone */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1102 | |
| 1103 | static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { |
| 1104 | .name = "mcbsp3_sidetone", |
| 1105 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
Peter Ujfalusi | 3b80c9b | 2016-05-30 11:23:45 +0300 | [diff] [blame] | 1106 | .main_clk = "mcbsp3_ick", |
| 1107 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1108 | }; |
| 1109 | |
| 1110 | /* SR common */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1111 | static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = { |
| 1112 | .sysc_offs = 0x24, |
| 1113 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1114 | .sysc_fields = &omap34xx_sr_sysc_fields, |
| 1115 | }; |
| 1116 | |
| 1117 | static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = { |
| 1118 | .name = "smartreflex", |
| 1119 | .sysc = &omap34xx_sr_sysc, |
| 1120 | .rev = 1, |
| 1121 | }; |
| 1122 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1123 | static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { |
| 1124 | .sysc_offs = 0x38, |
| 1125 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1126 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
| 1127 | SYSC_NO_CACHE), |
| 1128 | .sysc_fields = &omap36xx_sr_sysc_fields, |
| 1129 | }; |
| 1130 | |
| 1131 | static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = { |
| 1132 | .name = "smartreflex", |
| 1133 | .sysc = &omap36xx_sr_sysc, |
| 1134 | .rev = 2, |
| 1135 | }; |
| 1136 | |
| 1137 | /* SR1 */ |
| 1138 | static struct omap_smartreflex_dev_attr sr1_dev_attr = { |
| 1139 | .sensor_voltdm_name = "mpu_iva", |
| 1140 | }; |
| 1141 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1142 | |
| 1143 | static struct omap_hwmod omap34xx_sr1_hwmod = { |
Jean Pihet | 1fcd306 | 2012-04-24 10:47:14 +0530 | [diff] [blame] | 1144 | .name = "smartreflex_mpu_iva", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1145 | .class = &omap34xx_smartreflex_hwmod_class, |
| 1146 | .main_clk = "sr1_fck", |
| 1147 | .prcm = { |
| 1148 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1149 | .module_offs = WKUP_MOD, |
| 1150 | .idlest_reg_id = 1, |
| 1151 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
| 1152 | }, |
| 1153 | }, |
| 1154 | .dev_attr = &sr1_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1155 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
| 1156 | }; |
| 1157 | |
| 1158 | static struct omap_hwmod omap36xx_sr1_hwmod = { |
Jean Pihet | 1fcd306 | 2012-04-24 10:47:14 +0530 | [diff] [blame] | 1159 | .name = "smartreflex_mpu_iva", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1160 | .class = &omap36xx_smartreflex_hwmod_class, |
| 1161 | .main_clk = "sr1_fck", |
| 1162 | .prcm = { |
| 1163 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1164 | .module_offs = WKUP_MOD, |
| 1165 | .idlest_reg_id = 1, |
| 1166 | .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, |
| 1167 | }, |
| 1168 | }, |
| 1169 | .dev_attr = &sr1_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1170 | }; |
| 1171 | |
| 1172 | /* SR2 */ |
| 1173 | static struct omap_smartreflex_dev_attr sr2_dev_attr = { |
| 1174 | .sensor_voltdm_name = "core", |
| 1175 | }; |
| 1176 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1177 | |
| 1178 | static struct omap_hwmod omap34xx_sr2_hwmod = { |
Jean Pihet | 1fcd306 | 2012-04-24 10:47:14 +0530 | [diff] [blame] | 1179 | .name = "smartreflex_core", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1180 | .class = &omap34xx_smartreflex_hwmod_class, |
| 1181 | .main_clk = "sr2_fck", |
| 1182 | .prcm = { |
| 1183 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1184 | .module_offs = WKUP_MOD, |
| 1185 | .idlest_reg_id = 1, |
| 1186 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
| 1187 | }, |
| 1188 | }, |
| 1189 | .dev_attr = &sr2_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1190 | .flags = HWMOD_SET_DEFAULT_CLOCKACT, |
| 1191 | }; |
| 1192 | |
| 1193 | static struct omap_hwmod omap36xx_sr2_hwmod = { |
Jean Pihet | 1fcd306 | 2012-04-24 10:47:14 +0530 | [diff] [blame] | 1194 | .name = "smartreflex_core", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1195 | .class = &omap36xx_smartreflex_hwmod_class, |
| 1196 | .main_clk = "sr2_fck", |
| 1197 | .prcm = { |
| 1198 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1199 | .module_offs = WKUP_MOD, |
| 1200 | .idlest_reg_id = 1, |
| 1201 | .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, |
| 1202 | }, |
| 1203 | }, |
| 1204 | .dev_attr = &sr2_dev_attr, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1205 | }; |
| 1206 | |
| 1207 | /* |
| 1208 | * 'mailbox' class |
| 1209 | * mailbox module allowing communication between the on-chip processors |
| 1210 | * using a queued mailbox-interrupt mechanism. |
| 1211 | */ |
| 1212 | |
| 1213 | static struct omap_hwmod_class_sysconfig omap3xxx_mailbox_sysc = { |
| 1214 | .rev_offs = 0x000, |
| 1215 | .sysc_offs = 0x010, |
| 1216 | .syss_offs = 0x014, |
| 1217 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 1218 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 1219 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1220 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1221 | }; |
| 1222 | |
| 1223 | static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = { |
| 1224 | .name = "mailbox", |
| 1225 | .sysc = &omap3xxx_mailbox_sysc, |
| 1226 | }; |
| 1227 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1228 | static struct omap_hwmod omap3xxx_mailbox_hwmod = { |
| 1229 | .name = "mailbox", |
| 1230 | .class = &omap3xxx_mailbox_hwmod_class, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1231 | .main_clk = "mailboxes_ick", |
| 1232 | .prcm = { |
| 1233 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1234 | .module_offs = CORE_MOD, |
| 1235 | .idlest_reg_id = 1, |
| 1236 | .idlest_idle_bit = OMAP3430_ST_MAILBOXES_SHIFT, |
| 1237 | }, |
| 1238 | }, |
| 1239 | }; |
| 1240 | |
| 1241 | /* |
| 1242 | * 'mcspi' class |
| 1243 | * multichannel serial port interface (mcspi) / master/slave synchronous serial |
| 1244 | * bus |
| 1245 | */ |
| 1246 | |
| 1247 | static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = { |
| 1248 | .rev_offs = 0x0000, |
| 1249 | .sysc_offs = 0x0010, |
| 1250 | .syss_offs = 0x0014, |
| 1251 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 1252 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 1253 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 1254 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1255 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1256 | }; |
| 1257 | |
| 1258 | static struct omap_hwmod_class omap34xx_mcspi_class = { |
| 1259 | .name = "mcspi", |
| 1260 | .sysc = &omap34xx_mcspi_sysc, |
| 1261 | .rev = OMAP3_MCSPI_REV, |
| 1262 | }; |
| 1263 | |
| 1264 | /* mcspi1 */ |
| 1265 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { |
| 1266 | .num_chipselect = 4, |
| 1267 | }; |
| 1268 | |
| 1269 | static struct omap_hwmod omap34xx_mcspi1 = { |
| 1270 | .name = "mcspi1", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1271 | .main_clk = "mcspi1_fck", |
| 1272 | .prcm = { |
| 1273 | .omap2 = { |
| 1274 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1275 | .idlest_reg_id = 1, |
| 1276 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, |
| 1277 | }, |
| 1278 | }, |
| 1279 | .class = &omap34xx_mcspi_class, |
| 1280 | .dev_attr = &omap_mcspi1_dev_attr, |
| 1281 | }; |
| 1282 | |
| 1283 | /* mcspi2 */ |
| 1284 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { |
| 1285 | .num_chipselect = 2, |
| 1286 | }; |
| 1287 | |
| 1288 | static struct omap_hwmod omap34xx_mcspi2 = { |
| 1289 | .name = "mcspi2", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1290 | .main_clk = "mcspi2_fck", |
| 1291 | .prcm = { |
| 1292 | .omap2 = { |
| 1293 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1294 | .idlest_reg_id = 1, |
| 1295 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, |
| 1296 | }, |
| 1297 | }, |
| 1298 | .class = &omap34xx_mcspi_class, |
| 1299 | .dev_attr = &omap_mcspi2_dev_attr, |
| 1300 | }; |
| 1301 | |
| 1302 | /* mcspi3 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1303 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1304 | |
| 1305 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { |
| 1306 | .num_chipselect = 2, |
| 1307 | }; |
| 1308 | |
| 1309 | static struct omap_hwmod omap34xx_mcspi3 = { |
| 1310 | .name = "mcspi3", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1311 | .main_clk = "mcspi3_fck", |
| 1312 | .prcm = { |
| 1313 | .omap2 = { |
| 1314 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1315 | .idlest_reg_id = 1, |
| 1316 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, |
| 1317 | }, |
| 1318 | }, |
| 1319 | .class = &omap34xx_mcspi_class, |
| 1320 | .dev_attr = &omap_mcspi3_dev_attr, |
| 1321 | }; |
| 1322 | |
| 1323 | /* mcspi4 */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1324 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1325 | |
| 1326 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { |
| 1327 | .num_chipselect = 1, |
| 1328 | }; |
| 1329 | |
| 1330 | static struct omap_hwmod omap34xx_mcspi4 = { |
| 1331 | .name = "mcspi4", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1332 | .main_clk = "mcspi4_fck", |
| 1333 | .prcm = { |
| 1334 | .omap2 = { |
| 1335 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1336 | .idlest_reg_id = 1, |
| 1337 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, |
| 1338 | }, |
| 1339 | }, |
| 1340 | .class = &omap34xx_mcspi_class, |
| 1341 | .dev_attr = &omap_mcspi4_dev_attr, |
| 1342 | }; |
| 1343 | |
| 1344 | /* usbhsotg */ |
| 1345 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { |
| 1346 | .rev_offs = 0x0400, |
| 1347 | .sysc_offs = 0x0404, |
| 1348 | .syss_offs = 0x0408, |
| 1349 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| |
| 1350 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 1351 | SYSC_HAS_AUTOIDLE), |
| 1352 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1353 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1354 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1355 | }; |
| 1356 | |
| 1357 | static struct omap_hwmod_class usbotg_class = { |
| 1358 | .name = "usbotg", |
| 1359 | .sysc = &omap3xxx_usbhsotg_sysc, |
| 1360 | }; |
| 1361 | |
| 1362 | /* usb_otg_hs */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1363 | |
| 1364 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { |
| 1365 | .name = "usb_otg_hs", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1366 | .main_clk = "hsotgusb_ick", |
| 1367 | .prcm = { |
| 1368 | .omap2 = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1369 | .module_offs = CORE_MOD, |
| 1370 | .idlest_reg_id = 1, |
| 1371 | .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1372 | }, |
| 1373 | }, |
| 1374 | .class = &usbotg_class, |
| 1375 | |
| 1376 | /* |
| 1377 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially |
| 1378 | * broken when autoidle is enabled |
| 1379 | * workaround is to disable the autoidle bit at module level. |
Grazvydas Ignotas | 092bc08 | 2013-03-11 21:49:00 +0200 | [diff] [blame] | 1380 | * |
| 1381 | * Enabling the device in any other MIDLEMODE setting but force-idle |
| 1382 | * causes core_pwrdm not enter idle states at least on OMAP3630. |
| 1383 | * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY |
| 1384 | * signal when MIDLEMODE is set to force-idle. |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1385 | */ |
Tony Lindgren | 6a08b11 | 2014-09-18 08:58:28 -0700 | [diff] [blame] | 1386 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | |
| 1387 | HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1388 | }; |
| 1389 | |
| 1390 | /* usb_otg_hs */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1391 | |
| 1392 | static struct omap_hwmod_class am35xx_usbotg_class = { |
| 1393 | .name = "am35xx_usbotg", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1394 | }; |
| 1395 | |
| 1396 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { |
| 1397 | .name = "am35x_otg_hs", |
Paul Walmsley | 89ea258 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 1398 | .main_clk = "hsotgusb_fck", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1399 | .class = &am35xx_usbotg_class, |
Paul Walmsley | 89ea258 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 1400 | .flags = HWMOD_NO_IDLEST, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1401 | }; |
| 1402 | |
| 1403 | /* MMC/SD/SDIO common */ |
| 1404 | static struct omap_hwmod_class_sysconfig omap34xx_mmc_sysc = { |
| 1405 | .rev_offs = 0x1fc, |
| 1406 | .sysc_offs = 0x10, |
| 1407 | .syss_offs = 0x14, |
| 1408 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 1409 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 1410 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 1411 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1412 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1413 | }; |
| 1414 | |
| 1415 | static struct omap_hwmod_class omap34xx_mmc_class = { |
| 1416 | .name = "mmc", |
| 1417 | .sysc = &omap34xx_mmc_sysc, |
| 1418 | }; |
| 1419 | |
| 1420 | /* MMC/SD/SDIO1 */ |
| 1421 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1422 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1423 | |
| 1424 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { |
| 1425 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 1426 | }; |
| 1427 | |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 1428 | static struct omap_hsmmc_dev_attr mmc1_dev_attr = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1429 | .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT, |
| 1430 | }; |
| 1431 | |
| 1432 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 1433 | static struct omap_hsmmc_dev_attr mmc1_pre_es3_dev_attr = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1434 | .flags = (OMAP_HSMMC_SUPPORTS_DUAL_VOLT | |
| 1435 | OMAP_HSMMC_BROKEN_MULTIBLOCK_READ), |
| 1436 | }; |
| 1437 | |
| 1438 | static struct omap_hwmod omap3xxx_pre_es3_mmc1_hwmod = { |
| 1439 | .name = "mmc1", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1440 | .opt_clks = omap34xx_mmc1_opt_clks, |
| 1441 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), |
| 1442 | .main_clk = "mmchs1_fck", |
| 1443 | .prcm = { |
| 1444 | .omap2 = { |
| 1445 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1446 | .idlest_reg_id = 1, |
| 1447 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, |
| 1448 | }, |
| 1449 | }, |
| 1450 | .dev_attr = &mmc1_pre_es3_dev_attr, |
| 1451 | .class = &omap34xx_mmc_class, |
| 1452 | }; |
| 1453 | |
| 1454 | static struct omap_hwmod omap3xxx_es3plus_mmc1_hwmod = { |
| 1455 | .name = "mmc1", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1456 | .opt_clks = omap34xx_mmc1_opt_clks, |
| 1457 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), |
| 1458 | .main_clk = "mmchs1_fck", |
| 1459 | .prcm = { |
| 1460 | .omap2 = { |
| 1461 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1462 | .idlest_reg_id = 1, |
| 1463 | .idlest_idle_bit = OMAP3430_ST_MMC1_SHIFT, |
| 1464 | }, |
| 1465 | }, |
| 1466 | .dev_attr = &mmc1_dev_attr, |
| 1467 | .class = &omap34xx_mmc_class, |
| 1468 | }; |
| 1469 | |
| 1470 | /* MMC/SD/SDIO2 */ |
| 1471 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1472 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1473 | |
| 1474 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { |
| 1475 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 1476 | }; |
| 1477 | |
| 1478 | /* See 35xx errata 2.1.1.128 in SPRZ278F */ |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 1479 | static struct omap_hsmmc_dev_attr mmc2_pre_es3_dev_attr = { |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1480 | .flags = OMAP_HSMMC_BROKEN_MULTIBLOCK_READ, |
| 1481 | }; |
| 1482 | |
| 1483 | static struct omap_hwmod omap3xxx_pre_es3_mmc2_hwmod = { |
| 1484 | .name = "mmc2", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1485 | .opt_clks = omap34xx_mmc2_opt_clks, |
| 1486 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), |
| 1487 | .main_clk = "mmchs2_fck", |
| 1488 | .prcm = { |
| 1489 | .omap2 = { |
| 1490 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1491 | .idlest_reg_id = 1, |
| 1492 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, |
| 1493 | }, |
| 1494 | }, |
| 1495 | .dev_attr = &mmc2_pre_es3_dev_attr, |
| 1496 | .class = &omap34xx_mmc_class, |
| 1497 | }; |
| 1498 | |
| 1499 | static struct omap_hwmod omap3xxx_es3plus_mmc2_hwmod = { |
| 1500 | .name = "mmc2", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1501 | .opt_clks = omap34xx_mmc2_opt_clks, |
| 1502 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), |
| 1503 | .main_clk = "mmchs2_fck", |
| 1504 | .prcm = { |
| 1505 | .omap2 = { |
| 1506 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1507 | .idlest_reg_id = 1, |
| 1508 | .idlest_idle_bit = OMAP3430_ST_MMC2_SHIFT, |
| 1509 | }, |
| 1510 | }, |
| 1511 | .class = &omap34xx_mmc_class, |
| 1512 | }; |
| 1513 | |
| 1514 | /* MMC/SD/SDIO3 */ |
| 1515 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1516 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1517 | |
| 1518 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { |
| 1519 | { .role = "dbck", .clk = "omap_32k_fck", }, |
| 1520 | }; |
| 1521 | |
| 1522 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { |
| 1523 | .name = "mmc3", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1524 | .opt_clks = omap34xx_mmc3_opt_clks, |
| 1525 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), |
| 1526 | .main_clk = "mmchs3_fck", |
| 1527 | .prcm = { |
| 1528 | .omap2 = { |
Tony Lindgren | a7cb467 | 2017-12-14 08:23:33 -0800 | [diff] [blame] | 1529 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1530 | .idlest_reg_id = 1, |
| 1531 | .idlest_idle_bit = OMAP3430_ST_MMC3_SHIFT, |
| 1532 | }, |
| 1533 | }, |
| 1534 | .class = &omap34xx_mmc_class, |
| 1535 | }; |
| 1536 | |
| 1537 | /* |
| 1538 | * 'usb_host_hs' class |
| 1539 | * high-speed multi-port usb host controller |
| 1540 | */ |
| 1541 | |
| 1542 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_host_hs_sysc = { |
| 1543 | .rev_offs = 0x0000, |
| 1544 | .sysc_offs = 0x0010, |
| 1545 | .syss_offs = 0x0014, |
| 1546 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY | |
| 1547 | SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | |
Roger Quadros | 7f4d364 | 2013-12-08 18:39:02 -0700 | [diff] [blame] | 1548 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | |
| 1549 | SYSS_HAS_RESET_STATUS), |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1550 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
| 1551 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), |
| 1552 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1553 | }; |
| 1554 | |
| 1555 | static struct omap_hwmod_class omap3xxx_usb_host_hs_hwmod_class = { |
| 1556 | .name = "usb_host_hs", |
| 1557 | .sysc = &omap3xxx_usb_host_hs_sysc, |
| 1558 | }; |
| 1559 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1560 | |
| 1561 | static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { |
| 1562 | .name = "usb_host_hs", |
| 1563 | .class = &omap3xxx_usb_host_hs_hwmod_class, |
Roger Quadros | c6c5669 | 2014-04-10 10:18:17 +0300 | [diff] [blame] | 1564 | .clkdm_name = "usbhost_clkdm", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1565 | .main_clk = "usbhost_48m_fck", |
| 1566 | .prcm = { |
| 1567 | .omap2 = { |
| 1568 | .module_offs = OMAP3430ES2_USBHOST_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1569 | .idlest_reg_id = 1, |
| 1570 | .idlest_idle_bit = OMAP3430ES2_ST_USBHOST_IDLE_SHIFT, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1571 | }, |
| 1572 | }, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1573 | |
| 1574 | /* |
| 1575 | * Errata: USBHOST Configured In Smart-Idle Can Lead To a Deadlock |
| 1576 | * id: i660 |
| 1577 | * |
| 1578 | * Description: |
| 1579 | * In the following configuration : |
| 1580 | * - USBHOST module is set to smart-idle mode |
| 1581 | * - PRCM asserts idle_req to the USBHOST module ( This typically |
| 1582 | * happens when the system is going to a low power mode : all ports |
| 1583 | * have been suspended, the master part of the USBHOST module has |
| 1584 | * entered the standby state, and SW has cut the functional clocks) |
| 1585 | * - an USBHOST interrupt occurs before the module is able to answer |
| 1586 | * idle_ack, typically a remote wakeup IRQ. |
| 1587 | * Then the USB HOST module will enter a deadlock situation where it |
| 1588 | * is no more accessible nor functional. |
| 1589 | * |
| 1590 | * Workaround: |
| 1591 | * Don't use smart idle; use only force idle, hence HWMOD_SWSUP_SIDLE |
| 1592 | */ |
| 1593 | |
| 1594 | /* |
| 1595 | * Errata: USB host EHCI may stall when entering smart-standby mode |
| 1596 | * Id: i571 |
| 1597 | * |
| 1598 | * Description: |
| 1599 | * When the USBHOST module is set to smart-standby mode, and when it is |
| 1600 | * ready to enter the standby state (i.e. all ports are suspended and |
| 1601 | * all attached devices are in suspend mode), then it can wrongly assert |
| 1602 | * the Mstandby signal too early while there are still some residual OCP |
| 1603 | * transactions ongoing. If this condition occurs, the internal state |
| 1604 | * machine may go to an undefined state and the USB link may be stuck |
| 1605 | * upon the next resume. |
| 1606 | * |
| 1607 | * Workaround: |
| 1608 | * Don't use smart standby; use only force standby, |
| 1609 | * hence HWMOD_SWSUP_MSTANDBY |
| 1610 | */ |
| 1611 | |
Roger Quadros | 7f4d364 | 2013-12-08 18:39:02 -0700 | [diff] [blame] | 1612 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1613 | }; |
| 1614 | |
| 1615 | /* |
| 1616 | * 'usb_tll_hs' class |
| 1617 | * usb_tll_hs module is the adapter on the usb_host_hs ports |
| 1618 | */ |
| 1619 | static struct omap_hwmod_class_sysconfig omap3xxx_usb_tll_hs_sysc = { |
| 1620 | .rev_offs = 0x0000, |
| 1621 | .sysc_offs = 0x0010, |
| 1622 | .syss_offs = 0x0014, |
| 1623 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 1624 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | |
| 1625 | SYSC_HAS_AUTOIDLE), |
| 1626 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1627 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1628 | }; |
| 1629 | |
| 1630 | static struct omap_hwmod_class omap3xxx_usb_tll_hs_hwmod_class = { |
| 1631 | .name = "usb_tll_hs", |
| 1632 | .sysc = &omap3xxx_usb_tll_hs_sysc, |
| 1633 | }; |
| 1634 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1635 | |
| 1636 | static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { |
| 1637 | .name = "usb_tll_hs", |
| 1638 | .class = &omap3xxx_usb_tll_hs_hwmod_class, |
Roger Quadros | c6c5669 | 2014-04-10 10:18:17 +0300 | [diff] [blame] | 1639 | .clkdm_name = "core_l4_clkdm", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1640 | .main_clk = "usbtll_fck", |
| 1641 | .prcm = { |
| 1642 | .omap2 = { |
| 1643 | .module_offs = CORE_MOD, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1644 | .idlest_reg_id = 3, |
| 1645 | .idlest_idle_bit = OMAP3430ES2_ST_USBTLL_SHIFT, |
| 1646 | }, |
| 1647 | }, |
| 1648 | }; |
| 1649 | |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 1650 | static struct omap_hwmod omap3xxx_hdq1w_hwmod = { |
| 1651 | .name = "hdq1w", |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 1652 | .main_clk = "hdq_fck", |
| 1653 | .prcm = { |
| 1654 | .omap2 = { |
| 1655 | .module_offs = CORE_MOD, |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 1656 | .idlest_reg_id = 1, |
| 1657 | .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT, |
| 1658 | }, |
| 1659 | }, |
| 1660 | .class = &omap2_hdq1w_class, |
| 1661 | }; |
| 1662 | |
Tero Kristo | 8f993a0 | 2012-09-23 17:28:21 -0600 | [diff] [blame] | 1663 | /* SAD2D */ |
| 1664 | static struct omap_hwmod_rst_info omap3xxx_sad2d_resets[] = { |
| 1665 | { .name = "rst_modem_pwron_sw", .rst_shift = 0 }, |
| 1666 | { .name = "rst_modem_sw", .rst_shift = 1 }, |
| 1667 | }; |
| 1668 | |
| 1669 | static struct omap_hwmod_class omap3xxx_sad2d_class = { |
| 1670 | .name = "sad2d", |
| 1671 | }; |
| 1672 | |
| 1673 | static struct omap_hwmod omap3xxx_sad2d_hwmod = { |
| 1674 | .name = "sad2d", |
| 1675 | .rst_lines = omap3xxx_sad2d_resets, |
| 1676 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_sad2d_resets), |
| 1677 | .main_clk = "sad2d_ick", |
| 1678 | .prcm = { |
| 1679 | .omap2 = { |
| 1680 | .module_offs = CORE_MOD, |
Tero Kristo | 8f993a0 | 2012-09-23 17:28:21 -0600 | [diff] [blame] | 1681 | .idlest_reg_id = 1, |
| 1682 | .idlest_idle_bit = OMAP3430_ST_SAD2D_SHIFT, |
| 1683 | }, |
| 1684 | }, |
| 1685 | .class = &omap3xxx_sad2d_class, |
| 1686 | }; |
| 1687 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1688 | /* |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 1689 | * '32K sync counter' class |
| 1690 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock |
| 1691 | */ |
| 1692 | static struct omap_hwmod_class_sysconfig omap3xxx_counter_sysc = { |
| 1693 | .rev_offs = 0x0000, |
| 1694 | .sysc_offs = 0x0004, |
| 1695 | .sysc_flags = SYSC_HAS_SIDLEMODE, |
| 1696 | .idlemodes = (SIDLE_FORCE | SIDLE_NO), |
| 1697 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1698 | }; |
| 1699 | |
| 1700 | static struct omap_hwmod_class omap3xxx_counter_hwmod_class = { |
| 1701 | .name = "counter", |
| 1702 | .sysc = &omap3xxx_counter_sysc, |
| 1703 | }; |
| 1704 | |
| 1705 | static struct omap_hwmod omap3xxx_counter_32k_hwmod = { |
| 1706 | .name = "counter_32k", |
| 1707 | .class = &omap3xxx_counter_hwmod_class, |
| 1708 | .clkdm_name = "wkup_clkdm", |
| 1709 | .flags = HWMOD_SWSUP_SIDLE, |
| 1710 | .main_clk = "wkup_32k_fck", |
| 1711 | .prcm = { |
| 1712 | .omap2 = { |
| 1713 | .module_offs = WKUP_MOD, |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 1714 | .idlest_reg_id = 1, |
| 1715 | .idlest_idle_bit = OMAP3430_ST_32KSYNC_SHIFT, |
| 1716 | }, |
| 1717 | }, |
| 1718 | }; |
| 1719 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1720 | /* |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 1721 | * 'gpmc' class |
| 1722 | * general purpose memory controller |
| 1723 | */ |
| 1724 | |
| 1725 | static struct omap_hwmod_class_sysconfig omap3xxx_gpmc_sysc = { |
| 1726 | .rev_offs = 0x0000, |
| 1727 | .sysc_offs = 0x0010, |
| 1728 | .syss_offs = 0x0014, |
| 1729 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | |
| 1730 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
| 1731 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 1732 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 1733 | }; |
| 1734 | |
| 1735 | static struct omap_hwmod_class omap3xxx_gpmc_hwmod_class = { |
| 1736 | .name = "gpmc", |
| 1737 | .sysc = &omap3xxx_gpmc_sysc, |
| 1738 | }; |
| 1739 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 1740 | static struct omap_hwmod omap3xxx_gpmc_hwmod = { |
| 1741 | .name = "gpmc", |
| 1742 | .class = &omap3xxx_gpmc_hwmod_class, |
| 1743 | .clkdm_name = "core_l3_clkdm", |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 1744 | .main_clk = "gpmc_fck", |
Tony Lindgren | 63aa945 | 2015-06-01 19:22:10 -0600 | [diff] [blame] | 1745 | /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */ |
| 1746 | .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS, |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 1747 | }; |
| 1748 | |
| 1749 | /* |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1750 | * interfaces |
| 1751 | */ |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 1752 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1753 | /* L3 -> L4_CORE interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 1754 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
| 1755 | .master = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1756 | .slave = &omap3xxx_l4_core_hwmod, |
| 1757 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1758 | }; |
| 1759 | |
| 1760 | /* L3 -> L4_PER interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 1761 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { |
| 1762 | .master = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1763 | .slave = &omap3xxx_l4_per_hwmod, |
| 1764 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1765 | }; |
| 1766 | |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 1767 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1768 | /* MPU -> L3 interface */ |
Kevin Hilman | 4a7cf90 | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 1769 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { |
sricharan | 4bb194d | 2011-02-08 22:13:37 +0530 | [diff] [blame] | 1770 | .master = &omap3xxx_mpu_hwmod, |
| 1771 | .slave = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1772 | .user = OCP_USER_MPU, |
| 1773 | }; |
| 1774 | |
Jon Hunter | c7dad45f | 2012-09-23 17:28:28 -0600 | [diff] [blame] | 1775 | |
| 1776 | /* l3 -> debugss */ |
| 1777 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = { |
| 1778 | .master = &omap3xxx_l3_main_hwmod, |
| 1779 | .slave = &omap3xxx_debugss_hwmod, |
Jon Hunter | c7dad45f | 2012-09-23 17:28:28 -0600 | [diff] [blame] | 1780 | .user = OCP_USER_MPU, |
| 1781 | }; |
| 1782 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1783 | /* DSS -> l3 */ |
Paul Walmsley | d69dc64 | 2012-04-19 04:03:52 -0600 | [diff] [blame] | 1784 | static struct omap_hwmod_ocp_if omap3430es1_dss__l3 = { |
| 1785 | .master = &omap3430es1_dss_core_hwmod, |
| 1786 | .slave = &omap3xxx_l3_main_hwmod, |
| 1787 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1788 | }; |
| 1789 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1790 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { |
| 1791 | .master = &omap3xxx_dss_core_hwmod, |
| 1792 | .slave = &omap3xxx_l3_main_hwmod, |
| 1793 | .fw = { |
| 1794 | .omap2 = { |
| 1795 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, |
| 1796 | .flags = OMAP_FIREWALL_L3, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1797 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 1798 | }, |
| 1799 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1800 | }; |
| 1801 | |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 1802 | /* l3_core -> usbhsotg interface */ |
| 1803 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { |
| 1804 | .master = &omap3xxx_usbhsotg_hwmod, |
| 1805 | .slave = &omap3xxx_l3_main_hwmod, |
| 1806 | .clk = "core_l3_ick", |
| 1807 | .user = OCP_USER_MPU, |
| 1808 | }; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1809 | |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 1810 | /* l3_core -> am35xx_usbhsotg interface */ |
| 1811 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { |
| 1812 | .master = &am35xx_usbhsotg_hwmod, |
| 1813 | .slave = &omap3xxx_l3_main_hwmod, |
Paul Walmsley | 89ea258 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 1814 | .clk = "hsotgusb_ick", |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 1815 | .user = OCP_USER_MPU, |
| 1816 | }; |
Paul Walmsley | 89ea258 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 1817 | |
Tero Kristo | 8f993a0 | 2012-09-23 17:28:21 -0600 | [diff] [blame] | 1818 | /* l3_core -> sad2d interface */ |
| 1819 | static struct omap_hwmod_ocp_if omap3xxx_sad2d__l3 = { |
| 1820 | .master = &omap3xxx_sad2d_hwmod, |
| 1821 | .slave = &omap3xxx_l3_main_hwmod, |
| 1822 | .clk = "core_l3_ick", |
| 1823 | .user = OCP_USER_MPU, |
| 1824 | }; |
| 1825 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 1826 | /* L4_CORE -> L4_WKUP interface */ |
| 1827 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
| 1828 | .master = &omap3xxx_l4_core_hwmod, |
| 1829 | .slave = &omap3xxx_l4_wkup_hwmod, |
| 1830 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1831 | }; |
| 1832 | |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1833 | /* L4 CORE -> MMC1 interface */ |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1834 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc1 = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1835 | .master = &omap3xxx_l4_core_hwmod, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1836 | .slave = &omap3xxx_pre_es3_mmc1_hwmod, |
| 1837 | .clk = "mmchs1_ick", |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1838 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1839 | .flags = OMAP_FIREWALL_L4, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1840 | }; |
| 1841 | |
| 1842 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc1 = { |
| 1843 | .master = &omap3xxx_l4_core_hwmod, |
| 1844 | .slave = &omap3xxx_es3plus_mmc1_hwmod, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1845 | .clk = "mmchs1_ick", |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1846 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1847 | .flags = OMAP_FIREWALL_L4, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1848 | }; |
| 1849 | |
| 1850 | /* L4 CORE -> MMC2 interface */ |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1851 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__pre_es3_mmc2 = { |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1852 | .master = &omap3xxx_l4_core_hwmod, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1853 | .slave = &omap3xxx_pre_es3_mmc2_hwmod, |
| 1854 | .clk = "mmchs2_ick", |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1855 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1856 | .flags = OMAP_FIREWALL_L4, |
Paul Walmsley | 4a9efb6 | 2012-04-19 04:03:51 -0600 | [diff] [blame] | 1857 | }; |
| 1858 | |
| 1859 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__es3plus_mmc2 = { |
| 1860 | .master = &omap3xxx_l4_core_hwmod, |
| 1861 | .slave = &omap3xxx_es3plus_mmc2_hwmod, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1862 | .clk = "mmchs2_ick", |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1863 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1864 | .flags = OMAP_FIREWALL_L4, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1865 | }; |
| 1866 | |
| 1867 | /* L4 CORE -> MMC3 interface */ |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1868 | |
| 1869 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { |
| 1870 | .master = &omap3xxx_l4_core_hwmod, |
| 1871 | .slave = &omap3xxx_mmc3_hwmod, |
| 1872 | .clk = "mmchs3_ick", |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1873 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1874 | .flags = OMAP_FIREWALL_L4, |
Paul Walmsley | b163605 | 2011-03-01 13:12:56 -0800 | [diff] [blame] | 1875 | }; |
| 1876 | |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1877 | /* L4 CORE -> UART1 interface */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1878 | |
| 1879 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { |
| 1880 | .master = &omap3xxx_l4_core_hwmod, |
| 1881 | .slave = &omap3xxx_uart1_hwmod, |
| 1882 | .clk = "uart1_ick", |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1883 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1884 | }; |
| 1885 | |
| 1886 | /* L4 CORE -> UART2 interface */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1887 | |
| 1888 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { |
| 1889 | .master = &omap3xxx_l4_core_hwmod, |
| 1890 | .slave = &omap3xxx_uart2_hwmod, |
| 1891 | .clk = "uart2_ick", |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1892 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1893 | }; |
| 1894 | |
| 1895 | /* L4 PER -> UART3 interface */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1896 | |
| 1897 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { |
| 1898 | .master = &omap3xxx_l4_per_hwmod, |
| 1899 | .slave = &omap3xxx_uart3_hwmod, |
| 1900 | .clk = "uart3_ick", |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1901 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1902 | }; |
| 1903 | |
| 1904 | /* L4 PER -> UART4 interface */ |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1905 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 1906 | static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = { |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1907 | .master = &omap3xxx_l4_per_hwmod, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 1908 | .slave = &omap36xx_uart4_hwmod, |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1909 | .clk = "uart4_ick", |
Kevin Hilman | 046465b | 2010-09-27 20:19:30 +0530 | [diff] [blame] | 1910 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1911 | }; |
| 1912 | |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1913 | /* AM35xx: L4 CORE -> UART4 interface */ |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1914 | |
| 1915 | static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 1916 | .master = &omap3xxx_l4_core_hwmod, |
| 1917 | .slave = &am35xx_uart4_hwmod, |
| 1918 | .clk = "uart4_ick", |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 1919 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
Kyle Manna | 4bf90f6 | 2011-10-18 13:47:41 -0500 | [diff] [blame] | 1920 | }; |
| 1921 | |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1922 | /* L4 CORE -> I2C1 interface */ |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1923 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { |
| 1924 | .master = &omap3xxx_l4_core_hwmod, |
| 1925 | .slave = &omap3xxx_i2c1_hwmod, |
| 1926 | .clk = "i2c1_ick", |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1927 | .fw = { |
| 1928 | .omap2 = { |
| 1929 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, |
| 1930 | .l4_prot_group = 7, |
| 1931 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1932 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1933 | }, |
| 1934 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1935 | }; |
| 1936 | |
| 1937 | /* L4 CORE -> I2C2 interface */ |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1938 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { |
| 1939 | .master = &omap3xxx_l4_core_hwmod, |
| 1940 | .slave = &omap3xxx_i2c2_hwmod, |
| 1941 | .clk = "i2c2_ick", |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1942 | .fw = { |
| 1943 | .omap2 = { |
| 1944 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, |
| 1945 | .l4_prot_group = 7, |
| 1946 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1947 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1948 | }, |
| 1949 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1950 | }; |
| 1951 | |
| 1952 | /* L4 CORE -> I2C3 interface */ |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1953 | |
| 1954 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { |
| 1955 | .master = &omap3xxx_l4_core_hwmod, |
| 1956 | .slave = &omap3xxx_i2c3_hwmod, |
| 1957 | .clk = "i2c3_ick", |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1958 | .fw = { |
| 1959 | .omap2 = { |
| 1960 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, |
| 1961 | .l4_prot_group = 7, |
| 1962 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 1963 | }, |
Rajendra Nayak | 4fe20e9 | 2010-09-21 19:37:13 +0530 | [diff] [blame] | 1964 | }, |
| 1965 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1966 | }; |
| 1967 | |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1968 | /* L4 CORE -> SR1 interface */ |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1969 | static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = { |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1970 | .master = &omap3xxx_l4_core_hwmod, |
| 1971 | .slave = &omap34xx_sr1_hwmod, |
| 1972 | .clk = "sr_l4_ick", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1973 | .user = OCP_USER_MPU, |
| 1974 | }; |
| 1975 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1976 | static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = { |
| 1977 | .master = &omap3xxx_l4_core_hwmod, |
| 1978 | .slave = &omap36xx_sr1_hwmod, |
| 1979 | .clk = "sr_l4_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1980 | .user = OCP_USER_MPU, |
| 1981 | }; |
| 1982 | |
Tony Lindgren | 9cffb1a | 2017-10-10 14:27:33 -0700 | [diff] [blame] | 1983 | /* L4 CORE -> SR2 interface */ |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1984 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1985 | static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = { |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1986 | .master = &omap3xxx_l4_core_hwmod, |
| 1987 | .slave = &omap34xx_sr2_hwmod, |
| 1988 | .clk = "sr_l4_ick", |
Thara Gopinath | d344272 | 2010-05-29 22:02:24 +0530 | [diff] [blame] | 1989 | .user = OCP_USER_MPU, |
| 1990 | }; |
| 1991 | |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1992 | static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = { |
| 1993 | .master = &omap3xxx_l4_core_hwmod, |
| 1994 | .slave = &omap36xx_sr2_hwmod, |
| 1995 | .clk = "sr_l4_ick", |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 1996 | .user = OCP_USER_MPU, |
| 1997 | }; |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 1998 | |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 1999 | |
| 2000 | /* l4_core -> usbhsotg */ |
| 2001 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { |
| 2002 | .master = &omap3xxx_l4_core_hwmod, |
| 2003 | .slave = &omap3xxx_usbhsotg_hwmod, |
| 2004 | .clk = "l4_ick", |
Hema HK | 870ea2b | 2011-02-17 12:07:18 +0530 | [diff] [blame] | 2005 | .user = OCP_USER_MPU, |
| 2006 | }; |
| 2007 | |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2008 | |
| 2009 | /* l4_core -> usbhsotg */ |
| 2010 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { |
| 2011 | .master = &omap3xxx_l4_core_hwmod, |
| 2012 | .slave = &am35xx_usbhsotg_hwmod, |
Paul Walmsley | 89ea258 | 2012-06-27 14:53:46 -0600 | [diff] [blame] | 2013 | .clk = "hsotgusb_ick", |
Hema HK | 273ff8c | 2011-02-17 12:07:19 +0530 | [diff] [blame] | 2014 | .user = OCP_USER_MPU, |
| 2015 | }; |
| 2016 | |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 2017 | /* L4_WKUP -> L4_SEC interface */ |
| 2018 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__l4_sec = { |
| 2019 | .master = &omap3xxx_l4_wkup_hwmod, |
| 2020 | .slave = &omap3xxx_l4_sec_hwmod, |
| 2021 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2022 | }; |
| 2023 | |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 2024 | /* IVA2 <- L3 interface */ |
| 2025 | static struct omap_hwmod_ocp_if omap3xxx_l3__iva = { |
| 2026 | .master = &omap3xxx_l3_main_hwmod, |
| 2027 | .slave = &omap3xxx_iva_hwmod, |
Paul Walmsley | 064931a | 2012-04-19 04:04:35 -0600 | [diff] [blame] | 2028 | .clk = "core_l3_ick", |
Kevin Hilman | 540064b | 2010-07-26 16:34:32 -0600 | [diff] [blame] | 2029 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2030 | }; |
| 2031 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2032 | |
| 2033 | /* l4_wkup -> timer1 */ |
| 2034 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { |
| 2035 | .master = &omap3xxx_l4_wkup_hwmod, |
| 2036 | .slave = &omap3xxx_timer1_hwmod, |
| 2037 | .clk = "gpt1_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2038 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2039 | }; |
| 2040 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2041 | |
| 2042 | /* l4_per -> timer2 */ |
| 2043 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { |
| 2044 | .master = &omap3xxx_l4_per_hwmod, |
| 2045 | .slave = &omap3xxx_timer2_hwmod, |
| 2046 | .clk = "gpt2_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2047 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2048 | }; |
| 2049 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2050 | |
| 2051 | /* l4_per -> timer3 */ |
| 2052 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { |
| 2053 | .master = &omap3xxx_l4_per_hwmod, |
| 2054 | .slave = &omap3xxx_timer3_hwmod, |
| 2055 | .clk = "gpt3_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2056 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2057 | }; |
| 2058 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2059 | |
| 2060 | /* l4_per -> timer4 */ |
| 2061 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { |
| 2062 | .master = &omap3xxx_l4_per_hwmod, |
| 2063 | .slave = &omap3xxx_timer4_hwmod, |
| 2064 | .clk = "gpt4_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2065 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2066 | }; |
| 2067 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2068 | |
| 2069 | /* l4_per -> timer5 */ |
| 2070 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { |
| 2071 | .master = &omap3xxx_l4_per_hwmod, |
| 2072 | .slave = &omap3xxx_timer5_hwmod, |
| 2073 | .clk = "gpt5_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2074 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2075 | }; |
| 2076 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2077 | |
| 2078 | /* l4_per -> timer6 */ |
| 2079 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { |
| 2080 | .master = &omap3xxx_l4_per_hwmod, |
| 2081 | .slave = &omap3xxx_timer6_hwmod, |
| 2082 | .clk = "gpt6_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2083 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2084 | }; |
| 2085 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2086 | |
| 2087 | /* l4_per -> timer7 */ |
| 2088 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { |
| 2089 | .master = &omap3xxx_l4_per_hwmod, |
| 2090 | .slave = &omap3xxx_timer7_hwmod, |
| 2091 | .clk = "gpt7_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2092 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2093 | }; |
| 2094 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2095 | |
| 2096 | /* l4_per -> timer8 */ |
| 2097 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { |
| 2098 | .master = &omap3xxx_l4_per_hwmod, |
| 2099 | .slave = &omap3xxx_timer8_hwmod, |
| 2100 | .clk = "gpt8_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2101 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2102 | }; |
| 2103 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2104 | |
| 2105 | /* l4_per -> timer9 */ |
| 2106 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { |
| 2107 | .master = &omap3xxx_l4_per_hwmod, |
| 2108 | .slave = &omap3xxx_timer9_hwmod, |
| 2109 | .clk = "gpt9_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2110 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2111 | }; |
| 2112 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2113 | /* l4_core -> timer10 */ |
| 2114 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { |
| 2115 | .master = &omap3xxx_l4_core_hwmod, |
| 2116 | .slave = &omap3xxx_timer10_hwmod, |
| 2117 | .clk = "gpt10_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2118 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2119 | }; |
| 2120 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2121 | /* l4_core -> timer11 */ |
| 2122 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { |
| 2123 | .master = &omap3xxx_l4_core_hwmod, |
| 2124 | .slave = &omap3xxx_timer11_hwmod, |
| 2125 | .clk = "gpt11_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2126 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2127 | }; |
| 2128 | |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2129 | |
| 2130 | /* l4_core -> timer12 */ |
Paul Walmsley | 4308570 | 2012-04-19 04:03:53 -0600 | [diff] [blame] | 2131 | static struct omap_hwmod_ocp_if omap3xxx_l4_sec__timer12 = { |
| 2132 | .master = &omap3xxx_l4_sec_hwmod, |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2133 | .slave = &omap3xxx_timer12_hwmod, |
| 2134 | .clk = "gpt12_ick", |
Thara Gopinath | ce722d2 | 2011-02-23 00:14:05 -0700 | [diff] [blame] | 2135 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2136 | }; |
| 2137 | |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 2138 | /* l4_wkup -> wd_timer2 */ |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 2139 | |
| 2140 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { |
| 2141 | .master = &omap3xxx_l4_wkup_hwmod, |
| 2142 | .slave = &omap3xxx_wd_timer2_hwmod, |
| 2143 | .clk = "wdt2_ick", |
Varadarajan, Charulatha | 6b667f8 | 2010-09-23 20:02:38 +0530 | [diff] [blame] | 2144 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2145 | }; |
| 2146 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2147 | /* l4_core -> dss */ |
| 2148 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { |
| 2149 | .master = &omap3xxx_l4_core_hwmod, |
| 2150 | .slave = &omap3430es1_dss_core_hwmod, |
| 2151 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2152 | .fw = { |
| 2153 | .omap2 = { |
| 2154 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, |
| 2155 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 2156 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2157 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2158 | }, |
| 2159 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2160 | }; |
| 2161 | |
| 2162 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { |
| 2163 | .master = &omap3xxx_l4_core_hwmod, |
| 2164 | .slave = &omap3xxx_dss_core_hwmod, |
| 2165 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2166 | .fw = { |
| 2167 | .omap2 = { |
| 2168 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, |
| 2169 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 2170 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2171 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2172 | }, |
| 2173 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2174 | }; |
| 2175 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2176 | /* l4_core -> dss_dispc */ |
| 2177 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { |
| 2178 | .master = &omap3xxx_l4_core_hwmod, |
| 2179 | .slave = &omap3xxx_dss_dispc_hwmod, |
| 2180 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2181 | .fw = { |
| 2182 | .omap2 = { |
| 2183 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, |
| 2184 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 2185 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2186 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2187 | }, |
| 2188 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2189 | }; |
| 2190 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2191 | /* l4_core -> dss_dsi1 */ |
| 2192 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { |
| 2193 | .master = &omap3xxx_l4_core_hwmod, |
| 2194 | .slave = &omap3xxx_dss_dsi1_hwmod, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 2195 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2196 | .fw = { |
| 2197 | .omap2 = { |
| 2198 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, |
| 2199 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 2200 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2201 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2202 | }, |
| 2203 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2204 | }; |
| 2205 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2206 | /* l4_core -> dss_rfbi */ |
| 2207 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { |
| 2208 | .master = &omap3xxx_l4_core_hwmod, |
| 2209 | .slave = &omap3xxx_dss_rfbi_hwmod, |
| 2210 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2211 | .fw = { |
| 2212 | .omap2 = { |
| 2213 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, |
| 2214 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , |
| 2215 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2216 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2217 | }, |
| 2218 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2219 | }; |
| 2220 | |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2221 | /* l4_core -> dss_venc */ |
| 2222 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { |
| 2223 | .master = &omap3xxx_l4_core_hwmod, |
| 2224 | .slave = &omap3xxx_dss_venc_hwmod, |
Tomi Valkeinen | 6c3d7e3 | 2011-11-08 03:16:10 -0700 | [diff] [blame] | 2225 | .clk = "dss_ick", |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2226 | .fw = { |
| 2227 | .omap2 = { |
| 2228 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, |
| 2229 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, |
| 2230 | .flags = OMAP_FIREWALL_L4, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2231 | }, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2232 | }, |
Paul Walmsley | 844a3b6 | 2012-04-19 04:04:33 -0600 | [diff] [blame] | 2233 | .flags = OCPIF_SWSUP_IDLE, |
Senthilvadivu Guruswamy | e04d9e1 | 2011-01-24 06:21:51 +0000 | [diff] [blame] | 2234 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2235 | }; |
| 2236 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2237 | /* l4_wkup -> gpio1 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2238 | |
| 2239 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { |
| 2240 | .master = &omap3xxx_l4_wkup_hwmod, |
| 2241 | .slave = &omap3xxx_gpio1_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2242 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2243 | }; |
| 2244 | |
| 2245 | /* l4_per -> gpio2 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2246 | |
| 2247 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { |
| 2248 | .master = &omap3xxx_l4_per_hwmod, |
| 2249 | .slave = &omap3xxx_gpio2_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2250 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2251 | }; |
| 2252 | |
| 2253 | /* l4_per -> gpio3 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2254 | |
| 2255 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { |
| 2256 | .master = &omap3xxx_l4_per_hwmod, |
| 2257 | .slave = &omap3xxx_gpio3_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2258 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2259 | }; |
| 2260 | |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2261 | /* |
| 2262 | * 'mmu' class |
| 2263 | * The memory management unit performs virtual to physical address translation |
| 2264 | * for its requestors. |
| 2265 | */ |
| 2266 | |
| 2267 | static struct omap_hwmod_class_sysconfig mmu_sysc = { |
| 2268 | .rev_offs = 0x000, |
| 2269 | .sysc_offs = 0x010, |
| 2270 | .syss_offs = 0x014, |
| 2271 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | |
| 2272 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), |
| 2273 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2274 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2275 | }; |
| 2276 | |
| 2277 | static struct omap_hwmod_class omap3xxx_mmu_hwmod_class = { |
| 2278 | .name = "mmu", |
| 2279 | .sysc = &mmu_sysc, |
| 2280 | }; |
| 2281 | |
| 2282 | /* mmu isp */ |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2283 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod; |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2284 | |
| 2285 | /* l4_core -> mmu isp */ |
| 2286 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmu_isp = { |
| 2287 | .master = &omap3xxx_l4_core_hwmod, |
| 2288 | .slave = &omap3xxx_mmu_isp_hwmod, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2289 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2290 | }; |
| 2291 | |
| 2292 | static struct omap_hwmod omap3xxx_mmu_isp_hwmod = { |
| 2293 | .name = "mmu_isp", |
| 2294 | .class = &omap3xxx_mmu_hwmod_class, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2295 | .main_clk = "cam_ick", |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2296 | .flags = HWMOD_NO_IDLEST, |
| 2297 | }; |
| 2298 | |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2299 | /* mmu iva */ |
| 2300 | |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2301 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod; |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2302 | |
| 2303 | static struct omap_hwmod_rst_info omap3xxx_mmu_iva_resets[] = { |
| 2304 | { .name = "mmu", .rst_shift = 1, .st_shift = 9 }, |
| 2305 | }; |
| 2306 | |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2307 | /* l3_main -> iva mmu */ |
| 2308 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__mmu_iva = { |
| 2309 | .master = &omap3xxx_l3_main_hwmod, |
| 2310 | .slave = &omap3xxx_mmu_iva_hwmod, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2311 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2312 | }; |
| 2313 | |
| 2314 | static struct omap_hwmod omap3xxx_mmu_iva_hwmod = { |
| 2315 | .name = "mmu_iva", |
| 2316 | .class = &omap3xxx_mmu_hwmod_class, |
Suman Anna | 200a274 | 2014-03-05 18:24:11 -0600 | [diff] [blame] | 2317 | .clkdm_name = "iva2_clkdm", |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2318 | .rst_lines = omap3xxx_mmu_iva_resets, |
| 2319 | .rst_lines_cnt = ARRAY_SIZE(omap3xxx_mmu_iva_resets), |
| 2320 | .main_clk = "iva2_ck", |
| 2321 | .prcm = { |
| 2322 | .omap2 = { |
| 2323 | .module_offs = OMAP3430_IVA2_MOD, |
Suman Anna | 200a274 | 2014-03-05 18:24:11 -0600 | [diff] [blame] | 2324 | .idlest_reg_id = 1, |
| 2325 | .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2326 | }, |
| 2327 | }, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2328 | .flags = HWMOD_NO_IDLEST, |
| 2329 | }; |
| 2330 | |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2331 | /* l4_per -> gpio4 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2332 | |
| 2333 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { |
| 2334 | .master = &omap3xxx_l4_per_hwmod, |
| 2335 | .slave = &omap3xxx_gpio4_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2336 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2337 | }; |
| 2338 | |
| 2339 | /* l4_per -> gpio5 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2340 | |
| 2341 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { |
| 2342 | .master = &omap3xxx_l4_per_hwmod, |
| 2343 | .slave = &omap3xxx_gpio5_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2344 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2345 | }; |
| 2346 | |
| 2347 | /* l4_per -> gpio6 */ |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2348 | |
| 2349 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { |
| 2350 | .master = &omap3xxx_l4_per_hwmod, |
| 2351 | .slave = &omap3xxx_gpio6_hwmod, |
Varadarajan, Charulatha | 70034d3 | 2010-12-07 16:26:57 -0800 | [diff] [blame] | 2352 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2353 | }; |
| 2354 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 2355 | /* dma_system -> L3 */ |
| 2356 | static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = { |
| 2357 | .master = &omap3xxx_dma_system_hwmod, |
| 2358 | .slave = &omap3xxx_l3_main_hwmod, |
| 2359 | .clk = "core_l3_ick", |
| 2360 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2361 | }; |
| 2362 | |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 2363 | /* l4_cfg -> dma_system */ |
| 2364 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = { |
| 2365 | .master = &omap3xxx_l4_core_hwmod, |
| 2366 | .slave = &omap3xxx_dma_system_hwmod, |
| 2367 | .clk = "core_l4_ick", |
G, Manjunath Kondaiah | 01438ab | 2010-12-20 18:27:19 -0800 | [diff] [blame] | 2368 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2369 | }; |
| 2370 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2371 | |
| 2372 | /* l4_core -> mcbsp1 */ |
| 2373 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { |
| 2374 | .master = &omap3xxx_l4_core_hwmod, |
| 2375 | .slave = &omap3xxx_mcbsp1_hwmod, |
| 2376 | .clk = "mcbsp1_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2377 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2378 | }; |
| 2379 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2380 | |
| 2381 | /* l4_per -> mcbsp2 */ |
| 2382 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { |
| 2383 | .master = &omap3xxx_l4_per_hwmod, |
| 2384 | .slave = &omap3xxx_mcbsp2_hwmod, |
| 2385 | .clk = "mcbsp2_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2386 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2387 | }; |
| 2388 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2389 | |
| 2390 | /* l4_per -> mcbsp3 */ |
| 2391 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { |
| 2392 | .master = &omap3xxx_l4_per_hwmod, |
| 2393 | .slave = &omap3xxx_mcbsp3_hwmod, |
| 2394 | .clk = "mcbsp3_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2395 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2396 | }; |
| 2397 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2398 | |
| 2399 | /* l4_per -> mcbsp4 */ |
| 2400 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { |
| 2401 | .master = &omap3xxx_l4_per_hwmod, |
| 2402 | .slave = &omap3xxx_mcbsp4_hwmod, |
| 2403 | .clk = "mcbsp4_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2404 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2405 | }; |
| 2406 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2407 | |
| 2408 | /* l4_core -> mcbsp5 */ |
| 2409 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { |
| 2410 | .master = &omap3xxx_l4_core_hwmod, |
| 2411 | .slave = &omap3xxx_mcbsp5_hwmod, |
| 2412 | .clk = "mcbsp5_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2413 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2414 | }; |
| 2415 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2416 | |
| 2417 | /* l4_per -> mcbsp2_sidetone */ |
| 2418 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { |
| 2419 | .master = &omap3xxx_l4_per_hwmod, |
| 2420 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, |
| 2421 | .clk = "mcbsp2_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2422 | .user = OCP_USER_MPU, |
| 2423 | }; |
| 2424 | |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2425 | |
| 2426 | /* l4_per -> mcbsp3_sidetone */ |
| 2427 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { |
| 2428 | .master = &omap3xxx_l4_per_hwmod, |
| 2429 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, |
| 2430 | .clk = "mcbsp3_ick", |
Charulatha V | dc48e5f | 2011-02-24 15:16:49 +0530 | [diff] [blame] | 2431 | .user = OCP_USER_MPU, |
| 2432 | }; |
| 2433 | |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2434 | /* l4_core -> mailbox */ |
| 2435 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { |
| 2436 | .master = &omap3xxx_l4_core_hwmod, |
| 2437 | .slave = &omap3xxx_mailbox_hwmod, |
Felipe Contreras | 0f9dfdd | 2011-02-24 12:51:32 -0800 | [diff] [blame] | 2438 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2439 | }; |
| 2440 | |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2441 | /* l4 core -> mcspi1 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2442 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { |
| 2443 | .master = &omap3xxx_l4_core_hwmod, |
| 2444 | .slave = &omap34xx_mcspi1, |
| 2445 | .clk = "mcspi1_ick", |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2446 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2447 | }; |
| 2448 | |
| 2449 | /* l4 core -> mcspi2 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2450 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { |
| 2451 | .master = &omap3xxx_l4_core_hwmod, |
| 2452 | .slave = &omap34xx_mcspi2, |
| 2453 | .clk = "mcspi2_ick", |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2454 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2455 | }; |
| 2456 | |
| 2457 | /* l4 core -> mcspi3 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2458 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { |
| 2459 | .master = &omap3xxx_l4_core_hwmod, |
| 2460 | .slave = &omap34xx_mcspi3, |
| 2461 | .clk = "mcspi3_ick", |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2462 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2463 | }; |
| 2464 | |
| 2465 | /* l4 core -> mcspi4 interface */ |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2466 | |
| 2467 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { |
| 2468 | .master = &omap3xxx_l4_core_hwmod, |
| 2469 | .slave = &omap34xx_mcspi4, |
| 2470 | .clk = "mcspi4_ick", |
Charulatha V | 0f616a4 | 2011-02-17 09:53:10 -0800 | [diff] [blame] | 2471 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2472 | }; |
| 2473 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2474 | static struct omap_hwmod_ocp_if omap3xxx_usb_host_hs__l3_main_2 = { |
| 2475 | .master = &omap3xxx_usb_host_hs_hwmod, |
| 2476 | .slave = &omap3xxx_l3_main_hwmod, |
| 2477 | .clk = "core_l3_ick", |
| 2478 | .user = OCP_USER_MPU, |
| 2479 | }; |
| 2480 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2481 | |
| 2482 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_host_hs = { |
| 2483 | .master = &omap3xxx_l4_core_hwmod, |
| 2484 | .slave = &omap3xxx_usb_host_hs_hwmod, |
| 2485 | .clk = "usbhost_ick", |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2486 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2487 | }; |
| 2488 | |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2489 | |
| 2490 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = { |
| 2491 | .master = &omap3xxx_l4_core_hwmod, |
| 2492 | .slave = &omap3xxx_usb_tll_hs_hwmod, |
| 2493 | .clk = "usbtll_ick", |
Keshava Munegowda | de23138 | 2011-12-15 23:14:44 -0700 | [diff] [blame] | 2494 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2495 | }; |
| 2496 | |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 2497 | /* l4_core -> hdq1w interface */ |
| 2498 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = { |
| 2499 | .master = &omap3xxx_l4_core_hwmod, |
| 2500 | .slave = &omap3xxx_hdq1w_hwmod, |
| 2501 | .clk = "hdq_ick", |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 2502 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2503 | .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE, |
| 2504 | }; |
| 2505 | |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 2506 | /* l4_wkup -> 32ksync_counter */ |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 2507 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 2508 | |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 2509 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__counter_32k = { |
| 2510 | .master = &omap3xxx_l4_wkup_hwmod, |
| 2511 | .slave = &omap3xxx_counter_32k_hwmod, |
| 2512 | .clk = "omap_32ksync_ick", |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 2513 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2514 | }; |
| 2515 | |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2516 | /* am35xx has Davinci MDIO & EMAC */ |
| 2517 | static struct omap_hwmod_class am35xx_mdio_class = { |
| 2518 | .name = "davinci_mdio", |
| 2519 | }; |
| 2520 | |
| 2521 | static struct omap_hwmod am35xx_mdio_hwmod = { |
| 2522 | .name = "davinci_mdio", |
| 2523 | .class = &am35xx_mdio_class, |
| 2524 | .flags = HWMOD_NO_IDLEST, |
| 2525 | }; |
| 2526 | |
| 2527 | /* |
| 2528 | * XXX Should be connected to an IPSS hwmod, not the L3 directly; |
| 2529 | * but this will probably require some additional hwmod core support, |
| 2530 | * so is left as a future to-do item. |
| 2531 | */ |
| 2532 | static struct omap_hwmod_ocp_if am35xx_mdio__l3 = { |
| 2533 | .master = &am35xx_mdio_hwmod, |
| 2534 | .slave = &omap3xxx_l3_main_hwmod, |
| 2535 | .clk = "emac_fck", |
| 2536 | .user = OCP_USER_MPU, |
| 2537 | }; |
| 2538 | |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2539 | /* l4_core -> davinci mdio */ |
| 2540 | /* |
| 2541 | * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly; |
| 2542 | * but this will probably require some additional hwmod core support, |
| 2543 | * so is left as a future to-do item. |
| 2544 | */ |
| 2545 | static struct omap_hwmod_ocp_if am35xx_l4_core__mdio = { |
| 2546 | .master = &omap3xxx_l4_core_hwmod, |
| 2547 | .slave = &am35xx_mdio_hwmod, |
| 2548 | .clk = "emac_fck", |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2549 | .user = OCP_USER_MPU, |
| 2550 | }; |
| 2551 | |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2552 | static struct omap_hwmod_class am35xx_emac_class = { |
| 2553 | .name = "davinci_emac", |
| 2554 | }; |
| 2555 | |
| 2556 | static struct omap_hwmod am35xx_emac_hwmod = { |
| 2557 | .name = "davinci_emac", |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2558 | .class = &am35xx_emac_class, |
Paul Walmsley | 814a18a | 2013-02-06 13:48:56 -0700 | [diff] [blame] | 2559 | /* |
| 2560 | * According to Mark Greer, the MPU will not return from WFI |
| 2561 | * when the EMAC signals an interrupt. |
| 2562 | * http://www.spinics.net/lists/arm-kernel/msg174734.html |
| 2563 | */ |
| 2564 | .flags = (HWMOD_NO_IDLEST | HWMOD_BLOCK_WFI), |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2565 | }; |
| 2566 | |
| 2567 | /* l3_core -> davinci emac interface */ |
| 2568 | /* |
| 2569 | * XXX Should be connected to an IPSS hwmod, not the L3 directly; |
| 2570 | * but this will probably require some additional hwmod core support, |
| 2571 | * so is left as a future to-do item. |
| 2572 | */ |
| 2573 | static struct omap_hwmod_ocp_if am35xx_emac__l3 = { |
| 2574 | .master = &am35xx_emac_hwmod, |
| 2575 | .slave = &omap3xxx_l3_main_hwmod, |
| 2576 | .clk = "emac_ick", |
| 2577 | .user = OCP_USER_MPU, |
| 2578 | }; |
| 2579 | |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2580 | /* l4_core -> davinci emac */ |
| 2581 | /* |
| 2582 | * XXX Should be connected to an IPSS hwmod, not the L4_CORE directly; |
| 2583 | * but this will probably require some additional hwmod core support, |
| 2584 | * so is left as a future to-do item. |
| 2585 | */ |
| 2586 | static struct omap_hwmod_ocp_if am35xx_l4_core__emac = { |
| 2587 | .master = &omap3xxx_l4_core_hwmod, |
| 2588 | .slave = &am35xx_emac_hwmod, |
| 2589 | .clk = "emac_ick", |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2590 | .user = OCP_USER_MPU, |
| 2591 | }; |
| 2592 | |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 2593 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__gpmc = { |
| 2594 | .master = &omap3xxx_l3_main_hwmod, |
| 2595 | .slave = &omap3xxx_gpmc_hwmod, |
| 2596 | .clk = "core_l3_ick", |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 2597 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2598 | }; |
| 2599 | |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2600 | /* l4_core -> SHAM2 (SHA1/MD5) (similar to omap24xx) */ |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2601 | static struct omap_hwmod_class_sysconfig omap3_sham_sysc = { |
| 2602 | .rev_offs = 0x5c, |
| 2603 | .sysc_offs = 0x60, |
| 2604 | .syss_offs = 0x64, |
| 2605 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 2606 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 2607 | .sysc_fields = &omap3_sham_sysc_fields, |
| 2608 | }; |
| 2609 | |
| 2610 | static struct omap_hwmod_class omap3xxx_sham_class = { |
| 2611 | .name = "sham", |
| 2612 | .sysc = &omap3_sham_sysc, |
| 2613 | }; |
| 2614 | |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2615 | |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2616 | |
| 2617 | static struct omap_hwmod omap3xxx_sham_hwmod = { |
| 2618 | .name = "sham", |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2619 | .main_clk = "sha12_ick", |
| 2620 | .prcm = { |
| 2621 | .omap2 = { |
| 2622 | .module_offs = CORE_MOD, |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2623 | .idlest_reg_id = 1, |
| 2624 | .idlest_idle_bit = OMAP3430_ST_SHA12_SHIFT, |
| 2625 | }, |
| 2626 | }, |
| 2627 | .class = &omap3xxx_sham_class, |
| 2628 | }; |
| 2629 | |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2630 | |
| 2631 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__sham = { |
| 2632 | .master = &omap3xxx_l4_core_hwmod, |
| 2633 | .slave = &omap3xxx_sham_hwmod, |
| 2634 | .clk = "sha12_ick", |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2635 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2636 | }; |
| 2637 | |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2638 | /* l4_core -> AES */ |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2639 | static struct omap_hwmod_class_sysconfig omap3_aes_sysc = { |
| 2640 | .rev_offs = 0x44, |
| 2641 | .sysc_offs = 0x48, |
| 2642 | .syss_offs = 0x4c, |
| 2643 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | |
| 2644 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), |
| 2645 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
| 2646 | .sysc_fields = &omap3xxx_aes_sysc_fields, |
| 2647 | }; |
| 2648 | |
| 2649 | static struct omap_hwmod_class omap3xxx_aes_class = { |
| 2650 | .name = "aes", |
| 2651 | .sysc = &omap3_aes_sysc, |
| 2652 | }; |
| 2653 | |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2654 | |
| 2655 | static struct omap_hwmod omap3xxx_aes_hwmod = { |
| 2656 | .name = "aes", |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2657 | .main_clk = "aes2_ick", |
| 2658 | .prcm = { |
| 2659 | .omap2 = { |
| 2660 | .module_offs = CORE_MOD, |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2661 | .idlest_reg_id = 1, |
| 2662 | .idlest_idle_bit = OMAP3430_ST_AES2_SHIFT, |
| 2663 | }, |
| 2664 | }, |
| 2665 | .class = &omap3xxx_aes_class, |
| 2666 | }; |
| 2667 | |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2668 | |
| 2669 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__aes = { |
| 2670 | .master = &omap3xxx_l4_core_hwmod, |
| 2671 | .slave = &omap3xxx_aes_hwmod, |
| 2672 | .clk = "aes2_ick", |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2673 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2674 | }; |
| 2675 | |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2676 | /* |
| 2677 | * 'ssi' class |
| 2678 | * synchronous serial interface (multichannel and full-duplex serial if) |
| 2679 | */ |
| 2680 | |
| 2681 | static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = { |
| 2682 | .rev_offs = 0x0000, |
| 2683 | .sysc_offs = 0x0010, |
| 2684 | .syss_offs = 0x0014, |
Tony Lindgren | dc94fab | 2014-05-21 12:31:35 -0700 | [diff] [blame] | 2685 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_MIDLEMODE | |
| 2686 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
| 2687 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2688 | .sysc_fields = &omap_hwmod_sysc_type1, |
| 2689 | }; |
| 2690 | |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2691 | static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = { |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2692 | .name = "ssi", |
| 2693 | .sysc = &omap34xx_ssi_sysc, |
| 2694 | }; |
| 2695 | |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2696 | static struct omap_hwmod omap3xxx_ssi_hwmod = { |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2697 | .name = "ssi", |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2698 | .class = &omap3xxx_ssi_hwmod_class, |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2699 | .clkdm_name = "core_l4_clkdm", |
| 2700 | .main_clk = "ssi_ssr_fck", |
| 2701 | .prcm = { |
| 2702 | .omap2 = { |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2703 | .module_offs = CORE_MOD, |
| 2704 | .idlest_reg_id = 1, |
| 2705 | .idlest_idle_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT, |
| 2706 | }, |
| 2707 | }, |
| 2708 | }; |
| 2709 | |
| 2710 | /* L4 CORE -> SSI */ |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2711 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = { |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2712 | .master = &omap3xxx_l4_core_hwmod, |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2713 | .slave = &omap3xxx_ssi_hwmod, |
Sebastian Reichel | 398917c | 2013-10-08 23:46:49 -0600 | [diff] [blame] | 2714 | .clk = "ssi_ick", |
| 2715 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 2716 | }; |
| 2717 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2718 | static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { |
| 2719 | &omap3xxx_l3_main__l4_core, |
| 2720 | &omap3xxx_l3_main__l4_per, |
| 2721 | &omap3xxx_mpu__l3_main, |
Jon Hunter | c7dad45f | 2012-09-23 17:28:28 -0600 | [diff] [blame] | 2722 | &omap3xxx_l3_main__l4_debugss, |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2723 | &omap3xxx_l4_core__l4_wkup, |
| 2724 | &omap3xxx_l4_core__mmc3, |
| 2725 | &omap3_l4_core__uart1, |
| 2726 | &omap3_l4_core__uart2, |
| 2727 | &omap3_l4_per__uart3, |
| 2728 | &omap3_l4_core__i2c1, |
| 2729 | &omap3_l4_core__i2c2, |
| 2730 | &omap3_l4_core__i2c3, |
| 2731 | &omap3xxx_l4_wkup__l4_sec, |
| 2732 | &omap3xxx_l4_wkup__timer1, |
| 2733 | &omap3xxx_l4_per__timer2, |
| 2734 | &omap3xxx_l4_per__timer3, |
| 2735 | &omap3xxx_l4_per__timer4, |
| 2736 | &omap3xxx_l4_per__timer5, |
| 2737 | &omap3xxx_l4_per__timer6, |
| 2738 | &omap3xxx_l4_per__timer7, |
| 2739 | &omap3xxx_l4_per__timer8, |
| 2740 | &omap3xxx_l4_per__timer9, |
| 2741 | &omap3xxx_l4_core__timer10, |
| 2742 | &omap3xxx_l4_core__timer11, |
| 2743 | &omap3xxx_l4_wkup__wd_timer2, |
| 2744 | &omap3xxx_l4_wkup__gpio1, |
| 2745 | &omap3xxx_l4_per__gpio2, |
| 2746 | &omap3xxx_l4_per__gpio3, |
| 2747 | &omap3xxx_l4_per__gpio4, |
| 2748 | &omap3xxx_l4_per__gpio5, |
| 2749 | &omap3xxx_l4_per__gpio6, |
| 2750 | &omap3xxx_dma_system__l3, |
| 2751 | &omap3xxx_l4_core__dma_system, |
| 2752 | &omap3xxx_l4_core__mcbsp1, |
| 2753 | &omap3xxx_l4_per__mcbsp2, |
| 2754 | &omap3xxx_l4_per__mcbsp3, |
| 2755 | &omap3xxx_l4_per__mcbsp4, |
| 2756 | &omap3xxx_l4_core__mcbsp5, |
| 2757 | &omap3xxx_l4_per__mcbsp2_sidetone, |
| 2758 | &omap3xxx_l4_per__mcbsp3_sidetone, |
| 2759 | &omap34xx_l4_core__mcspi1, |
| 2760 | &omap34xx_l4_core__mcspi2, |
| 2761 | &omap34xx_l4_core__mcspi3, |
| 2762 | &omap34xx_l4_core__mcspi4, |
Vaibhav Hiremath | c8d82ff | 2012-05-08 11:34:30 -0600 | [diff] [blame] | 2763 | &omap3xxx_l4_wkup__counter_32k, |
Afzal Mohammed | 49484a6 | 2012-09-23 17:28:24 -0600 | [diff] [blame] | 2764 | &omap3xxx_l3_main__gpmc, |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 2765 | NULL, |
| 2766 | }; |
| 2767 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2768 | /* GP-only hwmod links */ |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2769 | static struct omap_hwmod_ocp_if *omap34xx_gp_hwmod_ocp_ifs[] __initdata = { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2770 | &omap3xxx_l4_sec__timer12, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2771 | NULL, |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2772 | }; |
| 2773 | |
| 2774 | static struct omap_hwmod_ocp_if *omap36xx_gp_hwmod_ocp_ifs[] __initdata = { |
| 2775 | &omap3xxx_l4_sec__timer12, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2776 | NULL, |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2777 | }; |
| 2778 | |
| 2779 | static struct omap_hwmod_ocp_if *am35xx_gp_hwmod_ocp_ifs[] __initdata = { |
| 2780 | &omap3xxx_l4_sec__timer12, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2781 | NULL, |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2782 | }; |
| 2783 | |
| 2784 | /* crypto hwmod links */ |
| 2785 | static struct omap_hwmod_ocp_if *omap34xx_sham_hwmod_ocp_ifs[] __initdata = { |
| 2786 | &omap3xxx_l4_core__sham, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2787 | NULL, |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2788 | }; |
| 2789 | |
| 2790 | static struct omap_hwmod_ocp_if *omap34xx_aes_hwmod_ocp_ifs[] __initdata = { |
| 2791 | &omap3xxx_l4_core__aes, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2792 | NULL, |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2793 | }; |
| 2794 | |
| 2795 | static struct omap_hwmod_ocp_if *omap36xx_sham_hwmod_ocp_ifs[] __initdata = { |
| 2796 | &omap3xxx_l4_core__sham, |
| 2797 | NULL |
| 2798 | }; |
| 2799 | |
| 2800 | static struct omap_hwmod_ocp_if *omap36xx_aes_hwmod_ocp_ifs[] __initdata = { |
| 2801 | &omap3xxx_l4_core__aes, |
| 2802 | NULL |
| 2803 | }; |
| 2804 | |
| 2805 | /* |
| 2806 | * Apparently the SHA/MD5 and AES accelerator IP blocks are |
| 2807 | * only present on some AM35xx chips, and no one knows which |
| 2808 | * ones. See |
| 2809 | * http://www.spinics.net/lists/arm-kernel/msg215466.html So |
| 2810 | * if you need these IP blocks on an AM35xx, try uncommenting |
| 2811 | * the following lines. |
| 2812 | */ |
| 2813 | static struct omap_hwmod_ocp_if *am35xx_sham_hwmod_ocp_ifs[] __initdata = { |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2814 | /* &omap3xxx_l4_core__sham, */ |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2815 | NULL |
| 2816 | }; |
| 2817 | |
| 2818 | static struct omap_hwmod_ocp_if *am35xx_aes_hwmod_ocp_ifs[] __initdata = { |
Mark A. Greer | 14ae556 | 2012-12-21 09:28:10 -0700 | [diff] [blame] | 2819 | /* &omap3xxx_l4_core__aes, */ |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2820 | NULL, |
Aaro Koskinen | 91a36bd | 2011-12-15 22:38:37 -0700 | [diff] [blame] | 2821 | }; |
| 2822 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2823 | /* 3430ES1-only hwmod links */ |
| 2824 | static struct omap_hwmod_ocp_if *omap3430es1_hwmod_ocp_ifs[] __initdata = { |
| 2825 | &omap3430es1_dss__l3, |
| 2826 | &omap3430es1_l4_core__dss, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2827 | NULL, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2828 | }; |
| 2829 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2830 | /* 3430ES2+-only hwmod links */ |
| 2831 | static struct omap_hwmod_ocp_if *omap3430es2plus_hwmod_ocp_ifs[] __initdata = { |
| 2832 | &omap3xxx_dss__l3, |
| 2833 | &omap3xxx_l4_core__dss, |
| 2834 | &omap3xxx_usbhsotg__l3, |
| 2835 | &omap3xxx_l4_core__usbhsotg, |
| 2836 | &omap3xxx_usb_host_hs__l3_main_2, |
| 2837 | &omap3xxx_l4_core__usb_host_hs, |
| 2838 | &omap3xxx_l4_core__usb_tll_hs, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2839 | NULL, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2840 | }; |
| 2841 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2842 | /* <= 3430ES3-only hwmod links */ |
| 2843 | static struct omap_hwmod_ocp_if *omap3430_pre_es3_hwmod_ocp_ifs[] __initdata = { |
| 2844 | &omap3xxx_l4_core__pre_es3_mmc1, |
| 2845 | &omap3xxx_l4_core__pre_es3_mmc2, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2846 | NULL, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2847 | }; |
| 2848 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2849 | /* 3430ES3+-only hwmod links */ |
| 2850 | static struct omap_hwmod_ocp_if *omap3430_es3plus_hwmod_ocp_ifs[] __initdata = { |
| 2851 | &omap3xxx_l4_core__es3plus_mmc1, |
| 2852 | &omap3xxx_l4_core__es3plus_mmc2, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2853 | NULL, |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 2854 | }; |
| 2855 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2856 | /* 34xx-only hwmod links (all ES revisions) */ |
| 2857 | static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = { |
| 2858 | &omap3xxx_l3__iva, |
| 2859 | &omap34xx_l4_core__sr1, |
| 2860 | &omap34xx_l4_core__sr2, |
| 2861 | &omap3xxx_l4_core__mailbox, |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 2862 | &omap3xxx_l4_core__hdq1w, |
Tero Kristo | 8f993a0 | 2012-09-23 17:28:21 -0600 | [diff] [blame] | 2863 | &omap3xxx_sad2d__l3, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2864 | &omap3xxx_l4_core__mmu_isp, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2865 | &omap3xxx_l3_main__mmu_iva, |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2866 | &omap3xxx_l4_core__ssi, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2867 | NULL, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2868 | }; |
| 2869 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2870 | /* 36xx-only hwmod links (all ES revisions) */ |
| 2871 | static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = { |
| 2872 | &omap3xxx_l3__iva, |
| 2873 | &omap36xx_l4_per__uart4, |
| 2874 | &omap3xxx_dss__l3, |
| 2875 | &omap3xxx_l4_core__dss, |
| 2876 | &omap36xx_l4_core__sr1, |
| 2877 | &omap36xx_l4_core__sr2, |
| 2878 | &omap3xxx_usbhsotg__l3, |
| 2879 | &omap3xxx_l4_core__usbhsotg, |
| 2880 | &omap3xxx_l4_core__mailbox, |
| 2881 | &omap3xxx_usb_host_hs__l3_main_2, |
| 2882 | &omap3xxx_l4_core__usb_host_hs, |
| 2883 | &omap3xxx_l4_core__usb_tll_hs, |
| 2884 | &omap3xxx_l4_core__es3plus_mmc1, |
| 2885 | &omap3xxx_l4_core__es3plus_mmc2, |
Paul Walmsley | 45a4bb0 | 2012-05-08 11:34:28 -0600 | [diff] [blame] | 2886 | &omap3xxx_l4_core__hdq1w, |
Tero Kristo | 8f993a0 | 2012-09-23 17:28:21 -0600 | [diff] [blame] | 2887 | &omap3xxx_sad2d__l3, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2888 | &omap3xxx_l4_core__mmu_isp, |
Paul Walmsley | 5486474 | 2012-09-23 17:28:23 -0600 | [diff] [blame] | 2889 | &omap3xxx_l3_main__mmu_iva, |
Sebastian Reichel | 7711207 | 2016-01-17 16:49:05 +0100 | [diff] [blame] | 2890 | &omap3xxx_l4_core__ssi, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2891 | NULL, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2892 | }; |
| 2893 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2894 | static struct omap_hwmod_ocp_if *am35xx_hwmod_ocp_ifs[] __initdata = { |
| 2895 | &omap3xxx_dss__l3, |
| 2896 | &omap3xxx_l4_core__dss, |
| 2897 | &am35xx_usbhsotg__l3, |
| 2898 | &am35xx_l4_core__usbhsotg, |
| 2899 | &am35xx_l4_core__uart4, |
| 2900 | &omap3xxx_usb_host_hs__l3_main_2, |
| 2901 | &omap3xxx_l4_core__usb_host_hs, |
| 2902 | &omap3xxx_l4_core__usb_tll_hs, |
| 2903 | &omap3xxx_l4_core__es3plus_mmc1, |
| 2904 | &omap3xxx_l4_core__es3plus_mmc2, |
Raphael Assenat | b1a923d | 2012-09-17 10:56:14 -0400 | [diff] [blame] | 2905 | &omap3xxx_l4_core__hdq1w, |
Mark A. Greer | 31ba880 | 2012-06-27 14:59:57 -0600 | [diff] [blame] | 2906 | &am35xx_mdio__l3, |
| 2907 | &am35xx_l4_core__mdio, |
| 2908 | &am35xx_emac__l3, |
| 2909 | &am35xx_l4_core__emac, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2910 | NULL, |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2911 | }; |
| 2912 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2913 | static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = { |
| 2914 | &omap3xxx_l4_core__dss_dispc, |
| 2915 | &omap3xxx_l4_core__dss_dsi1, |
| 2916 | &omap3xxx_l4_core__dss_rfbi, |
| 2917 | &omap3xxx_l4_core__dss_venc, |
Tony Lindgren | d9d9cec | 2016-10-21 03:02:12 -0700 | [diff] [blame] | 2918 | NULL, |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 2919 | }; |
| 2920 | |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2921 | /** |
| 2922 | * omap3xxx_hwmod_is_hs_ip_block_usable - is a security IP block accessible? |
| 2923 | * @bus: struct device_node * for the top-level OMAP DT data |
| 2924 | * @dev_name: device name used in the DT file |
| 2925 | * |
| 2926 | * Determine whether a "secure" IP block @dev_name is usable by Linux. |
| 2927 | * There doesn't appear to be a 100% reliable way to determine this, |
| 2928 | * so we rely on heuristics. If @bus is null, meaning there's no DT |
| 2929 | * data, then we only assume the IP block is accessible if the OMAP is |
| 2930 | * fused as a 'general-purpose' SoC. If however DT data is present, |
| 2931 | * test to see if the IP block is described in the DT data and set to |
| 2932 | * 'status = "okay"'. If so then we assume the ODM has configured the |
| 2933 | * OMAP firewalls to allow access to the IP block. |
| 2934 | * |
| 2935 | * Return: 0 if device named @dev_name is not likely to be accessible, |
| 2936 | * or 1 if it is likely to be accessible. |
| 2937 | */ |
Guenter Roeck | 10e5778 | 2017-03-04 07:02:10 -0800 | [diff] [blame] | 2938 | static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus, |
| 2939 | const char *dev_name) |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2940 | { |
Guenter Roeck | 10e5778 | 2017-03-04 07:02:10 -0800 | [diff] [blame] | 2941 | struct device_node *node; |
| 2942 | bool available; |
| 2943 | |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2944 | if (!bus) |
Guenter Roeck | 10e5778 | 2017-03-04 07:02:10 -0800 | [diff] [blame] | 2945 | return omap_type() == OMAP2_DEVICE_TYPE_GP; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2946 | |
Guenter Roeck | 10e5778 | 2017-03-04 07:02:10 -0800 | [diff] [blame] | 2947 | node = of_get_child_by_name(bus, dev_name); |
| 2948 | available = of_device_is_available(node); |
| 2949 | of_node_put(node); |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2950 | |
Guenter Roeck | 10e5778 | 2017-03-04 07:02:10 -0800 | [diff] [blame] | 2951 | return available; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2952 | } |
| 2953 | |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 2954 | int __init omap3xxx_hwmod_init(void) |
| 2955 | { |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2956 | int r; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2957 | struct omap_hwmod_ocp_if **h = NULL, **h_gp = NULL, **h_sham = NULL; |
| 2958 | struct omap_hwmod_ocp_if **h_aes = NULL; |
Markus Elfring | d9ecbef | 2017-10-20 16:37:07 +0200 | [diff] [blame] | 2959 | struct device_node *bus; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2960 | unsigned int rev; |
| 2961 | |
Kevin Hilman | 9ebfd28 | 2012-06-18 12:12:23 -0600 | [diff] [blame] | 2962 | omap_hwmod_init(); |
| 2963 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2964 | /* Register hwmod links common to all OMAP3 */ |
| 2965 | r = omap_hwmod_register_links(omap3xxx_hwmod_ocp_ifs); |
Paul Walmsley | ace9021 | 2011-10-06 14:39:28 -0600 | [diff] [blame] | 2966 | if (r < 0) |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2967 | return r; |
| 2968 | |
| 2969 | rev = omap_rev(); |
| 2970 | |
| 2971 | /* |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2972 | * Register hwmod links common to individual OMAP3 families, all |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2973 | * silicon revisions (e.g., 34xx, or AM3505/3517, or 36xx) |
| 2974 | * All possible revisions should be included in this conditional. |
| 2975 | */ |
| 2976 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
| 2977 | rev == OMAP3430_REV_ES2_1 || rev == OMAP3430_REV_ES3_0 || |
| 2978 | rev == OMAP3430_REV_ES3_1 || rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2979 | h = omap34xx_hwmod_ocp_ifs; |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2980 | h_gp = omap34xx_gp_hwmod_ocp_ifs; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2981 | h_sham = omap34xx_sham_hwmod_ocp_ifs; |
| 2982 | h_aes = omap34xx_aes_hwmod_ocp_ifs; |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 2983 | } else if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2984 | h = am35xx_hwmod_ocp_ifs; |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2985 | h_gp = am35xx_gp_hwmod_ocp_ifs; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2986 | h_sham = am35xx_sham_hwmod_ocp_ifs; |
| 2987 | h_aes = am35xx_aes_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2988 | } else if (rev == OMAP3630_REV_ES1_0 || rev == OMAP3630_REV_ES1_1 || |
| 2989 | rev == OMAP3630_REV_ES1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2990 | h = omap36xx_hwmod_ocp_ifs; |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 2991 | h_gp = omap36xx_gp_hwmod_ocp_ifs; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 2992 | h_sham = omap36xx_sham_hwmod_ocp_ifs; |
| 2993 | h_aes = omap36xx_aes_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2994 | } else { |
| 2995 | WARN(1, "OMAP3 hwmod family init: unknown chip type\n"); |
| 2996 | return -EINVAL; |
Peter Senna Tschudin | c09fcc43 | 2012-09-18 18:36:11 +0200 | [diff] [blame] | 2997 | } |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 2998 | |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 2999 | r = omap_hwmod_register_links(h); |
Paul Walmsley | ace9021 | 2011-10-06 14:39:28 -0600 | [diff] [blame] | 3000 | if (r < 0) |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3001 | return r; |
| 3002 | |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 3003 | /* Register GP-only hwmod links. */ |
| 3004 | if (h_gp && omap_type() == OMAP2_DEVICE_TYPE_GP) { |
| 3005 | r = omap_hwmod_register_links(h_gp); |
| 3006 | if (r < 0) |
| 3007 | return r; |
| 3008 | } |
| 3009 | |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 3010 | /* |
| 3011 | * Register crypto hwmod links only if they are not disabled in DT. |
| 3012 | * If DT information is missing, enable them only for GP devices. |
| 3013 | */ |
| 3014 | |
Tony Lindgren | 1aa8f0c | 2017-05-31 15:51:37 -0700 | [diff] [blame] | 3015 | bus = of_find_node_by_name(NULL, "ocp"); |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 3016 | |
| 3017 | if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) { |
| 3018 | r = omap_hwmod_register_links(h_sham); |
Markus Elfring | f33aadd | 2017-10-20 16:30:23 +0200 | [diff] [blame] | 3019 | if (r < 0) |
| 3020 | goto put_node; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 3021 | } |
| 3022 | |
| 3023 | if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) { |
| 3024 | r = omap_hwmod_register_links(h_aes); |
Markus Elfring | f33aadd | 2017-10-20 16:30:23 +0200 | [diff] [blame] | 3025 | if (r < 0) |
| 3026 | goto put_node; |
Pali Rohár | a55a744 | 2015-02-26 14:49:52 +0100 | [diff] [blame] | 3027 | } |
Guenter Roeck | b92675d | 2017-03-04 07:02:11 -0800 | [diff] [blame] | 3028 | of_node_put(bus); |
Mark A. Greer | 26f88e6 | 2013-03-18 10:06:32 -0600 | [diff] [blame] | 3029 | |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3030 | /* |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3031 | * Register hwmod links specific to certain ES levels of a |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3032 | * particular family of silicon (e.g., 34xx ES1.0) |
| 3033 | */ |
| 3034 | h = NULL; |
| 3035 | if (rev == OMAP3430_REV_ES1_0) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3036 | h = omap3430es1_hwmod_ocp_ifs; |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3037 | } else if (rev == OMAP3430_REV_ES2_0 || rev == OMAP3430_REV_ES2_1 || |
| 3038 | rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
| 3039 | rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3040 | h = omap3430es2plus_hwmod_ocp_ifs; |
Peter Senna Tschudin | c09fcc43 | 2012-09-18 18:36:11 +0200 | [diff] [blame] | 3041 | } |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3042 | |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3043 | if (h) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3044 | r = omap_hwmod_register_links(h); |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3045 | if (r < 0) |
| 3046 | return r; |
| 3047 | } |
| 3048 | |
| 3049 | h = NULL; |
| 3050 | if (rev == OMAP3430_REV_ES1_0 || rev == OMAP3430_REV_ES2_0 || |
| 3051 | rev == OMAP3430_REV_ES2_1) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3052 | h = omap3430_pre_es3_hwmod_ocp_ifs; |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3053 | } else if (rev == OMAP3430_REV_ES3_0 || rev == OMAP3430_REV_ES3_1 || |
| 3054 | rev == OMAP3430_REV_ES3_1_2) { |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3055 | h = omap3430_es3plus_hwmod_ocp_ifs; |
Peter Senna Tschudin | c09fcc43 | 2012-09-18 18:36:11 +0200 | [diff] [blame] | 3056 | } |
Paul Walmsley | a52e2ab | 2011-12-15 23:30:44 -0700 | [diff] [blame] | 3057 | |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3058 | if (h) |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3059 | r = omap_hwmod_register_links(h); |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 3060 | if (r < 0) |
| 3061 | return r; |
| 3062 | |
| 3063 | /* |
| 3064 | * DSS code presumes that dss_core hwmod is handled first, |
| 3065 | * _before_ any other DSS related hwmods so register common |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3066 | * DSS hwmod links last to ensure that dss_core is already |
| 3067 | * registered. Otherwise some change things may happen, for |
| 3068 | * ex. if dispc is handled before dss_core and DSS is enabled |
| 3069 | * in bootloader DISPC will be reset with outputs enabled |
| 3070 | * which sometimes leads to unrecoverable L3 error. XXX The |
| 3071 | * long-term fix to this is to ensure hwmods are set up in |
| 3072 | * dependency order in the hwmod core code. |
Ilya Yanok | 1d2f56c | 2011-12-28 00:31:33 +0100 | [diff] [blame] | 3073 | */ |
Paul Walmsley | 0a78c5c | 2012-04-19 04:04:31 -0600 | [diff] [blame] | 3074 | r = omap_hwmod_register_links(omap3xxx_dss_hwmod_ocp_ifs); |
Paul Walmsley | d6504ac | 2011-09-14 17:23:19 -0600 | [diff] [blame] | 3075 | |
| 3076 | return r; |
Markus Elfring | f33aadd | 2017-10-20 16:30:23 +0200 | [diff] [blame] | 3077 | |
| 3078 | put_node: |
| 3079 | of_node_put(bus); |
| 3080 | return r; |
Paul Walmsley | 7359154 | 2010-02-22 22:09:32 -0700 | [diff] [blame] | 3081 | } |