162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2009-2011 Nokia Corporation
662306a36Sopenharmony_ci * Copyright (C) 2012 Texas Instruments, Inc.
762306a36Sopenharmony_ci * Paul Walmsley
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci * XXX handle crossbar/shared link difference for L3?
1062306a36Sopenharmony_ci * XXX these should be marked initdata for multi-OMAP kernels
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include <linux/platform_data/i2c-omap.h>
1462306a36Sopenharmony_ci#include <linux/platform_data/hsmmc-omap.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#include "omap_hwmod.h"
1762306a36Sopenharmony_ci#include "l3_2xxx.h"
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#include "soc.h"
2062306a36Sopenharmony_ci#include "omap_hwmod_common_data.h"
2162306a36Sopenharmony_ci#include "prm-regbits-24xx.h"
2262306a36Sopenharmony_ci#include "cm-regbits-24xx.h"
2362306a36Sopenharmony_ci#include "i2c.h"
2462306a36Sopenharmony_ci#include "wd_timer.h"
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci/*
2762306a36Sopenharmony_ci * OMAP2430 hardware module integration data
2862306a36Sopenharmony_ci *
2962306a36Sopenharmony_ci * All of the data in this section should be autogeneratable from the
3062306a36Sopenharmony_ci * TI hardware database or other technical documentation.  Data that
3162306a36Sopenharmony_ci * is driver-specific or driver-kernel integration-specific belongs
3262306a36Sopenharmony_ci * elsewhere.
3362306a36Sopenharmony_ci */
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci/*
3662306a36Sopenharmony_ci * IP blocks
3762306a36Sopenharmony_ci */
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci/* IVA2 (IVA2) */
4062306a36Sopenharmony_cistatic struct omap_hwmod_rst_info omap2430_iva_resets[] = {
4162306a36Sopenharmony_ci	{ .name = "logic", .rst_shift = 0 },
4262306a36Sopenharmony_ci	{ .name = "mmu", .rst_shift = 1 },
4362306a36Sopenharmony_ci};
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_cistatic struct omap_hwmod omap2430_iva_hwmod = {
4662306a36Sopenharmony_ci	.name		= "iva",
4762306a36Sopenharmony_ci	.class		= &iva_hwmod_class,
4862306a36Sopenharmony_ci	.clkdm_name	= "dsp_clkdm",
4962306a36Sopenharmony_ci	.rst_lines	= omap2430_iva_resets,
5062306a36Sopenharmony_ci	.rst_lines_cnt	= ARRAY_SIZE(omap2430_iva_resets),
5162306a36Sopenharmony_ci	.main_clk	= "dsp_fck",
5262306a36Sopenharmony_ci};
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci/* I2C common */
5562306a36Sopenharmony_cistatic struct omap_hwmod_class_sysconfig i2c_sysc = {
5662306a36Sopenharmony_ci	.rev_offs	= 0x00,
5762306a36Sopenharmony_ci	.sysc_offs	= 0x20,
5862306a36Sopenharmony_ci	.syss_offs	= 0x10,
5962306a36Sopenharmony_ci	.sysc_flags	= (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
6062306a36Sopenharmony_ci			   SYSS_HAS_RESET_STATUS),
6162306a36Sopenharmony_ci	.sysc_fields	= &omap_hwmod_sysc_type1,
6262306a36Sopenharmony_ci};
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_cistatic struct omap_hwmod_class i2c_class = {
6562306a36Sopenharmony_ci	.name		= "i2c",
6662306a36Sopenharmony_ci	.sysc		= &i2c_sysc,
6762306a36Sopenharmony_ci	.reset		= &omap_i2c_reset,
6862306a36Sopenharmony_ci};
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci/* I2C1 */
7162306a36Sopenharmony_cistatic struct omap_hwmod omap2430_i2c1_hwmod = {
7262306a36Sopenharmony_ci	.name		= "i2c1",
7362306a36Sopenharmony_ci	.flags		= HWMOD_16BIT_REG,
7462306a36Sopenharmony_ci	.main_clk	= "i2chs1_fck",
7562306a36Sopenharmony_ci	.prcm		= {
7662306a36Sopenharmony_ci		.omap2 = {
7762306a36Sopenharmony_ci			/*
7862306a36Sopenharmony_ci			 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
7962306a36Sopenharmony_ci			 * I2CHS IP's do not follow the usual pattern.
8062306a36Sopenharmony_ci			 * prcm_reg_id alone cannot be used to program
8162306a36Sopenharmony_ci			 * the iclk and fclk. Needs to be handled using
8262306a36Sopenharmony_ci			 * additional flags when clk handling is moved
8362306a36Sopenharmony_ci			 * to hwmod framework.
8462306a36Sopenharmony_ci			 */
8562306a36Sopenharmony_ci			.module_offs = CORE_MOD,
8662306a36Sopenharmony_ci			.idlest_reg_id = 1,
8762306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
8862306a36Sopenharmony_ci		},
8962306a36Sopenharmony_ci	},
9062306a36Sopenharmony_ci	.class		= &i2c_class,
9162306a36Sopenharmony_ci};
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci/* I2C2 */
9462306a36Sopenharmony_cistatic struct omap_hwmod omap2430_i2c2_hwmod = {
9562306a36Sopenharmony_ci	.name		= "i2c2",
9662306a36Sopenharmony_ci	.flags		= HWMOD_16BIT_REG,
9762306a36Sopenharmony_ci	.main_clk	= "i2chs2_fck",
9862306a36Sopenharmony_ci	.prcm		= {
9962306a36Sopenharmony_ci		.omap2 = {
10062306a36Sopenharmony_ci			.module_offs = CORE_MOD,
10162306a36Sopenharmony_ci			.idlest_reg_id = 1,
10262306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
10362306a36Sopenharmony_ci		},
10462306a36Sopenharmony_ci	},
10562306a36Sopenharmony_ci	.class		= &i2c_class,
10662306a36Sopenharmony_ci};
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci/* gpio5 */
10962306a36Sopenharmony_cistatic struct omap_hwmod omap2430_gpio5_hwmod = {
11062306a36Sopenharmony_ci	.name		= "gpio5",
11162306a36Sopenharmony_ci	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
11262306a36Sopenharmony_ci	.main_clk	= "gpio5_fck",
11362306a36Sopenharmony_ci	.prcm		= {
11462306a36Sopenharmony_ci		.omap2 = {
11562306a36Sopenharmony_ci			.module_offs = CORE_MOD,
11662306a36Sopenharmony_ci			.idlest_reg_id = 2,
11762306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
11862306a36Sopenharmony_ci		},
11962306a36Sopenharmony_ci	},
12062306a36Sopenharmony_ci	.class		= &omap2xxx_gpio_hwmod_class,
12162306a36Sopenharmony_ci};
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci/* mailbox */
12462306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mailbox_hwmod = {
12562306a36Sopenharmony_ci	.name		= "mailbox",
12662306a36Sopenharmony_ci	.class		= &omap2xxx_mailbox_hwmod_class,
12762306a36Sopenharmony_ci	.main_clk	= "mailboxes_ick",
12862306a36Sopenharmony_ci	.prcm		= {
12962306a36Sopenharmony_ci		.omap2 = {
13062306a36Sopenharmony_ci			.module_offs = CORE_MOD,
13162306a36Sopenharmony_ci			.idlest_reg_id = 1,
13262306a36Sopenharmony_ci			.idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
13362306a36Sopenharmony_ci		},
13462306a36Sopenharmony_ci	},
13562306a36Sopenharmony_ci};
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci/* mcspi3 */
13862306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcspi3_hwmod = {
13962306a36Sopenharmony_ci	.name		= "mcspi3",
14062306a36Sopenharmony_ci	.main_clk	= "mcspi3_fck",
14162306a36Sopenharmony_ci	.prcm		= {
14262306a36Sopenharmony_ci		.omap2 = {
14362306a36Sopenharmony_ci			.module_offs = CORE_MOD,
14462306a36Sopenharmony_ci			.idlest_reg_id = 2,
14562306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
14662306a36Sopenharmony_ci		},
14762306a36Sopenharmony_ci	},
14862306a36Sopenharmony_ci	.class		= &omap2xxx_mcspi_class,
14962306a36Sopenharmony_ci};
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci/* usbhsotg */
15262306a36Sopenharmony_cistatic struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
15362306a36Sopenharmony_ci	.rev_offs	= 0x0400,
15462306a36Sopenharmony_ci	.sysc_offs	= 0x0404,
15562306a36Sopenharmony_ci	.syss_offs	= 0x0408,
15662306a36Sopenharmony_ci	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
15762306a36Sopenharmony_ci			  SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
15862306a36Sopenharmony_ci			  SYSC_HAS_AUTOIDLE),
15962306a36Sopenharmony_ci	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
16062306a36Sopenharmony_ci			  MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
16162306a36Sopenharmony_ci	.sysc_fields	= &omap_hwmod_sysc_type1,
16262306a36Sopenharmony_ci};
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_cistatic struct omap_hwmod_class usbotg_class = {
16562306a36Sopenharmony_ci	.name = "usbotg",
16662306a36Sopenharmony_ci	.sysc = &omap2430_usbhsotg_sysc,
16762306a36Sopenharmony_ci};
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ci/* usb_otg_hs */
17062306a36Sopenharmony_cistatic struct omap_hwmod omap2430_usbhsotg_hwmod = {
17162306a36Sopenharmony_ci	.name		= "usb_otg_hs",
17262306a36Sopenharmony_ci	.main_clk	= "usbhs_ick",
17362306a36Sopenharmony_ci	.prcm		= {
17462306a36Sopenharmony_ci		.omap2 = {
17562306a36Sopenharmony_ci			.module_offs = CORE_MOD,
17662306a36Sopenharmony_ci			.idlest_reg_id = 1,
17762306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
17862306a36Sopenharmony_ci		},
17962306a36Sopenharmony_ci	},
18062306a36Sopenharmony_ci	.class		= &usbotg_class,
18162306a36Sopenharmony_ci	/*
18262306a36Sopenharmony_ci	 * Erratum ID: i479  idle_req / idle_ack mechanism potentially
18362306a36Sopenharmony_ci	 * broken when autoidle is enabled
18462306a36Sopenharmony_ci	 * workaround is to disable the autoidle bit at module level.
18562306a36Sopenharmony_ci	 */
18662306a36Sopenharmony_ci	.flags		= HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
18762306a36Sopenharmony_ci				| HWMOD_SWSUP_MSTANDBY,
18862306a36Sopenharmony_ci};
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci/*
19162306a36Sopenharmony_ci * 'mcbsp' class
19262306a36Sopenharmony_ci * multi channel buffered serial port controller
19362306a36Sopenharmony_ci */
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_cistatic struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
19662306a36Sopenharmony_ci	.rev_offs	= 0x007C,
19762306a36Sopenharmony_ci	.sysc_offs	= 0x008C,
19862306a36Sopenharmony_ci	.sysc_flags	= (SYSC_HAS_SOFTRESET),
19962306a36Sopenharmony_ci	.sysc_fields    = &omap_hwmod_sysc_type1,
20062306a36Sopenharmony_ci};
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_cistatic struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
20362306a36Sopenharmony_ci	.name = "mcbsp",
20462306a36Sopenharmony_ci	.sysc = &omap2430_mcbsp_sysc,
20562306a36Sopenharmony_ci};
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_cistatic struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
20862306a36Sopenharmony_ci	{ .role = "pad_fck", .clk = "mcbsp_clks" },
20962306a36Sopenharmony_ci	{ .role = "prcm_fck", .clk = "func_96m_ck" },
21062306a36Sopenharmony_ci};
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ci/* mcbsp1 */
21362306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcbsp1_hwmod = {
21462306a36Sopenharmony_ci	.name		= "mcbsp1",
21562306a36Sopenharmony_ci	.class		= &omap2430_mcbsp_hwmod_class,
21662306a36Sopenharmony_ci	.main_clk	= "mcbsp1_fck",
21762306a36Sopenharmony_ci	.prcm		= {
21862306a36Sopenharmony_ci		.omap2 = {
21962306a36Sopenharmony_ci			.module_offs = CORE_MOD,
22062306a36Sopenharmony_ci			.idlest_reg_id = 1,
22162306a36Sopenharmony_ci			.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
22262306a36Sopenharmony_ci		},
22362306a36Sopenharmony_ci	},
22462306a36Sopenharmony_ci	.opt_clks	= mcbsp_opt_clks,
22562306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
22662306a36Sopenharmony_ci};
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci/* mcbsp2 */
22962306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcbsp2_hwmod = {
23062306a36Sopenharmony_ci	.name		= "mcbsp2",
23162306a36Sopenharmony_ci	.class		= &omap2430_mcbsp_hwmod_class,
23262306a36Sopenharmony_ci	.main_clk	= "mcbsp2_fck",
23362306a36Sopenharmony_ci	.prcm		= {
23462306a36Sopenharmony_ci		.omap2 = {
23562306a36Sopenharmony_ci			.module_offs = CORE_MOD,
23662306a36Sopenharmony_ci			.idlest_reg_id = 1,
23762306a36Sopenharmony_ci			.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
23862306a36Sopenharmony_ci		},
23962306a36Sopenharmony_ci	},
24062306a36Sopenharmony_ci	.opt_clks	= mcbsp_opt_clks,
24162306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
24262306a36Sopenharmony_ci};
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci/* mcbsp3 */
24562306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcbsp3_hwmod = {
24662306a36Sopenharmony_ci	.name		= "mcbsp3",
24762306a36Sopenharmony_ci	.class		= &omap2430_mcbsp_hwmod_class,
24862306a36Sopenharmony_ci	.main_clk	= "mcbsp3_fck",
24962306a36Sopenharmony_ci	.prcm		= {
25062306a36Sopenharmony_ci		.omap2 = {
25162306a36Sopenharmony_ci			.module_offs = CORE_MOD,
25262306a36Sopenharmony_ci			.idlest_reg_id = 2,
25362306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
25462306a36Sopenharmony_ci		},
25562306a36Sopenharmony_ci	},
25662306a36Sopenharmony_ci	.opt_clks	= mcbsp_opt_clks,
25762306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
25862306a36Sopenharmony_ci};
25962306a36Sopenharmony_ci
26062306a36Sopenharmony_ci/* mcbsp4 */
26162306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcbsp4_hwmod = {
26262306a36Sopenharmony_ci	.name		= "mcbsp4",
26362306a36Sopenharmony_ci	.class		= &omap2430_mcbsp_hwmod_class,
26462306a36Sopenharmony_ci	.main_clk	= "mcbsp4_fck",
26562306a36Sopenharmony_ci	.prcm		= {
26662306a36Sopenharmony_ci		.omap2 = {
26762306a36Sopenharmony_ci			.module_offs = CORE_MOD,
26862306a36Sopenharmony_ci			.idlest_reg_id = 2,
26962306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
27062306a36Sopenharmony_ci		},
27162306a36Sopenharmony_ci	},
27262306a36Sopenharmony_ci	.opt_clks	= mcbsp_opt_clks,
27362306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
27462306a36Sopenharmony_ci};
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ci/* mcbsp5 */
27762306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mcbsp5_hwmod = {
27862306a36Sopenharmony_ci	.name		= "mcbsp5",
27962306a36Sopenharmony_ci	.class		= &omap2430_mcbsp_hwmod_class,
28062306a36Sopenharmony_ci	.main_clk	= "mcbsp5_fck",
28162306a36Sopenharmony_ci	.prcm		= {
28262306a36Sopenharmony_ci		.omap2 = {
28362306a36Sopenharmony_ci			.module_offs = CORE_MOD,
28462306a36Sopenharmony_ci			.idlest_reg_id = 2,
28562306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
28662306a36Sopenharmony_ci		},
28762306a36Sopenharmony_ci	},
28862306a36Sopenharmony_ci	.opt_clks	= mcbsp_opt_clks,
28962306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
29062306a36Sopenharmony_ci};
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_ci/* MMC/SD/SDIO common */
29362306a36Sopenharmony_cistatic struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
29462306a36Sopenharmony_ci	.rev_offs	= 0x1fc,
29562306a36Sopenharmony_ci	.sysc_offs	= 0x10,
29662306a36Sopenharmony_ci	.syss_offs	= 0x14,
29762306a36Sopenharmony_ci	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
29862306a36Sopenharmony_ci			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
29962306a36Sopenharmony_ci			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
30062306a36Sopenharmony_ci	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
30162306a36Sopenharmony_ci	.sysc_fields    = &omap_hwmod_sysc_type1,
30262306a36Sopenharmony_ci};
30362306a36Sopenharmony_ci
30462306a36Sopenharmony_cistatic struct omap_hwmod_class omap2430_mmc_class = {
30562306a36Sopenharmony_ci	.name = "mmc",
30662306a36Sopenharmony_ci	.sysc = &omap2430_mmc_sysc,
30762306a36Sopenharmony_ci};
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ci/* MMC/SD/SDIO1 */
31062306a36Sopenharmony_cistatic struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
31162306a36Sopenharmony_ci	{ .role = "dbck", .clk = "mmchsdb1_fck" },
31262306a36Sopenharmony_ci};
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_cistatic struct omap_hsmmc_dev_attr mmc1_dev_attr = {
31562306a36Sopenharmony_ci	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
31662306a36Sopenharmony_ci};
31762306a36Sopenharmony_ci
31862306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mmc1_hwmod = {
31962306a36Sopenharmony_ci	.name		= "mmc1",
32062306a36Sopenharmony_ci	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
32162306a36Sopenharmony_ci	.opt_clks	= omap2430_mmc1_opt_clks,
32262306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(omap2430_mmc1_opt_clks),
32362306a36Sopenharmony_ci	.main_clk	= "mmchs1_fck",
32462306a36Sopenharmony_ci	.prcm		= {
32562306a36Sopenharmony_ci		.omap2 = {
32662306a36Sopenharmony_ci			.module_offs = CORE_MOD,
32762306a36Sopenharmony_ci			.idlest_reg_id = 2,
32862306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
32962306a36Sopenharmony_ci		},
33062306a36Sopenharmony_ci	},
33162306a36Sopenharmony_ci	.dev_attr	= &mmc1_dev_attr,
33262306a36Sopenharmony_ci	.class		= &omap2430_mmc_class,
33362306a36Sopenharmony_ci};
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci/* MMC/SD/SDIO2 */
33662306a36Sopenharmony_cistatic struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
33762306a36Sopenharmony_ci	{ .role = "dbck", .clk = "mmchsdb2_fck" },
33862306a36Sopenharmony_ci};
33962306a36Sopenharmony_ci
34062306a36Sopenharmony_cistatic struct omap_hwmod omap2430_mmc2_hwmod = {
34162306a36Sopenharmony_ci	.name		= "mmc2",
34262306a36Sopenharmony_ci	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
34362306a36Sopenharmony_ci	.opt_clks	= omap2430_mmc2_opt_clks,
34462306a36Sopenharmony_ci	.opt_clks_cnt	= ARRAY_SIZE(omap2430_mmc2_opt_clks),
34562306a36Sopenharmony_ci	.main_clk	= "mmchs2_fck",
34662306a36Sopenharmony_ci	.prcm		= {
34762306a36Sopenharmony_ci		.omap2 = {
34862306a36Sopenharmony_ci			.module_offs = CORE_MOD,
34962306a36Sopenharmony_ci			.idlest_reg_id = 2,
35062306a36Sopenharmony_ci			.idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
35162306a36Sopenharmony_ci		},
35262306a36Sopenharmony_ci	},
35362306a36Sopenharmony_ci	.class		= &omap2430_mmc_class,
35462306a36Sopenharmony_ci};
35562306a36Sopenharmony_ci
35662306a36Sopenharmony_ci/* HDQ1W/1-wire */
35762306a36Sopenharmony_cistatic struct omap_hwmod omap2430_hdq1w_hwmod = {
35862306a36Sopenharmony_ci	.name		= "hdq1w",
35962306a36Sopenharmony_ci	.main_clk	= "hdq_fck",
36062306a36Sopenharmony_ci	.prcm		= {
36162306a36Sopenharmony_ci		.omap2 = {
36262306a36Sopenharmony_ci			.module_offs = CORE_MOD,
36362306a36Sopenharmony_ci			.idlest_reg_id = 1,
36462306a36Sopenharmony_ci			.idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
36562306a36Sopenharmony_ci		},
36662306a36Sopenharmony_ci	},
36762306a36Sopenharmony_ci	.class		= &omap2_hdq1w_class,
36862306a36Sopenharmony_ci};
36962306a36Sopenharmony_ci
37062306a36Sopenharmony_ci/*
37162306a36Sopenharmony_ci * interfaces
37262306a36Sopenharmony_ci */
37362306a36Sopenharmony_ci
37462306a36Sopenharmony_ci/* L3 -> L4_CORE interface */
37562306a36Sopenharmony_ci/* l3_core -> usbhsotg  interface */
37662306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
37762306a36Sopenharmony_ci	.master		= &omap2430_usbhsotg_hwmod,
37862306a36Sopenharmony_ci	.slave		= &omap2xxx_l3_main_hwmod,
37962306a36Sopenharmony_ci	.clk		= "core_l3_ck",
38062306a36Sopenharmony_ci	.user		= OCP_USER_MPU,
38162306a36Sopenharmony_ci};
38262306a36Sopenharmony_ci
38362306a36Sopenharmony_ci/* L4 CORE -> I2C1 interface */
38462306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
38562306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
38662306a36Sopenharmony_ci	.slave		= &omap2430_i2c1_hwmod,
38762306a36Sopenharmony_ci	.clk		= "i2c1_ick",
38862306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
38962306a36Sopenharmony_ci};
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ci/* L4 CORE -> I2C2 interface */
39262306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
39362306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
39462306a36Sopenharmony_ci	.slave		= &omap2430_i2c2_hwmod,
39562306a36Sopenharmony_ci	.clk		= "i2c2_ick",
39662306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
39762306a36Sopenharmony_ci};
39862306a36Sopenharmony_ci
39962306a36Sopenharmony_ci/*  l4_core ->usbhsotg  interface */
40062306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
40162306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
40262306a36Sopenharmony_ci	.slave		= &omap2430_usbhsotg_hwmod,
40362306a36Sopenharmony_ci	.clk		= "usb_l4_ick",
40462306a36Sopenharmony_ci	.user		= OCP_USER_MPU,
40562306a36Sopenharmony_ci};
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ci/* L4 CORE -> MMC1 interface */
40862306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
40962306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
41062306a36Sopenharmony_ci	.slave		= &omap2430_mmc1_hwmod,
41162306a36Sopenharmony_ci	.clk		= "mmchs1_ick",
41262306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
41362306a36Sopenharmony_ci};
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci/* L4 CORE -> MMC2 interface */
41662306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
41762306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
41862306a36Sopenharmony_ci	.slave		= &omap2430_mmc2_hwmod,
41962306a36Sopenharmony_ci	.clk		= "mmchs2_ick",
42062306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
42162306a36Sopenharmony_ci};
42262306a36Sopenharmony_ci
42362306a36Sopenharmony_ci/* l4 core -> mcspi3 interface */
42462306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
42562306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
42662306a36Sopenharmony_ci	.slave		= &omap2430_mcspi3_hwmod,
42762306a36Sopenharmony_ci	.clk		= "mcspi3_ick",
42862306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
42962306a36Sopenharmony_ci};
43062306a36Sopenharmony_ci
43162306a36Sopenharmony_ci/* IVA2 <- L3 interface */
43262306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l3__iva = {
43362306a36Sopenharmony_ci	.master		= &omap2xxx_l3_main_hwmod,
43462306a36Sopenharmony_ci	.slave		= &omap2430_iva_hwmod,
43562306a36Sopenharmony_ci	.clk		= "core_l3_ck",
43662306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
43762306a36Sopenharmony_ci};
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_ci/* l4_wkup -> wd_timer2 */
44062306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
44162306a36Sopenharmony_ci	.master		= &omap2xxx_l4_wkup_hwmod,
44262306a36Sopenharmony_ci	.slave		= &omap2xxx_wd_timer2_hwmod,
44362306a36Sopenharmony_ci	.clk		= "mpu_wdt_ick",
44462306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
44562306a36Sopenharmony_ci};
44662306a36Sopenharmony_ci
44762306a36Sopenharmony_ci/* l4_wkup -> gpio1 */
44862306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
44962306a36Sopenharmony_ci	.master		= &omap2xxx_l4_wkup_hwmod,
45062306a36Sopenharmony_ci	.slave		= &omap2xxx_gpio1_hwmod,
45162306a36Sopenharmony_ci	.clk		= "gpios_ick",
45262306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
45362306a36Sopenharmony_ci};
45462306a36Sopenharmony_ci
45562306a36Sopenharmony_ci/* l4_wkup -> gpio2 */
45662306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
45762306a36Sopenharmony_ci	.master		= &omap2xxx_l4_wkup_hwmod,
45862306a36Sopenharmony_ci	.slave		= &omap2xxx_gpio2_hwmod,
45962306a36Sopenharmony_ci	.clk		= "gpios_ick",
46062306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
46162306a36Sopenharmony_ci};
46262306a36Sopenharmony_ci
46362306a36Sopenharmony_ci/* l4_wkup -> gpio3 */
46462306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
46562306a36Sopenharmony_ci	.master		= &omap2xxx_l4_wkup_hwmod,
46662306a36Sopenharmony_ci	.slave		= &omap2xxx_gpio3_hwmod,
46762306a36Sopenharmony_ci	.clk		= "gpios_ick",
46862306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
46962306a36Sopenharmony_ci};
47062306a36Sopenharmony_ci
47162306a36Sopenharmony_ci/* l4_wkup -> gpio4 */
47262306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
47362306a36Sopenharmony_ci	.master		= &omap2xxx_l4_wkup_hwmod,
47462306a36Sopenharmony_ci	.slave		= &omap2xxx_gpio4_hwmod,
47562306a36Sopenharmony_ci	.clk		= "gpios_ick",
47662306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
47762306a36Sopenharmony_ci};
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_ci/* l4_core -> gpio5 */
48062306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
48162306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
48262306a36Sopenharmony_ci	.slave		= &omap2430_gpio5_hwmod,
48362306a36Sopenharmony_ci	.clk		= "gpio5_ick",
48462306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
48562306a36Sopenharmony_ci};
48662306a36Sopenharmony_ci
48762306a36Sopenharmony_ci/* l4_core -> mailbox */
48862306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
48962306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
49062306a36Sopenharmony_ci	.slave		= &omap2430_mailbox_hwmod,
49162306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
49262306a36Sopenharmony_ci};
49362306a36Sopenharmony_ci
49462306a36Sopenharmony_ci/* l4_core -> mcbsp1 */
49562306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
49662306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
49762306a36Sopenharmony_ci	.slave		= &omap2430_mcbsp1_hwmod,
49862306a36Sopenharmony_ci	.clk		= "mcbsp1_ick",
49962306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
50062306a36Sopenharmony_ci};
50162306a36Sopenharmony_ci
50262306a36Sopenharmony_ci/* l4_core -> mcbsp2 */
50362306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
50462306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
50562306a36Sopenharmony_ci	.slave		= &omap2430_mcbsp2_hwmod,
50662306a36Sopenharmony_ci	.clk		= "mcbsp2_ick",
50762306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
50862306a36Sopenharmony_ci};
50962306a36Sopenharmony_ci
51062306a36Sopenharmony_ci/* l4_core -> mcbsp3 */
51162306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
51262306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
51362306a36Sopenharmony_ci	.slave		= &omap2430_mcbsp3_hwmod,
51462306a36Sopenharmony_ci	.clk		= "mcbsp3_ick",
51562306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
51662306a36Sopenharmony_ci};
51762306a36Sopenharmony_ci
51862306a36Sopenharmony_ci/* l4_core -> mcbsp4 */
51962306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
52062306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
52162306a36Sopenharmony_ci	.slave		= &omap2430_mcbsp4_hwmod,
52262306a36Sopenharmony_ci	.clk		= "mcbsp4_ick",
52362306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
52462306a36Sopenharmony_ci};
52562306a36Sopenharmony_ci
52662306a36Sopenharmony_ci/* l4_core -> mcbsp5 */
52762306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
52862306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
52962306a36Sopenharmony_ci	.slave		= &omap2430_mcbsp5_hwmod,
53062306a36Sopenharmony_ci	.clk		= "mcbsp5_ick",
53162306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
53262306a36Sopenharmony_ci};
53362306a36Sopenharmony_ci
53462306a36Sopenharmony_ci/* l4_core -> hdq1w */
53562306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
53662306a36Sopenharmony_ci	.master		= &omap2xxx_l4_core_hwmod,
53762306a36Sopenharmony_ci	.slave		= &omap2430_hdq1w_hwmod,
53862306a36Sopenharmony_ci	.clk		= "hdq_ick",
53962306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
54062306a36Sopenharmony_ci	.flags		= OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
54162306a36Sopenharmony_ci};
54262306a36Sopenharmony_ci
54362306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
54462306a36Sopenharmony_ci	.master		= &omap2xxx_l3_main_hwmod,
54562306a36Sopenharmony_ci	.slave		= &omap2xxx_gpmc_hwmod,
54662306a36Sopenharmony_ci	.clk		= "core_l3_ck",
54762306a36Sopenharmony_ci	.user		= OCP_USER_MPU | OCP_USER_SDMA,
54862306a36Sopenharmony_ci};
54962306a36Sopenharmony_ci
55062306a36Sopenharmony_cistatic struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
55162306a36Sopenharmony_ci	&omap2xxx_l3_main__l4_core,
55262306a36Sopenharmony_ci	&omap2xxx_mpu__l3_main,
55362306a36Sopenharmony_ci	&omap2xxx_dss__l3,
55462306a36Sopenharmony_ci	&omap2430_usbhsotg__l3,
55562306a36Sopenharmony_ci	&omap2430_l4_core__i2c1,
55662306a36Sopenharmony_ci	&omap2430_l4_core__i2c2,
55762306a36Sopenharmony_ci	&omap2xxx_l4_core__l4_wkup,
55862306a36Sopenharmony_ci	&omap2_l4_core__uart1,
55962306a36Sopenharmony_ci	&omap2_l4_core__uart2,
56062306a36Sopenharmony_ci	&omap2_l4_core__uart3,
56162306a36Sopenharmony_ci	&omap2430_l4_core__usbhsotg,
56262306a36Sopenharmony_ci	&omap2430_l4_core__mmc1,
56362306a36Sopenharmony_ci	&omap2430_l4_core__mmc2,
56462306a36Sopenharmony_ci	&omap2xxx_l4_core__mcspi1,
56562306a36Sopenharmony_ci	&omap2xxx_l4_core__mcspi2,
56662306a36Sopenharmony_ci	&omap2430_l4_core__mcspi3,
56762306a36Sopenharmony_ci	&omap2430_l3__iva,
56862306a36Sopenharmony_ci	&omap2xxx_l4_core__timer3,
56962306a36Sopenharmony_ci	&omap2xxx_l4_core__timer4,
57062306a36Sopenharmony_ci	&omap2xxx_l4_core__timer5,
57162306a36Sopenharmony_ci	&omap2xxx_l4_core__timer6,
57262306a36Sopenharmony_ci	&omap2xxx_l4_core__timer7,
57362306a36Sopenharmony_ci	&omap2xxx_l4_core__timer8,
57462306a36Sopenharmony_ci	&omap2xxx_l4_core__timer9,
57562306a36Sopenharmony_ci	&omap2xxx_l4_core__timer10,
57662306a36Sopenharmony_ci	&omap2xxx_l4_core__timer11,
57762306a36Sopenharmony_ci	&omap2xxx_l4_core__timer12,
57862306a36Sopenharmony_ci	&omap2430_l4_wkup__wd_timer2,
57962306a36Sopenharmony_ci	&omap2xxx_l4_core__dss,
58062306a36Sopenharmony_ci	&omap2xxx_l4_core__dss_dispc,
58162306a36Sopenharmony_ci	&omap2xxx_l4_core__dss_rfbi,
58262306a36Sopenharmony_ci	&omap2xxx_l4_core__dss_venc,
58362306a36Sopenharmony_ci	&omap2430_l4_wkup__gpio1,
58462306a36Sopenharmony_ci	&omap2430_l4_wkup__gpio2,
58562306a36Sopenharmony_ci	&omap2430_l4_wkup__gpio3,
58662306a36Sopenharmony_ci	&omap2430_l4_wkup__gpio4,
58762306a36Sopenharmony_ci	&omap2430_l4_core__gpio5,
58862306a36Sopenharmony_ci	&omap2430_l4_core__mailbox,
58962306a36Sopenharmony_ci	&omap2430_l4_core__mcbsp1,
59062306a36Sopenharmony_ci	&omap2430_l4_core__mcbsp2,
59162306a36Sopenharmony_ci	&omap2430_l4_core__mcbsp3,
59262306a36Sopenharmony_ci	&omap2430_l4_core__mcbsp4,
59362306a36Sopenharmony_ci	&omap2430_l4_core__mcbsp5,
59462306a36Sopenharmony_ci	&omap2430_l4_core__hdq1w,
59562306a36Sopenharmony_ci	&omap2xxx_l4_core__rng,
59662306a36Sopenharmony_ci	&omap2xxx_l4_core__sham,
59762306a36Sopenharmony_ci	&omap2xxx_l4_core__aes,
59862306a36Sopenharmony_ci	&omap2430_l3__gpmc,
59962306a36Sopenharmony_ci	NULL,
60062306a36Sopenharmony_ci};
60162306a36Sopenharmony_ci
60262306a36Sopenharmony_ciint __init omap2430_hwmod_init(void)
60362306a36Sopenharmony_ci{
60462306a36Sopenharmony_ci	omap_hwmod_init();
60562306a36Sopenharmony_ci	return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
60662306a36Sopenharmony_ci}
607