2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
4 * Copyright (C) 2009-2010 Nokia Corporation
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.
11 * The data in this file should be completely autogeneratable from
12 * the TI hardware database or other technical documentation.
14 * XXX these should be marked initdata for multi-OMAP kernels
16 #include <plat/omap_hwmod.h>
17 #include <mach/irqs.h>
20 #include <plat/serial.h>
22 #include "omap_hwmod_common_data.h"
24 #include "prm-regbits-34xx.h"
27 * OMAP3xxx hardware module integration data
29 * ALl of the data in this section should be autogeneratable from the
30 * TI hardware database or other technical documentation. Data that
31 * is driver-specific or driver-kernel integration-specific belongs
35 static struct omap_hwmod omap3xxx_mpu_hwmod;
36 static struct omap_hwmod omap3xxx_iva_hwmod;
37 static struct omap_hwmod omap3xxx_l3_main_hwmod;
38 static struct omap_hwmod omap3xxx_l4_core_hwmod;
39 static struct omap_hwmod omap3xxx_l4_per_hwmod;
41 /* L3 -> L4_CORE interface */
42 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
43 .master = &omap3xxx_l3_main_hwmod,
44 .slave = &omap3xxx_l4_core_hwmod,
45 .user = OCP_USER_MPU | OCP_USER_SDMA,
48 /* L3 -> L4_PER interface */
49 static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
50 .master = &omap3xxx_l3_main_hwmod,
51 .slave = &omap3xxx_l4_per_hwmod,
52 .user = OCP_USER_MPU | OCP_USER_SDMA,
55 /* MPU -> L3 interface */
56 static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
57 .master = &omap3xxx_mpu_hwmod,
58 .slave = &omap3xxx_l3_main_hwmod,
62 /* Slave interfaces on the L3 interconnect */
63 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
64 &omap3xxx_mpu__l3_main,
67 /* Master interfaces on the L3 interconnect */
68 static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
69 &omap3xxx_l3_main__l4_core,
70 &omap3xxx_l3_main__l4_per,
74 static struct omap_hwmod omap3xxx_l3_main_hwmod = {
76 .class = &l3_hwmod_class,
77 .masters = omap3xxx_l3_main_masters,
78 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
79 .slaves = omap3xxx_l3_main_slaves,
80 .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
81 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
82 .flags = HWMOD_NO_IDLEST,
85 static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
86 static struct omap_hwmod omap3xxx_uart1_hwmod;
87 static struct omap_hwmod omap3xxx_uart2_hwmod;
88 static struct omap_hwmod omap3xxx_uart3_hwmod;
89 static struct omap_hwmod omap3xxx_uart4_hwmod;
91 /* L4_CORE -> L4_WKUP interface */
92 static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
93 .master = &omap3xxx_l4_core_hwmod,
94 .slave = &omap3xxx_l4_wkup_hwmod,
95 .user = OCP_USER_MPU | OCP_USER_SDMA,
98 /* L4 CORE -> UART1 interface */
99 static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
101 .pa_start = OMAP3_UART1_BASE,
102 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
103 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
107 static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
108 .master = &omap3xxx_l4_core_hwmod,
109 .slave = &omap3xxx_uart1_hwmod,
111 .addr = omap3xxx_uart1_addr_space,
112 .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
113 .user = OCP_USER_MPU | OCP_USER_SDMA,
116 /* L4 CORE -> UART2 interface */
117 static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
119 .pa_start = OMAP3_UART2_BASE,
120 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
121 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
125 static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
126 .master = &omap3xxx_l4_core_hwmod,
127 .slave = &omap3xxx_uart2_hwmod,
129 .addr = omap3xxx_uart2_addr_space,
130 .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
131 .user = OCP_USER_MPU | OCP_USER_SDMA,
134 /* L4 PER -> UART3 interface */
135 static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
137 .pa_start = OMAP3_UART3_BASE,
138 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
139 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
143 static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
144 .master = &omap3xxx_l4_per_hwmod,
145 .slave = &omap3xxx_uart3_hwmod,
147 .addr = omap3xxx_uart3_addr_space,
148 .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
149 .user = OCP_USER_MPU | OCP_USER_SDMA,
152 /* L4 PER -> UART4 interface */
153 static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
155 .pa_start = OMAP3_UART4_BASE,
156 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
157 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
161 static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
162 .master = &omap3xxx_l4_per_hwmod,
163 .slave = &omap3xxx_uart4_hwmod,
165 .addr = omap3xxx_uart4_addr_space,
166 .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
167 .user = OCP_USER_MPU | OCP_USER_SDMA,
170 /* Slave interfaces on the L4_CORE interconnect */
171 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
172 &omap3xxx_l3_main__l4_core,
175 /* Master interfaces on the L4_CORE interconnect */
176 static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
177 &omap3xxx_l4_core__l4_wkup,
178 &omap3_l4_core__uart1,
179 &omap3_l4_core__uart2,
183 static struct omap_hwmod omap3xxx_l4_core_hwmod = {
185 .class = &l4_hwmod_class,
186 .masters = omap3xxx_l4_core_masters,
187 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
188 .slaves = omap3xxx_l4_core_slaves,
189 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
190 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
191 .flags = HWMOD_NO_IDLEST,
194 /* Slave interfaces on the L4_PER interconnect */
195 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
196 &omap3xxx_l3_main__l4_per,
199 /* Master interfaces on the L4_PER interconnect */
200 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
201 &omap3_l4_per__uart3,
202 &omap3_l4_per__uart4,
206 static struct omap_hwmod omap3xxx_l4_per_hwmod = {
208 .class = &l4_hwmod_class,
209 .masters = omap3xxx_l4_per_masters,
210 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
211 .slaves = omap3xxx_l4_per_slaves,
212 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
213 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
214 .flags = HWMOD_NO_IDLEST,
217 /* Slave interfaces on the L4_WKUP interconnect */
218 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
219 &omap3xxx_l4_core__l4_wkup,
222 /* Master interfaces on the L4_WKUP interconnect */
223 static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
227 static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
229 .class = &l4_hwmod_class,
230 .masters = omap3xxx_l4_wkup_masters,
231 .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
232 .slaves = omap3xxx_l4_wkup_slaves,
233 .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
234 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
235 .flags = HWMOD_NO_IDLEST,
238 /* Master interfaces on the MPU device */
239 static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
240 &omap3xxx_mpu__l3_main,
244 static struct omap_hwmod omap3xxx_mpu_hwmod = {
246 .class = &mpu_hwmod_class,
247 .main_clk = "arm_fck",
248 .masters = omap3xxx_mpu_masters,
249 .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
250 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
254 * IVA2_2 interface data
257 /* IVA2 <- L3 interface */
258 static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
259 .master = &omap3xxx_l3_main_hwmod,
260 .slave = &omap3xxx_iva_hwmod,
262 .user = OCP_USER_MPU | OCP_USER_SDMA,
265 static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
273 static struct omap_hwmod omap3xxx_iva_hwmod = {
275 .class = &iva_hwmod_class,
276 .masters = omap3xxx_iva_masters,
277 .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
278 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
283 static struct omap_hwmod_class_sysconfig uart_sysc = {
287 .sysc_flags = (SYSC_HAS_SIDLEMODE |
288 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
290 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
291 .sysc_fields = &omap_hwmod_sysc_type1,
294 static struct omap_hwmod_class uart_class = {
301 static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
302 { .irq = INT_24XX_UART1_IRQ, },
305 static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
306 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
307 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
310 static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
311 &omap3_l4_core__uart1,
314 static struct omap_hwmod omap3xxx_uart1_hwmod = {
316 .mpu_irqs = uart1_mpu_irqs,
317 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
318 .sdma_reqs = uart1_sdma_reqs,
319 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
320 .main_clk = "uart1_fck",
323 .module_offs = CORE_MOD,
325 .module_bit = OMAP3430_EN_UART1_SHIFT,
327 .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
330 .slaves = omap3xxx_uart1_slaves,
331 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
332 .class = &uart_class,
333 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
338 static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
339 { .irq = INT_24XX_UART2_IRQ, },
342 static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
343 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
344 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
347 static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
348 &omap3_l4_core__uart2,
351 static struct omap_hwmod omap3xxx_uart2_hwmod = {
353 .mpu_irqs = uart2_mpu_irqs,
354 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
355 .sdma_reqs = uart2_sdma_reqs,
356 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
357 .main_clk = "uart2_fck",
360 .module_offs = CORE_MOD,
362 .module_bit = OMAP3430_EN_UART2_SHIFT,
364 .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
367 .slaves = omap3xxx_uart2_slaves,
368 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
369 .class = &uart_class,
370 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
375 static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
376 { .irq = INT_24XX_UART3_IRQ, },
379 static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
380 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
381 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
384 static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
385 &omap3_l4_per__uart3,
388 static struct omap_hwmod omap3xxx_uart3_hwmod = {
390 .mpu_irqs = uart3_mpu_irqs,
391 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
392 .sdma_reqs = uart3_sdma_reqs,
393 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
394 .main_clk = "uart3_fck",
397 .module_offs = OMAP3430_PER_MOD,
399 .module_bit = OMAP3430_EN_UART3_SHIFT,
401 .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
404 .slaves = omap3xxx_uart3_slaves,
405 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
406 .class = &uart_class,
407 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
412 static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
413 { .irq = INT_36XX_UART4_IRQ, },
416 static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
417 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
418 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
421 static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
422 &omap3_l4_per__uart4,
425 static struct omap_hwmod omap3xxx_uart4_hwmod = {
427 .mpu_irqs = uart4_mpu_irqs,
428 .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
429 .sdma_reqs = uart4_sdma_reqs,
430 .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
431 .main_clk = "uart4_fck",
434 .module_offs = OMAP3430_PER_MOD,
436 .module_bit = OMAP3630_EN_UART4_SHIFT,
438 .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
441 .slaves = omap3xxx_uart4_slaves,
442 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
443 .class = &uart_class,
444 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
447 static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
448 &omap3xxx_l3_main_hwmod,
449 &omap3xxx_l4_core_hwmod,
450 &omap3xxx_l4_per_hwmod,
451 &omap3xxx_l4_wkup_hwmod,
454 &omap3xxx_uart1_hwmod,
455 &omap3xxx_uart2_hwmod,
456 &omap3xxx_uart3_hwmod,
457 &omap3xxx_uart4_hwmod,
461 int __init omap3xxx_hwmod_init(void)
463 return omap_hwmod_init(omap3xxx_hwmods);