1 // SPDX-License-Identifier: GPL-2.0-only
3 * Hardware modules present on the OMAP54xx chips
5 * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com
10 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated
12 * with the public linux-omap@vger.kernel.org mailing list and the
13 * authors above to ensure that the autogeneration scripts are kept
14 * up-to-date with the file contents.
18 #include <linux/power/smartreflex.h>
20 #include "omap_hwmod.h"
21 #include "omap_hwmod_common_data.h"
26 /* Base offset for all OMAP5 interrupts external to MPUSS */
27 #define OMAP54XX_IRQ_GIC_START 32
35 * instance(s): l3_instr, l3_main_1, l3_main_2, l3_main_3
37 static struct omap_hwmod_class omap54xx_l3_hwmod_class = {
42 static struct omap_hwmod omap54xx_l3_instr_hwmod = {
44 .class = &omap54xx_l3_hwmod_class,
45 .clkdm_name = "l3instr_clkdm",
48 .clkctrl_offs = OMAP54XX_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
49 .context_offs = OMAP54XX_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
50 .modulemode = MODULEMODE_HWCTRL,
56 static struct omap_hwmod omap54xx_l3_main_1_hwmod = {
58 .class = &omap54xx_l3_hwmod_class,
59 .clkdm_name = "l3main1_clkdm",
62 .clkctrl_offs = OMAP54XX_CM_L3MAIN1_L3_MAIN_1_CLKCTRL_OFFSET,
63 .context_offs = OMAP54XX_RM_L3MAIN1_L3_MAIN_1_CONTEXT_OFFSET,
69 static struct omap_hwmod omap54xx_l3_main_2_hwmod = {
71 .class = &omap54xx_l3_hwmod_class,
72 .clkdm_name = "l3main2_clkdm",
75 .clkctrl_offs = OMAP54XX_CM_L3MAIN2_L3_MAIN_2_CLKCTRL_OFFSET,
76 .context_offs = OMAP54XX_RM_L3MAIN2_L3_MAIN_2_CONTEXT_OFFSET,
82 static struct omap_hwmod omap54xx_l3_main_3_hwmod = {
84 .class = &omap54xx_l3_hwmod_class,
85 .clkdm_name = "l3instr_clkdm",
88 .clkctrl_offs = OMAP54XX_CM_L3INSTR_L3_MAIN_3_CLKCTRL_OFFSET,
89 .context_offs = OMAP54XX_RM_L3INSTR_L3_MAIN_3_CONTEXT_OFFSET,
90 .modulemode = MODULEMODE_HWCTRL,
97 * instance(s): l4_abe, l4_cfg, l4_per, l4_wkup
99 static struct omap_hwmod_class omap54xx_l4_hwmod_class = {
104 static struct omap_hwmod omap54xx_l4_cfg_hwmod = {
106 .class = &omap54xx_l4_hwmod_class,
107 .clkdm_name = "l4cfg_clkdm",
110 .clkctrl_offs = OMAP54XX_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
111 .context_offs = OMAP54XX_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
117 static struct omap_hwmod omap54xx_l4_per_hwmod = {
119 .class = &omap54xx_l4_hwmod_class,
120 .clkdm_name = "l4per_clkdm",
123 .clkctrl_offs = OMAP54XX_CM_L4PER_L4_PER_CLKCTRL_OFFSET,
124 .context_offs = OMAP54XX_RM_L4PER_L4_PER_CONTEXT_OFFSET,
130 static struct omap_hwmod omap54xx_l4_wkup_hwmod = {
132 .class = &omap54xx_l4_hwmod_class,
133 .clkdm_name = "wkupaon_clkdm",
136 .clkctrl_offs = OMAP54XX_CM_WKUPAON_L4_WKUP_CLKCTRL_OFFSET,
137 .context_offs = OMAP54XX_RM_WKUPAON_L4_WKUP_CONTEXT_OFFSET,
144 * sata: serial ata interface gen2 compliant ( 1 rx/ 1 tx)
147 static struct omap_hwmod_class_sysconfig omap54xx_sata_sysc = {
150 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
151 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
152 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
153 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
154 .sysc_fields = &omap_hwmod_sysc_type2,
157 static struct omap_hwmod_class omap54xx_sata_hwmod_class = {
159 .sysc = &omap54xx_sata_sysc,
163 static struct omap_hwmod omap54xx_sata_hwmod = {
165 .class = &omap54xx_sata_hwmod_class,
166 .clkdm_name = "l3init_clkdm",
167 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
168 .main_clk = "func_48m_fclk",
172 .clkctrl_offs = OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
173 .context_offs = OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
174 .modulemode = MODULEMODE_SWCTRL,
180 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__sata = {
181 .master = &omap54xx_l4_cfg_hwmod,
182 .slave = &omap54xx_sata_hwmod,
183 .clk = "l3_iclk_div",
184 .user = OCP_USER_MPU | OCP_USER_SDMA,
191 /* l3_main_3 -> l3_instr */
192 static struct omap_hwmod_ocp_if omap54xx_l3_main_3__l3_instr = {
193 .master = &omap54xx_l3_main_3_hwmod,
194 .slave = &omap54xx_l3_instr_hwmod,
195 .clk = "l3_iclk_div",
196 .user = OCP_USER_MPU | OCP_USER_SDMA,
199 /* l3_main_2 -> l3_main_1 */
200 static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l3_main_1 = {
201 .master = &omap54xx_l3_main_2_hwmod,
202 .slave = &omap54xx_l3_main_1_hwmod,
203 .clk = "l3_iclk_div",
204 .user = OCP_USER_MPU | OCP_USER_SDMA,
207 /* l4_cfg -> l3_main_1 */
208 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_1 = {
209 .master = &omap54xx_l4_cfg_hwmod,
210 .slave = &omap54xx_l3_main_1_hwmod,
211 .clk = "l3_iclk_div",
212 .user = OCP_USER_MPU | OCP_USER_SDMA,
215 /* l3_main_1 -> l3_main_2 */
216 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l3_main_2 = {
217 .master = &omap54xx_l3_main_1_hwmod,
218 .slave = &omap54xx_l3_main_2_hwmod,
219 .clk = "l3_iclk_div",
220 .user = OCP_USER_MPU,
223 /* l4_cfg -> l3_main_2 */
224 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_2 = {
225 .master = &omap54xx_l4_cfg_hwmod,
226 .slave = &omap54xx_l3_main_2_hwmod,
227 .clk = "l3_iclk_div",
228 .user = OCP_USER_MPU | OCP_USER_SDMA,
231 /* l3_main_1 -> l3_main_3 */
232 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l3_main_3 = {
233 .master = &omap54xx_l3_main_1_hwmod,
234 .slave = &omap54xx_l3_main_3_hwmod,
235 .clk = "l3_iclk_div",
236 .user = OCP_USER_MPU,
239 /* l3_main_2 -> l3_main_3 */
240 static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l3_main_3 = {
241 .master = &omap54xx_l3_main_2_hwmod,
242 .slave = &omap54xx_l3_main_3_hwmod,
243 .clk = "l3_iclk_div",
244 .user = OCP_USER_MPU | OCP_USER_SDMA,
247 /* l4_cfg -> l3_main_3 */
248 static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_3 = {
249 .master = &omap54xx_l4_cfg_hwmod,
250 .slave = &omap54xx_l3_main_3_hwmod,
251 .clk = "l3_iclk_div",
252 .user = OCP_USER_MPU | OCP_USER_SDMA,
255 /* l3_main_1 -> l4_cfg */
256 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_cfg = {
257 .master = &omap54xx_l3_main_1_hwmod,
258 .slave = &omap54xx_l4_cfg_hwmod,
259 .clk = "l4_root_clk_div",
260 .user = OCP_USER_MPU | OCP_USER_SDMA,
263 /* l3_main_2 -> l4_per */
264 static struct omap_hwmod_ocp_if omap54xx_l3_main_2__l4_per = {
265 .master = &omap54xx_l3_main_2_hwmod,
266 .slave = &omap54xx_l4_per_hwmod,
267 .clk = "l4_root_clk_div",
268 .user = OCP_USER_MPU | OCP_USER_SDMA,
271 /* l3_main_1 -> l4_wkup */
272 static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_wkup = {
273 .master = &omap54xx_l3_main_1_hwmod,
274 .slave = &omap54xx_l4_wkup_hwmod,
275 .clk = "wkupaon_iclk_mux",
276 .user = OCP_USER_MPU | OCP_USER_SDMA,
279 static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
280 &omap54xx_l3_main_3__l3_instr,
281 &omap54xx_l3_main_2__l3_main_1,
282 &omap54xx_l4_cfg__l3_main_1,
283 &omap54xx_l3_main_1__l3_main_2,
284 &omap54xx_l4_cfg__l3_main_2,
285 &omap54xx_l3_main_1__l3_main_3,
286 &omap54xx_l3_main_2__l3_main_3,
287 &omap54xx_l4_cfg__l3_main_3,
288 &omap54xx_l3_main_1__l4_cfg,
289 &omap54xx_l3_main_2__l4_per,
290 &omap54xx_l3_main_1__l4_wkup,
291 &omap54xx_l4_cfg__sata,
295 int __init omap54xx_hwmod_init(void)
298 return omap_hwmod_register_links(omap54xx_hwmod_ocp_ifs);