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