1d2912cb1SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
27359154eSPaul Walmsley /*
37359154eSPaul Walmsley  * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
47359154eSPaul Walmsley  *
578183f3fSPaul Walmsley  * Copyright (C) 2009-2011 Nokia Corporation
60a78c5c5SPaul Walmsley  * Copyright (C) 2012 Texas Instruments, Inc.
77359154eSPaul Walmsley  * Paul Walmsley
87359154eSPaul Walmsley  *
97359154eSPaul Walmsley  * XXX handle crossbar/shared link difference for L3?
107359154eSPaul Walmsley  * XXX these should be marked initdata for multi-OMAP kernels
117359154eSPaul Walmsley  */
123a8761c0STony Lindgren 
1379fc540fSWolfram Sang #include <linux/platform_data/i2c-omap.h>
1455143438SAndreas Fenkart #include <linux/platform_data/hsmmc-omap.h>
152a296c8fSTony Lindgren 
162a296c8fSTony Lindgren #include "omap_hwmod.h"
171e0f51a9STony Lindgren #include "l3_2xxx.h"
187359154eSPaul Walmsley 
19dbc04161STony Lindgren #include "soc.h"
2043b40992SPaul Walmsley #include "omap_hwmod_common_data.h"
217359154eSPaul Walmsley #include "prm-regbits-24xx.h"
22165e2161SVaradarajan, Charulatha #include "cm-regbits-24xx.h"
233a8761c0STony Lindgren #include "i2c.h"
24ff2516fbSPaul Walmsley #include "wd_timer.h"
257359154eSPaul Walmsley 
267359154eSPaul Walmsley /*
277359154eSPaul Walmsley  * OMAP2430 hardware module integration data
287359154eSPaul Walmsley  *
29844a3b63SPaul Walmsley  * All of the data in this section should be autogeneratable from the
307359154eSPaul Walmsley  * TI hardware database or other technical documentation.  Data that
317359154eSPaul Walmsley  * is driver-specific or driver-kernel integration-specific belongs
327359154eSPaul Walmsley  * elsewhere.
337359154eSPaul Walmsley  */
347359154eSPaul Walmsley 
35844a3b63SPaul Walmsley /*
36844a3b63SPaul Walmsley  * IP blocks
37844a3b63SPaul Walmsley  */
38de56dbb6SSenthilvadivu Guruswamy 
39844a3b63SPaul Walmsley /* IVA2 (IVA2) */
403af35fbcSPaul Walmsley static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
413af35fbcSPaul Walmsley 	{ .name = "logic", .rst_shift = 0 },
423af35fbcSPaul Walmsley 	{ .name = "mmu", .rst_shift = 1 },
433af35fbcSPaul Walmsley };
443af35fbcSPaul Walmsley 
4508072acfSPaul Walmsley static struct omap_hwmod omap2430_iva_hwmod = {
4608072acfSPaul Walmsley 	.name		= "iva",
4708072acfSPaul Walmsley 	.class		= &iva_hwmod_class,
483af35fbcSPaul Walmsley 	.clkdm_name	= "dsp_clkdm",
493af35fbcSPaul Walmsley 	.rst_lines	= omap2430_iva_resets,
503af35fbcSPaul Walmsley 	.rst_lines_cnt	= ARRAY_SIZE(omap2430_iva_resets),
513af35fbcSPaul Walmsley 	.main_clk	= "dsp_fck",
5208072acfSPaul Walmsley };
5308072acfSPaul Walmsley 
542004290fSPaul Walmsley /* I2C common */
552004290fSPaul Walmsley static struct omap_hwmod_class_sysconfig i2c_sysc = {
562004290fSPaul Walmsley 	.rev_offs	= 0x00,
572004290fSPaul Walmsley 	.sysc_offs	= 0x20,
582004290fSPaul Walmsley 	.syss_offs	= 0x10,
59d73d65faSAvinash.H.M 	.sysc_flags	= (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
60d73d65faSAvinash.H.M 			   SYSS_HAS_RESET_STATUS),
612004290fSPaul Walmsley 	.sysc_fields	= &omap_hwmod_sysc_type1,
622004290fSPaul Walmsley };
632004290fSPaul Walmsley 
642004290fSPaul Walmsley static struct omap_hwmod_class i2c_class = {
652004290fSPaul Walmsley 	.name		= "i2c",
662004290fSPaul Walmsley 	.sysc		= &i2c_sysc,
676d3c55fdSAvinash.H.M 	.reset		= &omap_i2c_reset,
682004290fSPaul Walmsley };
692004290fSPaul Walmsley 
7050ebb777SBenoit Cousson /* I2C1 */
712004290fSPaul Walmsley static struct omap_hwmod omap2430_i2c1_hwmod = {
722004290fSPaul Walmsley 	.name		= "i2c1",
733e600522SAndy Green 	.flags		= HWMOD_16BIT_REG,
742004290fSPaul Walmsley 	.main_clk	= "i2chs1_fck",
752004290fSPaul Walmsley 	.prcm		= {
762004290fSPaul Walmsley 		.omap2 = {
772004290fSPaul Walmsley 			/*
782004290fSPaul Walmsley 			 * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
792004290fSPaul Walmsley 			 * I2CHS IP's do not follow the usual pattern.
802004290fSPaul Walmsley 			 * prcm_reg_id alone cannot be used to program
812004290fSPaul Walmsley 			 * the iclk and fclk. Needs to be handled using
8225985edcSLucas De Marchi 			 * additional flags when clk handling is moved
832004290fSPaul Walmsley 			 * to hwmod framework.
842004290fSPaul Walmsley 			 */
852004290fSPaul Walmsley 			.module_offs = CORE_MOD,
862004290fSPaul Walmsley 			.idlest_reg_id = 1,
872004290fSPaul Walmsley 			.idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
882004290fSPaul Walmsley 		},
892004290fSPaul Walmsley 	},
902004290fSPaul Walmsley 	.class		= &i2c_class,
912004290fSPaul Walmsley };
922004290fSPaul Walmsley 
932004290fSPaul Walmsley /* I2C2 */
942004290fSPaul Walmsley static struct omap_hwmod omap2430_i2c2_hwmod = {
952004290fSPaul Walmsley 	.name		= "i2c2",
963e600522SAndy Green 	.flags		= HWMOD_16BIT_REG,
972004290fSPaul Walmsley 	.main_clk	= "i2chs2_fck",
982004290fSPaul Walmsley 	.prcm		= {
992004290fSPaul Walmsley 		.omap2 = {
1002004290fSPaul Walmsley 			.module_offs = CORE_MOD,
1012004290fSPaul Walmsley 			.idlest_reg_id = 1,
1022004290fSPaul Walmsley 			.idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
1032004290fSPaul Walmsley 		},
1042004290fSPaul Walmsley 	},
1052004290fSPaul Walmsley 	.class		= &i2c_class,
1062004290fSPaul Walmsley };
1072004290fSPaul Walmsley 
108aeac0e44SVaradarajan, Charulatha /* gpio5 */
109aeac0e44SVaradarajan, Charulatha static struct omap_hwmod omap2430_gpio5_hwmod = {
110aeac0e44SVaradarajan, Charulatha 	.name		= "gpio5",
111f95440caSAvinash.H.M 	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
112aeac0e44SVaradarajan, Charulatha 	.main_clk	= "gpio5_fck",
113aeac0e44SVaradarajan, Charulatha 	.prcm		= {
114aeac0e44SVaradarajan, Charulatha 		.omap2 = {
115aeac0e44SVaradarajan, Charulatha 			.module_offs = CORE_MOD,
116aeac0e44SVaradarajan, Charulatha 			.idlest_reg_id = 2,
117aeac0e44SVaradarajan, Charulatha 			.idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
118aeac0e44SVaradarajan, Charulatha 		},
119aeac0e44SVaradarajan, Charulatha 	},
120273b9465SPaul Walmsley 	.class		= &omap2xxx_gpio_hwmod_class,
121aeac0e44SVaradarajan, Charulatha };
122aeac0e44SVaradarajan, Charulatha 
123fca1ab55SOmar Ramirez Luna /* mailbox */
124fca1ab55SOmar Ramirez Luna static struct omap_hwmod omap2430_mailbox_hwmod = {
125fca1ab55SOmar Ramirez Luna 	.name		= "mailbox",
126273b9465SPaul Walmsley 	.class		= &omap2xxx_mailbox_hwmod_class,
127fca1ab55SOmar Ramirez Luna 	.main_clk	= "mailboxes_ick",
128fca1ab55SOmar Ramirez Luna 	.prcm		= {
129fca1ab55SOmar Ramirez Luna 		.omap2 = {
130fca1ab55SOmar Ramirez Luna 			.module_offs = CORE_MOD,
131fca1ab55SOmar Ramirez Luna 			.idlest_reg_id = 1,
132fca1ab55SOmar Ramirez Luna 			.idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
133fca1ab55SOmar Ramirez Luna 		},
134fca1ab55SOmar Ramirez Luna 	},
135fca1ab55SOmar Ramirez Luna };
136fca1ab55SOmar Ramirez Luna 
1377f904c78SCharulatha V /* mcspi3 */
1387f904c78SCharulatha V static struct omap_hwmod omap2430_mcspi3_hwmod = {
139bec93811SPaul Walmsley 	.name		= "mcspi3",
1407f904c78SCharulatha V 	.main_clk	= "mcspi3_fck",
1417f904c78SCharulatha V 	.prcm		= {
1427f904c78SCharulatha V 		.omap2 = {
1437f904c78SCharulatha V 			.module_offs = CORE_MOD,
1447f904c78SCharulatha V 			.idlest_reg_id = 2,
1457f904c78SCharulatha V 			.idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
1467f904c78SCharulatha V 		},
1477f904c78SCharulatha V 	},
148273b9465SPaul Walmsley 	.class		= &omap2xxx_mcspi_class,
1497f904c78SCharulatha V };
1507f904c78SCharulatha V 
151844a3b63SPaul Walmsley /* usbhsotg */
15244d02acfSHema HK static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
15344d02acfSHema HK 	.rev_offs	= 0x0400,
15444d02acfSHema HK 	.sysc_offs	= 0x0404,
15544d02acfSHema HK 	.syss_offs	= 0x0408,
15644d02acfSHema HK 	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
15744d02acfSHema HK 			  SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
15844d02acfSHema HK 			  SYSC_HAS_AUTOIDLE),
15944d02acfSHema HK 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
16044d02acfSHema HK 			  MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
16144d02acfSHema HK 	.sysc_fields	= &omap_hwmod_sysc_type1,
16244d02acfSHema HK };
16344d02acfSHema HK 
16444d02acfSHema HK static struct omap_hwmod_class usbotg_class = {
16544d02acfSHema HK 	.name = "usbotg",
16644d02acfSHema HK 	.sysc = &omap2430_usbhsotg_sysc,
16744d02acfSHema HK };
16844d02acfSHema HK 
16944d02acfSHema HK /* usb_otg_hs */
17044d02acfSHema HK static struct omap_hwmod omap2430_usbhsotg_hwmod = {
17144d02acfSHema HK 	.name		= "usb_otg_hs",
17244d02acfSHema HK 	.main_clk	= "usbhs_ick",
17344d02acfSHema HK 	.prcm		= {
17444d02acfSHema HK 		.omap2 = {
17544d02acfSHema HK 			.module_offs = CORE_MOD,
17644d02acfSHema HK 			.idlest_reg_id = 1,
17744d02acfSHema HK 			.idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
17844d02acfSHema HK 		},
17944d02acfSHema HK 	},
18044d02acfSHema HK 	.class		= &usbotg_class,
18144d02acfSHema HK 	/*
18244d02acfSHema HK 	 * Erratum ID: i479  idle_req / idle_ack mechanism potentially
18344d02acfSHema HK 	 * broken when autoidle is enabled
18444d02acfSHema HK 	 * workaround is to disable the autoidle bit at module level.
18544d02acfSHema HK 	 */
18644d02acfSHema HK 	.flags		= HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
18744d02acfSHema HK 				| HWMOD_SWSUP_MSTANDBY,
18844d02acfSHema HK };
18944d02acfSHema HK 
19037801b3dSCharulatha V /*
19137801b3dSCharulatha V  * 'mcbsp' class
19237801b3dSCharulatha V  * multi channel buffered serial port controller
19337801b3dSCharulatha V  */
19404aa67deSTony Lindgren 
19537801b3dSCharulatha V static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
19637801b3dSCharulatha V 	.rev_offs	= 0x007C,
19737801b3dSCharulatha V 	.sysc_offs	= 0x008C,
19837801b3dSCharulatha V 	.sysc_flags	= (SYSC_HAS_SOFTRESET),
19937801b3dSCharulatha V 	.sysc_fields    = &omap_hwmod_sysc_type1,
20037801b3dSCharulatha V };
20137801b3dSCharulatha V 
20237801b3dSCharulatha V static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
20337801b3dSCharulatha V 	.name = "mcbsp",
20437801b3dSCharulatha V 	.sysc = &omap2430_mcbsp_sysc,
20537801b3dSCharulatha V };
20637801b3dSCharulatha V 
207db382a86SPeter Ujfalusi static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
208db382a86SPeter Ujfalusi 	{ .role = "pad_fck", .clk = "mcbsp_clks" },
209db382a86SPeter Ujfalusi 	{ .role = "prcm_fck", .clk = "func_96m_ck" },
210db382a86SPeter Ujfalusi };
211db382a86SPeter Ujfalusi 
21237801b3dSCharulatha V /* mcbsp1 */
21337801b3dSCharulatha V static struct omap_hwmod omap2430_mcbsp1_hwmod = {
21437801b3dSCharulatha V 	.name		= "mcbsp1",
21537801b3dSCharulatha V 	.class		= &omap2430_mcbsp_hwmod_class,
21637801b3dSCharulatha V 	.main_clk	= "mcbsp1_fck",
21737801b3dSCharulatha V 	.prcm		= {
21837801b3dSCharulatha V 		.omap2 = {
21937801b3dSCharulatha V 			.module_offs = CORE_MOD,
22037801b3dSCharulatha V 			.idlest_reg_id = 1,
22137801b3dSCharulatha V 			.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
22237801b3dSCharulatha V 		},
22337801b3dSCharulatha V 	},
224db382a86SPeter Ujfalusi 	.opt_clks	= mcbsp_opt_clks,
225db382a86SPeter Ujfalusi 	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
22637801b3dSCharulatha V };
22737801b3dSCharulatha V 
22837801b3dSCharulatha V /* mcbsp2 */
22937801b3dSCharulatha V static struct omap_hwmod omap2430_mcbsp2_hwmod = {
23037801b3dSCharulatha V 	.name		= "mcbsp2",
23137801b3dSCharulatha V 	.class		= &omap2430_mcbsp_hwmod_class,
23237801b3dSCharulatha V 	.main_clk	= "mcbsp2_fck",
23337801b3dSCharulatha V 	.prcm		= {
23437801b3dSCharulatha V 		.omap2 = {
23537801b3dSCharulatha V 			.module_offs = CORE_MOD,
23637801b3dSCharulatha V 			.idlest_reg_id = 1,
23737801b3dSCharulatha V 			.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
23837801b3dSCharulatha V 		},
23937801b3dSCharulatha V 	},
240db382a86SPeter Ujfalusi 	.opt_clks	= mcbsp_opt_clks,
241db382a86SPeter Ujfalusi 	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
24237801b3dSCharulatha V };
24337801b3dSCharulatha V 
24437801b3dSCharulatha V /* mcbsp3 */
24537801b3dSCharulatha V static struct omap_hwmod omap2430_mcbsp3_hwmod = {
24637801b3dSCharulatha V 	.name		= "mcbsp3",
24737801b3dSCharulatha V 	.class		= &omap2430_mcbsp_hwmod_class,
24837801b3dSCharulatha V 	.main_clk	= "mcbsp3_fck",
24937801b3dSCharulatha V 	.prcm		= {
25037801b3dSCharulatha V 		.omap2 = {
25137801b3dSCharulatha V 			.module_offs = CORE_MOD,
25237801b3dSCharulatha V 			.idlest_reg_id = 2,
25337801b3dSCharulatha V 			.idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
25437801b3dSCharulatha V 		},
25537801b3dSCharulatha V 	},
256db382a86SPeter Ujfalusi 	.opt_clks	= mcbsp_opt_clks,
257db382a86SPeter Ujfalusi 	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
25837801b3dSCharulatha V };
25937801b3dSCharulatha V 
26037801b3dSCharulatha V /* mcbsp4 */
26137801b3dSCharulatha V static struct omap_hwmod omap2430_mcbsp4_hwmod = {
26237801b3dSCharulatha V 	.name		= "mcbsp4",
26337801b3dSCharulatha V 	.class		= &omap2430_mcbsp_hwmod_class,
26437801b3dSCharulatha V 	.main_clk	= "mcbsp4_fck",
26537801b3dSCharulatha V 	.prcm		= {
26637801b3dSCharulatha V 		.omap2 = {
26737801b3dSCharulatha V 			.module_offs = CORE_MOD,
26837801b3dSCharulatha V 			.idlest_reg_id = 2,
26937801b3dSCharulatha V 			.idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
27037801b3dSCharulatha V 		},
27137801b3dSCharulatha V 	},
272db382a86SPeter Ujfalusi 	.opt_clks	= mcbsp_opt_clks,
273db382a86SPeter Ujfalusi 	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
27437801b3dSCharulatha V };
27537801b3dSCharulatha V 
27637801b3dSCharulatha V /* mcbsp5 */
27737801b3dSCharulatha V static struct omap_hwmod omap2430_mcbsp5_hwmod = {
27837801b3dSCharulatha V 	.name		= "mcbsp5",
27937801b3dSCharulatha V 	.class		= &omap2430_mcbsp_hwmod_class,
28037801b3dSCharulatha V 	.main_clk	= "mcbsp5_fck",
28137801b3dSCharulatha V 	.prcm		= {
28237801b3dSCharulatha V 		.omap2 = {
28337801b3dSCharulatha V 			.module_offs = CORE_MOD,
28437801b3dSCharulatha V 			.idlest_reg_id = 2,
28537801b3dSCharulatha V 			.idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
28637801b3dSCharulatha V 		},
28737801b3dSCharulatha V 	},
288db382a86SPeter Ujfalusi 	.opt_clks	= mcbsp_opt_clks,
289db382a86SPeter Ujfalusi 	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
29037801b3dSCharulatha V };
29104aa67deSTony Lindgren 
292bce06f37SPaul Walmsley /* MMC/SD/SDIO common */
293bce06f37SPaul Walmsley static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
294bce06f37SPaul Walmsley 	.rev_offs	= 0x1fc,
295bce06f37SPaul Walmsley 	.sysc_offs	= 0x10,
296bce06f37SPaul Walmsley 	.syss_offs	= 0x14,
297bce06f37SPaul Walmsley 	.sysc_flags	= (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
298bce06f37SPaul Walmsley 			   SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
299bce06f37SPaul Walmsley 			   SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
300bce06f37SPaul Walmsley 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
301bce06f37SPaul Walmsley 	.sysc_fields    = &omap_hwmod_sysc_type1,
302bce06f37SPaul Walmsley };
303bce06f37SPaul Walmsley 
304bce06f37SPaul Walmsley static struct omap_hwmod_class omap2430_mmc_class = {
305bce06f37SPaul Walmsley 	.name = "mmc",
306bce06f37SPaul Walmsley 	.sysc = &omap2430_mmc_sysc,
307bce06f37SPaul Walmsley };
308bce06f37SPaul Walmsley 
309bce06f37SPaul Walmsley /* MMC/SD/SDIO1 */
310bce06f37SPaul Walmsley static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
311bce06f37SPaul Walmsley 	{ .role = "dbck", .clk = "mmchsdb1_fck" },
312bce06f37SPaul Walmsley };
313bce06f37SPaul Walmsley 
31455143438SAndreas Fenkart static struct omap_hsmmc_dev_attr mmc1_dev_attr = {
3156ab8946fSKishore Kadiyala 	.flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
3166ab8946fSKishore Kadiyala };
3176ab8946fSKishore Kadiyala 
318bce06f37SPaul Walmsley static struct omap_hwmod omap2430_mmc1_hwmod = {
319bce06f37SPaul Walmsley 	.name		= "mmc1",
320bce06f37SPaul Walmsley 	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
321bce06f37SPaul Walmsley 	.opt_clks	= omap2430_mmc1_opt_clks,
322bce06f37SPaul Walmsley 	.opt_clks_cnt	= ARRAY_SIZE(omap2430_mmc1_opt_clks),
323bce06f37SPaul Walmsley 	.main_clk	= "mmchs1_fck",
324bce06f37SPaul Walmsley 	.prcm		= {
325bce06f37SPaul Walmsley 		.omap2 = {
326bce06f37SPaul Walmsley 			.module_offs = CORE_MOD,
327bce06f37SPaul Walmsley 			.idlest_reg_id = 2,
328bce06f37SPaul Walmsley 			.idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
329bce06f37SPaul Walmsley 		},
330bce06f37SPaul Walmsley 	},
3316ab8946fSKishore Kadiyala 	.dev_attr	= &mmc1_dev_attr,
332bce06f37SPaul Walmsley 	.class		= &omap2430_mmc_class,
333bce06f37SPaul Walmsley };
334bce06f37SPaul Walmsley 
335bce06f37SPaul Walmsley /* MMC/SD/SDIO2 */
336bce06f37SPaul Walmsley static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
337bce06f37SPaul Walmsley 	{ .role = "dbck", .clk = "mmchsdb2_fck" },
338bce06f37SPaul Walmsley };
339bce06f37SPaul Walmsley 
340bce06f37SPaul Walmsley static struct omap_hwmod omap2430_mmc2_hwmod = {
341bce06f37SPaul Walmsley 	.name		= "mmc2",
342bce06f37SPaul Walmsley 	.flags		= HWMOD_CONTROL_OPT_CLKS_IN_RESET,
343bce06f37SPaul Walmsley 	.opt_clks	= omap2430_mmc2_opt_clks,
344bce06f37SPaul Walmsley 	.opt_clks_cnt	= ARRAY_SIZE(omap2430_mmc2_opt_clks),
345bce06f37SPaul Walmsley 	.main_clk	= "mmchs2_fck",
346bce06f37SPaul Walmsley 	.prcm		= {
347bce06f37SPaul Walmsley 		.omap2 = {
348bce06f37SPaul Walmsley 			.module_offs = CORE_MOD,
349bce06f37SPaul Walmsley 			.idlest_reg_id = 2,
350bce06f37SPaul Walmsley 			.idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
351bce06f37SPaul Walmsley 		},
352bce06f37SPaul Walmsley 	},
353bce06f37SPaul Walmsley 	.class		= &omap2430_mmc_class,
354bce06f37SPaul Walmsley };
35582cbd1aeSG, Manjunath Kondaiah 
356f32bd778SPaul Walmsley /* HDQ1W/1-wire */
357f32bd778SPaul Walmsley static struct omap_hwmod omap2430_hdq1w_hwmod = {
358f32bd778SPaul Walmsley 	.name		= "hdq1w",
359f32bd778SPaul Walmsley 	.main_clk	= "hdq_fck",
360f32bd778SPaul Walmsley 	.prcm		= {
361f32bd778SPaul Walmsley 		.omap2 = {
362f32bd778SPaul Walmsley 			.module_offs = CORE_MOD,
363f32bd778SPaul Walmsley 			.idlest_reg_id = 1,
364f32bd778SPaul Walmsley 			.idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
365f32bd778SPaul Walmsley 		},
366f32bd778SPaul Walmsley 	},
367f32bd778SPaul Walmsley 	.class		= &omap2_hdq1w_class,
368f32bd778SPaul Walmsley };
369f32bd778SPaul Walmsley 
370844a3b63SPaul Walmsley /*
371844a3b63SPaul Walmsley  * interfaces
372844a3b63SPaul Walmsley  */
373844a3b63SPaul Walmsley 
374844a3b63SPaul Walmsley /* L3 -> L4_CORE interface */
375844a3b63SPaul Walmsley /* l3_core -> usbhsotg  interface */
376844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
377844a3b63SPaul Walmsley 	.master		= &omap2430_usbhsotg_hwmod,
378cb48427eSPaul Walmsley 	.slave		= &omap2xxx_l3_main_hwmod,
379844a3b63SPaul Walmsley 	.clk		= "core_l3_ck",
380844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU,
381844a3b63SPaul Walmsley };
382844a3b63SPaul Walmsley 
383844a3b63SPaul Walmsley /* L4 CORE -> I2C1 interface */
384844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
385cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
386844a3b63SPaul Walmsley 	.slave		= &omap2430_i2c1_hwmod,
387844a3b63SPaul Walmsley 	.clk		= "i2c1_ick",
388844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
389844a3b63SPaul Walmsley };
390844a3b63SPaul Walmsley 
391844a3b63SPaul Walmsley /* L4 CORE -> I2C2 interface */
392844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
393cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
394844a3b63SPaul Walmsley 	.slave		= &omap2430_i2c2_hwmod,
395844a3b63SPaul Walmsley 	.clk		= "i2c2_ick",
396844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
397844a3b63SPaul Walmsley };
398844a3b63SPaul Walmsley 
399844a3b63SPaul Walmsley /*  l4_core ->usbhsotg  interface */
400844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
401cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
402844a3b63SPaul Walmsley 	.slave		= &omap2430_usbhsotg_hwmod,
403844a3b63SPaul Walmsley 	.clk		= "usb_l4_ick",
404844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU,
405844a3b63SPaul Walmsley };
406844a3b63SPaul Walmsley 
407844a3b63SPaul Walmsley /* L4 CORE -> MMC1 interface */
408844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
409cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
410844a3b63SPaul Walmsley 	.slave		= &omap2430_mmc1_hwmod,
411844a3b63SPaul Walmsley 	.clk		= "mmchs1_ick",
412844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
413844a3b63SPaul Walmsley };
414844a3b63SPaul Walmsley 
415844a3b63SPaul Walmsley /* L4 CORE -> MMC2 interface */
416844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
417cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
418844a3b63SPaul Walmsley 	.slave		= &omap2430_mmc2_hwmod,
419844a3b63SPaul Walmsley 	.clk		= "mmchs2_ick",
420844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
421844a3b63SPaul Walmsley };
422844a3b63SPaul Walmsley 
423844a3b63SPaul Walmsley /* l4 core -> mcspi3 interface */
424844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
425cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
426844a3b63SPaul Walmsley 	.slave		= &omap2430_mcspi3_hwmod,
427844a3b63SPaul Walmsley 	.clk		= "mcspi3_ick",
428844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
429844a3b63SPaul Walmsley };
430844a3b63SPaul Walmsley 
431844a3b63SPaul Walmsley /* IVA2 <- L3 interface */
432844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l3__iva = {
433cb48427eSPaul Walmsley 	.master		= &omap2xxx_l3_main_hwmod,
434844a3b63SPaul Walmsley 	.slave		= &omap2430_iva_hwmod,
4353af35fbcSPaul Walmsley 	.clk		= "core_l3_ck",
436844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
437844a3b63SPaul Walmsley };
438844a3b63SPaul Walmsley 
439844a3b63SPaul Walmsley /* l4_wkup -> wd_timer2 */
440844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
441cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_wkup_hwmod,
442cb48427eSPaul Walmsley 	.slave		= &omap2xxx_wd_timer2_hwmod,
443844a3b63SPaul Walmsley 	.clk		= "mpu_wdt_ick",
444844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
445844a3b63SPaul Walmsley };
446844a3b63SPaul Walmsley 
447844a3b63SPaul Walmsley /* l4_wkup -> gpio1 */
448844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
449cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_wkup_hwmod,
450cb48427eSPaul Walmsley 	.slave		= &omap2xxx_gpio1_hwmod,
451844a3b63SPaul Walmsley 	.clk		= "gpios_ick",
452844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
453844a3b63SPaul Walmsley };
454844a3b63SPaul Walmsley 
455844a3b63SPaul Walmsley /* l4_wkup -> gpio2 */
456844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
457cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_wkup_hwmod,
458cb48427eSPaul Walmsley 	.slave		= &omap2xxx_gpio2_hwmod,
459844a3b63SPaul Walmsley 	.clk		= "gpios_ick",
460844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
461844a3b63SPaul Walmsley };
462844a3b63SPaul Walmsley 
463844a3b63SPaul Walmsley /* l4_wkup -> gpio3 */
464844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
465cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_wkup_hwmod,
466cb48427eSPaul Walmsley 	.slave		= &omap2xxx_gpio3_hwmod,
467844a3b63SPaul Walmsley 	.clk		= "gpios_ick",
468844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
469844a3b63SPaul Walmsley };
470844a3b63SPaul Walmsley 
471844a3b63SPaul Walmsley /* l4_wkup -> gpio4 */
472844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
473cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_wkup_hwmod,
474cb48427eSPaul Walmsley 	.slave		= &omap2xxx_gpio4_hwmod,
475844a3b63SPaul Walmsley 	.clk		= "gpios_ick",
476844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
477844a3b63SPaul Walmsley };
478844a3b63SPaul Walmsley 
479844a3b63SPaul Walmsley /* l4_core -> gpio5 */
480844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
481cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
482844a3b63SPaul Walmsley 	.slave		= &omap2430_gpio5_hwmod,
483844a3b63SPaul Walmsley 	.clk		= "gpio5_ick",
484844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
485844a3b63SPaul Walmsley };
486844a3b63SPaul Walmsley 
487844a3b63SPaul Walmsley /* l4_core -> mailbox */
488844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
489cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
490844a3b63SPaul Walmsley 	.slave		= &omap2430_mailbox_hwmod,
491844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
492844a3b63SPaul Walmsley };
493844a3b63SPaul Walmsley 
494844a3b63SPaul Walmsley /* l4_core -> mcbsp1 */
495844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
496cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
497844a3b63SPaul Walmsley 	.slave		= &omap2430_mcbsp1_hwmod,
498844a3b63SPaul Walmsley 	.clk		= "mcbsp1_ick",
499844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
500844a3b63SPaul Walmsley };
501844a3b63SPaul Walmsley 
502844a3b63SPaul Walmsley /* l4_core -> mcbsp2 */
503844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
504cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
505844a3b63SPaul Walmsley 	.slave		= &omap2430_mcbsp2_hwmod,
506844a3b63SPaul Walmsley 	.clk		= "mcbsp2_ick",
507844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
508844a3b63SPaul Walmsley };
509844a3b63SPaul Walmsley 
510844a3b63SPaul Walmsley /* l4_core -> mcbsp3 */
511844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
512cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
513844a3b63SPaul Walmsley 	.slave		= &omap2430_mcbsp3_hwmod,
514844a3b63SPaul Walmsley 	.clk		= "mcbsp3_ick",
515844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
516844a3b63SPaul Walmsley };
517844a3b63SPaul Walmsley 
518844a3b63SPaul Walmsley /* l4_core -> mcbsp4 */
519844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
520cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
521844a3b63SPaul Walmsley 	.slave		= &omap2430_mcbsp4_hwmod,
522844a3b63SPaul Walmsley 	.clk		= "mcbsp4_ick",
523844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
524844a3b63SPaul Walmsley };
525844a3b63SPaul Walmsley 
526844a3b63SPaul Walmsley /* l4_core -> mcbsp5 */
527844a3b63SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
528cb48427eSPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
529844a3b63SPaul Walmsley 	.slave		= &omap2430_mcbsp5_hwmod,
530844a3b63SPaul Walmsley 	.clk		= "mcbsp5_ick",
531844a3b63SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
532844a3b63SPaul Walmsley };
533844a3b63SPaul Walmsley 
534f32bd778SPaul Walmsley /* l4_core -> hdq1w */
535f32bd778SPaul Walmsley static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
536f32bd778SPaul Walmsley 	.master		= &omap2xxx_l4_core_hwmod,
537f32bd778SPaul Walmsley 	.slave		= &omap2430_hdq1w_hwmod,
538f32bd778SPaul Walmsley 	.clk		= "hdq_ick",
539f32bd778SPaul Walmsley 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
540f32bd778SPaul Walmsley 	.flags		= OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
541f32bd778SPaul Walmsley };
542f32bd778SPaul Walmsley 
54349484a60SAfzal Mohammed static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
54449484a60SAfzal Mohammed 	.master		= &omap2xxx_l3_main_hwmod,
54549484a60SAfzal Mohammed 	.slave		= &omap2xxx_gpmc_hwmod,
54649484a60SAfzal Mohammed 	.clk		= "core_l3_ck",
54749484a60SAfzal Mohammed 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
54849484a60SAfzal Mohammed };
54949484a60SAfzal Mohammed 
5500a78c5c5SPaul Walmsley static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
5516a29755fSPaul Walmsley 	&omap2xxx_l3_main__l4_core,
5526a29755fSPaul Walmsley 	&omap2xxx_mpu__l3_main,
5536a29755fSPaul Walmsley 	&omap2xxx_dss__l3,
5540a78c5c5SPaul Walmsley 	&omap2430_usbhsotg__l3,
5550a78c5c5SPaul Walmsley 	&omap2430_l4_core__i2c1,
5560a78c5c5SPaul Walmsley 	&omap2430_l4_core__i2c2,
5576a29755fSPaul Walmsley 	&omap2xxx_l4_core__l4_wkup,
5580a78c5c5SPaul Walmsley 	&omap2_l4_core__uart1,
5590a78c5c5SPaul Walmsley 	&omap2_l4_core__uart2,
5600a78c5c5SPaul Walmsley 	&omap2_l4_core__uart3,
5610a78c5c5SPaul Walmsley 	&omap2430_l4_core__usbhsotg,
5620a78c5c5SPaul Walmsley 	&omap2430_l4_core__mmc1,
5630a78c5c5SPaul Walmsley 	&omap2430_l4_core__mmc2,
5646a29755fSPaul Walmsley 	&omap2xxx_l4_core__mcspi1,
5656a29755fSPaul Walmsley 	&omap2xxx_l4_core__mcspi2,
5660a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcspi3,
5670a78c5c5SPaul Walmsley 	&omap2430_l3__iva,
5686a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer3,
5696a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer4,
5706a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer5,
5716a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer6,
5726a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer7,
5736a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer8,
5746a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer9,
5756a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer10,
5766a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer11,
5776a29755fSPaul Walmsley 	&omap2xxx_l4_core__timer12,
5780a78c5c5SPaul Walmsley 	&omap2430_l4_wkup__wd_timer2,
5796a29755fSPaul Walmsley 	&omap2xxx_l4_core__dss,
5806a29755fSPaul Walmsley 	&omap2xxx_l4_core__dss_dispc,
5816a29755fSPaul Walmsley 	&omap2xxx_l4_core__dss_rfbi,
5826a29755fSPaul Walmsley 	&omap2xxx_l4_core__dss_venc,
5830a78c5c5SPaul Walmsley 	&omap2430_l4_wkup__gpio1,
5840a78c5c5SPaul Walmsley 	&omap2430_l4_wkup__gpio2,
5850a78c5c5SPaul Walmsley 	&omap2430_l4_wkup__gpio3,
5860a78c5c5SPaul Walmsley 	&omap2430_l4_wkup__gpio4,
5870a78c5c5SPaul Walmsley 	&omap2430_l4_core__gpio5,
5880a78c5c5SPaul Walmsley 	&omap2430_l4_core__mailbox,
5890a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcbsp1,
5900a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcbsp2,
5910a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcbsp3,
5920a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcbsp4,
5930a78c5c5SPaul Walmsley 	&omap2430_l4_core__mcbsp5,
594f32bd778SPaul Walmsley 	&omap2430_l4_core__hdq1w,
595e9b0a2fbSPaul Walmsley 	&omap2xxx_l4_core__rng,
596e569e994SMark A. Greer 	&omap2xxx_l4_core__sham,
597660ffd6bSMark A. Greer 	&omap2xxx_l4_core__aes,
59849484a60SAfzal Mohammed 	&omap2430_l3__gpmc,
5997359154eSPaul Walmsley 	NULL,
6007359154eSPaul Walmsley };
6017359154eSPaul Walmsley 
omap2430_hwmod_init(void)6027359154eSPaul Walmsley int __init omap2430_hwmod_init(void)
6037359154eSPaul Walmsley {
6049ebfd285SKevin Hilman 	omap_hwmod_init();
6050a78c5c5SPaul Walmsley 	return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
6067359154eSPaul Walmsley }
607