blob: 66678d98ad96b117170425ed0df24a2934c6e815 [file] [log] [blame]
Paul Walmsley02bfc032009-09-03 20:14:05 +03001/*
Paul Walmsley73591542010-02-22 22:09:32 -07002 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
Paul Walmsley02bfc032009-09-03 20:14:05 +03003 *
Paul Walmsley73591542010-02-22 22:09:32 -07004 * Copyright (C) 2009-2010 Nokia Corporation
Paul Walmsley02bfc032009-09-03 20:14:05 +03005 * 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 * XXX handle crossbar/shared link difference for L3?
Paul Walmsley73591542010-02-22 22:09:32 -070012 * XXX these should be marked initdata for multi-OMAP kernels
Paul Walmsley02bfc032009-09-03 20:14:05 +030013 */
Tony Lindgrence491cf2009-10-20 09:40:47 -070014#include <plat/omap_hwmod.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030015#include <mach/irqs.h>
Tony Lindgrence491cf2009-10-20 09:40:47 -070016#include <plat/cpu.h>
17#include <plat/dma.h>
Paul Walmsley02bfc032009-09-03 20:14:05 +030018
Paul Walmsley43b40992010-02-22 22:09:34 -070019#include "omap_hwmod_common_data.h"
20
Paul Walmsley02bfc032009-09-03 20:14:05 +030021#include "prm-regbits-24xx.h"
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053022#include "cm-regbits-24xx.h"
Paul Walmsley02bfc032009-09-03 20:14:05 +030023
Paul Walmsley73591542010-02-22 22:09:32 -070024/*
25 * OMAP2420 hardware module integration data
26 *
27 * ALl of the data in this section should be autogeneratable from the
28 * TI hardware database or other technical documentation. Data that
29 * is driver-specific or driver-kernel integration-specific belongs
30 * elsewhere.
31 */
32
Paul Walmsley02bfc032009-09-03 20:14:05 +030033static struct omap_hwmod omap2420_mpu_hwmod;
Paul Walmsley08072ac2010-07-26 16:34:33 -060034static struct omap_hwmod omap2420_iva_hwmod;
Kevin Hilman4a7cf902010-07-26 16:34:32 -060035static struct omap_hwmod omap2420_l3_main_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030036static struct omap_hwmod omap2420_l4_core_hwmod;
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +053037static struct omap_hwmod omap2420_wd_timer2_hwmod;
Paul Walmsley02bfc032009-09-03 20:14:05 +030038
39/* L3 -> L4_CORE interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060040static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
41 .master = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030042 .slave = &omap2420_l4_core_hwmod,
43 .user = OCP_USER_MPU | OCP_USER_SDMA,
44};
45
46/* MPU -> L3 interface */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060047static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
Paul Walmsley02bfc032009-09-03 20:14:05 +030048 .master = &omap2420_mpu_hwmod,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060049 .slave = &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +030050 .user = OCP_USER_MPU,
51};
52
53/* Slave interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060054static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
55 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +030056};
57
58/* Master interfaces on the L3 interconnect */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060059static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
60 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030061};
62
63/* L3 */
Kevin Hilman4a7cf902010-07-26 16:34:32 -060064static struct omap_hwmod omap2420_l3_main_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060065 .name = "l3_main",
Paul Walmsley43b40992010-02-22 22:09:34 -070066 .class = &l3_hwmod_class,
Kevin Hilman4a7cf902010-07-26 16:34:32 -060067 .masters = omap2420_l3_main_masters,
68 .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
69 .slaves = omap2420_l3_main_slaves,
70 .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -060071 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
72 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +030073};
74
75static struct omap_hwmod omap2420_l4_wkup_hwmod;
76
77/* L4_CORE -> L4_WKUP interface */
78static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
79 .master = &omap2420_l4_core_hwmod,
80 .slave = &omap2420_l4_wkup_hwmod,
81 .user = OCP_USER_MPU | OCP_USER_SDMA,
82};
83
84/* Slave interfaces on the L4_CORE interconnect */
85static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -060086 &omap2420_l3_main__l4_core,
Paul Walmsley02bfc032009-09-03 20:14:05 +030087};
88
89/* Master interfaces on the L4_CORE interconnect */
90static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
91 &omap2420_l4_core__l4_wkup,
92};
93
94/* L4 CORE */
95static struct omap_hwmod omap2420_l4_core_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -060096 .name = "l4_core",
Paul Walmsley43b40992010-02-22 22:09:34 -070097 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +030098 .masters = omap2420_l4_core_masters,
99 .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
100 .slaves = omap2420_l4_core_slaves,
101 .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
103 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300104};
105
106/* Slave interfaces on the L4_WKUP interconnect */
107static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
108 &omap2420_l4_core__l4_wkup,
109};
110
111/* Master interfaces on the L4_WKUP interconnect */
112static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
113};
114
115/* L4 WKUP */
116static struct omap_hwmod omap2420_l4_wkup_hwmod = {
Benoit Coussonfa983472010-07-26 16:34:29 -0600117 .name = "l4_wkup",
Paul Walmsley43b40992010-02-22 22:09:34 -0700118 .class = &l4_hwmod_class,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300119 .masters = omap2420_l4_wkup_masters,
120 .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
121 .slaves = omap2420_l4_wkup_slaves,
122 .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
Kevin Hilman2eb18752010-07-26 16:34:28 -0600123 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
124 .flags = HWMOD_NO_IDLEST,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300125};
126
127/* Master interfaces on the MPU device */
128static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600129 &omap2420_mpu__l3_main,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300130};
131
132/* MPU */
133static struct omap_hwmod omap2420_mpu_hwmod = {
Benoit Cousson5c2c0292010-05-20 12:31:10 -0600134 .name = "mpu",
Paul Walmsley43b40992010-02-22 22:09:34 -0700135 .class = &mpu_hwmod_class,
Paul Walmsley50ebdac2010-02-22 22:09:31 -0700136 .main_clk = "mpu_ck",
Paul Walmsley02bfc032009-09-03 20:14:05 +0300137 .masters = omap2420_mpu_masters,
138 .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
139 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
140};
141
Paul Walmsley08072ac2010-07-26 16:34:33 -0600142/*
143 * IVA1 interface data
144 */
145
146/* IVA <- L3 interface */
147static struct omap_hwmod_ocp_if omap2420_l3__iva = {
148 .master = &omap2420_l3_main_hwmod,
149 .slave = &omap2420_iva_hwmod,
150 .clk = "iva1_ifck",
151 .user = OCP_USER_MPU | OCP_USER_SDMA,
152};
153
154static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
155 &omap2420_l3__iva,
156};
157
158/*
159 * IVA2 (IVA2)
160 */
161
162static struct omap_hwmod omap2420_iva_hwmod = {
163 .name = "iva",
164 .class = &iva_hwmod_class,
165 .masters = omap2420_iva_masters,
166 .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
167 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
168};
169
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530170/* l4_wkup -> wd_timer2 */
171static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
172 {
173 .pa_start = 0x48022000,
174 .pa_end = 0x4802207f,
175 .flags = ADDR_TYPE_RT
176 },
177};
178
179static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
180 .master = &omap2420_l4_wkup_hwmod,
181 .slave = &omap2420_wd_timer2_hwmod,
182 .clk = "mpu_wdt_ick",
183 .addr = omap2420_wd_timer2_addrs,
184 .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs),
185 .user = OCP_USER_MPU | OCP_USER_SDMA,
186};
187
188/*
189 * 'wd_timer' class
190 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
191 * overflow condition
192 */
193
194static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
195 .rev_offs = 0x0000,
196 .sysc_offs = 0x0010,
197 .syss_offs = 0x0014,
198 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
199 SYSC_HAS_AUTOIDLE),
200 .sysc_fields = &omap_hwmod_sysc_type1,
201};
202
203static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
204 .name = "wd_timer",
205 .sysc = &omap2420_wd_timer_sysc,
206};
207
208/* wd_timer2 */
209static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
210 &omap2420_l4_wkup__wd_timer2,
211};
212
213static struct omap_hwmod omap2420_wd_timer2_hwmod = {
214 .name = "wd_timer2",
215 .class = &omap2420_wd_timer_hwmod_class,
216 .main_clk = "mpu_wdt_fck",
217 .prcm = {
218 .omap2 = {
219 .prcm_reg_id = 1,
220 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
221 .module_offs = WKUP_MOD,
222 .idlest_reg_id = 1,
223 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
224 },
225 },
226 .slaves = omap2420_wd_timer2_slaves,
227 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
228 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
229};
230
Paul Walmsley02bfc032009-09-03 20:14:05 +0300231static __initdata struct omap_hwmod *omap2420_hwmods[] = {
Kevin Hilman4a7cf902010-07-26 16:34:32 -0600232 &omap2420_l3_main_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300233 &omap2420_l4_core_hwmod,
234 &omap2420_l4_wkup_hwmod,
235 &omap2420_mpu_hwmod,
Paul Walmsley08072ac2010-07-26 16:34:33 -0600236 &omap2420_iva_hwmod,
Varadarajan, Charulathaa714b9c2010-09-23 20:02:39 +0530237 &omap2420_wd_timer2_hwmod,
Paul Walmsley02bfc032009-09-03 20:14:05 +0300238 NULL,
239};
240
Paul Walmsley73591542010-02-22 22:09:32 -0700241int __init omap2420_hwmod_init(void)
242{
243 return omap_hwmod_init(omap2420_hwmods);
244}
Paul Walmsley02bfc032009-09-03 20:14:05 +0300245
246