omap_hwmod_2430_data.c 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * XXX handle crossbar/shared link difference for L3?
  13. * XXX these should be marked initdata for multi-OMAP kernels
  14. */
  15. #include <linux/i2c-omap.h>
  16. #include <linux/platform_data/asoc-ti-mcbsp.h>
  17. #include <linux/platform_data/spi-omap2-mcspi.h>
  18. #include <linux/omap-dma.h>
  19. #include <linux/platform_data/mailbox-omap.h>
  20. #include <plat/dmtimer.h>
  21. #include "omap_hwmod.h"
  22. #include "mmc.h"
  23. #include "l3_2xxx.h"
  24. #include "soc.h"
  25. #include "omap_hwmod_common_data.h"
  26. #include "prm-regbits-24xx.h"
  27. #include "cm-regbits-24xx.h"
  28. #include "i2c.h"
  29. #include "wd_timer.h"
  30. /*
  31. * OMAP2430 hardware module integration data
  32. *
  33. * All of the data in this section should be autogeneratable from the
  34. * TI hardware database or other technical documentation. Data that
  35. * is driver-specific or driver-kernel integration-specific belongs
  36. * elsewhere.
  37. */
  38. /*
  39. * IP blocks
  40. */
  41. /* IVA2 (IVA2) */
  42. static struct omap_hwmod_rst_info omap2430_iva_resets[] = {
  43. { .name = "logic", .rst_shift = 0 },
  44. { .name = "mmu", .rst_shift = 1 },
  45. };
  46. static struct omap_hwmod omap2430_iva_hwmod = {
  47. .name = "iva",
  48. .class = &iva_hwmod_class,
  49. .clkdm_name = "dsp_clkdm",
  50. .rst_lines = omap2430_iva_resets,
  51. .rst_lines_cnt = ARRAY_SIZE(omap2430_iva_resets),
  52. .main_clk = "dsp_fck",
  53. };
  54. /* I2C common */
  55. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  56. .rev_offs = 0x00,
  57. .sysc_offs = 0x20,
  58. .syss_offs = 0x10,
  59. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  60. SYSS_HAS_RESET_STATUS),
  61. .sysc_fields = &omap_hwmod_sysc_type1,
  62. };
  63. static struct omap_hwmod_class i2c_class = {
  64. .name = "i2c",
  65. .sysc = &i2c_sysc,
  66. .rev = OMAP_I2C_IP_VERSION_1,
  67. .reset = &omap_i2c_reset,
  68. };
  69. static struct omap_i2c_dev_attr i2c_dev_attr = {
  70. .fifo_depth = 8, /* bytes */
  71. .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
  72. OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
  73. };
  74. /* I2C1 */
  75. static struct omap_hwmod omap2430_i2c1_hwmod = {
  76. .name = "i2c1",
  77. .flags = HWMOD_16BIT_REG,
  78. .mpu_irqs = omap2_i2c1_mpu_irqs,
  79. .sdma_reqs = omap2_i2c1_sdma_reqs,
  80. .main_clk = "i2chs1_fck",
  81. .prcm = {
  82. .omap2 = {
  83. /*
  84. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  85. * I2CHS IP's do not follow the usual pattern.
  86. * prcm_reg_id alone cannot be used to program
  87. * the iclk and fclk. Needs to be handled using
  88. * additional flags when clk handling is moved
  89. * to hwmod framework.
  90. */
  91. .module_offs = CORE_MOD,
  92. .prcm_reg_id = 1,
  93. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  94. .idlest_reg_id = 1,
  95. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  96. },
  97. },
  98. .class = &i2c_class,
  99. .dev_attr = &i2c_dev_attr,
  100. };
  101. /* I2C2 */
  102. static struct omap_hwmod omap2430_i2c2_hwmod = {
  103. .name = "i2c2",
  104. .flags = HWMOD_16BIT_REG,
  105. .mpu_irqs = omap2_i2c2_mpu_irqs,
  106. .sdma_reqs = omap2_i2c2_sdma_reqs,
  107. .main_clk = "i2chs2_fck",
  108. .prcm = {
  109. .omap2 = {
  110. .module_offs = CORE_MOD,
  111. .prcm_reg_id = 1,
  112. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  113. .idlest_reg_id = 1,
  114. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  115. },
  116. },
  117. .class = &i2c_class,
  118. .dev_attr = &i2c_dev_attr,
  119. };
  120. /* gpio5 */
  121. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  122. { .irq = 33 + OMAP_INTC_START, }, /* INT_24XX_GPIO_BANK5 */
  123. { .irq = -1 },
  124. };
  125. static struct omap_hwmod omap2430_gpio5_hwmod = {
  126. .name = "gpio5",
  127. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  128. .mpu_irqs = omap243x_gpio5_irqs,
  129. .main_clk = "gpio5_fck",
  130. .prcm = {
  131. .omap2 = {
  132. .prcm_reg_id = 2,
  133. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  134. .module_offs = CORE_MOD,
  135. .idlest_reg_id = 2,
  136. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  137. },
  138. },
  139. .class = &omap2xxx_gpio_hwmod_class,
  140. .dev_attr = &omap2xxx_gpio_dev_attr,
  141. };
  142. /* dma attributes */
  143. static struct omap_dma_dev_attr dma_dev_attr = {
  144. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  145. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  146. .lch_count = 32,
  147. };
  148. static struct omap_hwmod omap2430_dma_system_hwmod = {
  149. .name = "dma",
  150. .class = &omap2xxx_dma_hwmod_class,
  151. .mpu_irqs = omap2_dma_system_irqs,
  152. .main_clk = "core_l3_ck",
  153. .dev_attr = &dma_dev_attr,
  154. .flags = HWMOD_NO_IDLEST,
  155. };
  156. /* mailbox */
  157. static struct omap_mbox_dev_info omap2430_mailbox_info[] = {
  158. { .name = "dsp", .tx_id = 0, .rx_id = 1 },
  159. };
  160. static struct omap_mbox_pdata omap2430_mailbox_attrs = {
  161. .info_cnt = ARRAY_SIZE(omap2430_mailbox_info),
  162. .info = omap2430_mailbox_info,
  163. };
  164. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  165. { .irq = 26 + OMAP_INTC_START, },
  166. { .irq = -1 },
  167. };
  168. static struct omap_hwmod omap2430_mailbox_hwmod = {
  169. .name = "mailbox",
  170. .class = &omap2xxx_mailbox_hwmod_class,
  171. .mpu_irqs = omap2430_mailbox_irqs,
  172. .main_clk = "mailboxes_ick",
  173. .prcm = {
  174. .omap2 = {
  175. .prcm_reg_id = 1,
  176. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  177. .module_offs = CORE_MOD,
  178. .idlest_reg_id = 1,
  179. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  180. },
  181. },
  182. .dev_attr = &omap2430_mailbox_attrs,
  183. };
  184. /* mcspi3 */
  185. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  186. { .irq = 91 + OMAP_INTC_START, },
  187. { .irq = -1 },
  188. };
  189. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  190. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  191. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  192. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  193. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  194. { .dma_req = -1 }
  195. };
  196. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  197. .num_chipselect = 2,
  198. };
  199. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  200. .name = "mcspi3",
  201. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  202. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  203. .main_clk = "mcspi3_fck",
  204. .prcm = {
  205. .omap2 = {
  206. .module_offs = CORE_MOD,
  207. .prcm_reg_id = 2,
  208. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  209. .idlest_reg_id = 2,
  210. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  211. },
  212. },
  213. .class = &omap2xxx_mcspi_class,
  214. .dev_attr = &omap_mcspi3_dev_attr,
  215. };
  216. /* usbhsotg */
  217. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  218. .rev_offs = 0x0400,
  219. .sysc_offs = 0x0404,
  220. .syss_offs = 0x0408,
  221. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  222. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  223. SYSC_HAS_AUTOIDLE),
  224. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  225. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  226. .sysc_fields = &omap_hwmod_sysc_type1,
  227. };
  228. static struct omap_hwmod_class usbotg_class = {
  229. .name = "usbotg",
  230. .sysc = &omap2430_usbhsotg_sysc,
  231. };
  232. /* usb_otg_hs */
  233. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  234. { .name = "mc", .irq = 92 + OMAP_INTC_START, },
  235. { .name = "dma", .irq = 93 + OMAP_INTC_START, },
  236. { .irq = -1 },
  237. };
  238. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  239. .name = "usb_otg_hs",
  240. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  241. .main_clk = "usbhs_ick",
  242. .prcm = {
  243. .omap2 = {
  244. .prcm_reg_id = 1,
  245. .module_bit = OMAP2430_EN_USBHS_MASK,
  246. .module_offs = CORE_MOD,
  247. .idlest_reg_id = 1,
  248. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  249. },
  250. },
  251. .class = &usbotg_class,
  252. /*
  253. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  254. * broken when autoidle is enabled
  255. * workaround is to disable the autoidle bit at module level.
  256. */
  257. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  258. | HWMOD_SWSUP_MSTANDBY,
  259. };
  260. /*
  261. * 'mcbsp' class
  262. * multi channel buffered serial port controller
  263. */
  264. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  265. .rev_offs = 0x007C,
  266. .sysc_offs = 0x008C,
  267. .sysc_flags = (SYSC_HAS_SOFTRESET),
  268. .sysc_fields = &omap_hwmod_sysc_type1,
  269. };
  270. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  271. .name = "mcbsp",
  272. .sysc = &omap2430_mcbsp_sysc,
  273. .rev = MCBSP_CONFIG_TYPE2,
  274. };
  275. static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
  276. { .role = "pad_fck", .clk = "mcbsp_clks" },
  277. { .role = "prcm_fck", .clk = "func_96m_ck" },
  278. };
  279. /* mcbsp1 */
  280. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  281. { .name = "tx", .irq = 59 + OMAP_INTC_START, },
  282. { .name = "rx", .irq = 60 + OMAP_INTC_START, },
  283. { .name = "ovr", .irq = 61 + OMAP_INTC_START, },
  284. { .name = "common", .irq = 64 + OMAP_INTC_START, },
  285. { .irq = -1 },
  286. };
  287. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  288. .name = "mcbsp1",
  289. .class = &omap2430_mcbsp_hwmod_class,
  290. .mpu_irqs = omap2430_mcbsp1_irqs,
  291. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  292. .main_clk = "mcbsp1_fck",
  293. .prcm = {
  294. .omap2 = {
  295. .prcm_reg_id = 1,
  296. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  297. .module_offs = CORE_MOD,
  298. .idlest_reg_id = 1,
  299. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  300. },
  301. },
  302. .opt_clks = mcbsp_opt_clks,
  303. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  304. };
  305. /* mcbsp2 */
  306. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  307. { .name = "tx", .irq = 62 + OMAP_INTC_START, },
  308. { .name = "rx", .irq = 63 + OMAP_INTC_START, },
  309. { .name = "common", .irq = 16 + OMAP_INTC_START, },
  310. { .irq = -1 },
  311. };
  312. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  313. .name = "mcbsp2",
  314. .class = &omap2430_mcbsp_hwmod_class,
  315. .mpu_irqs = omap2430_mcbsp2_irqs,
  316. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  317. .main_clk = "mcbsp2_fck",
  318. .prcm = {
  319. .omap2 = {
  320. .prcm_reg_id = 1,
  321. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  322. .module_offs = CORE_MOD,
  323. .idlest_reg_id = 1,
  324. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  325. },
  326. },
  327. .opt_clks = mcbsp_opt_clks,
  328. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  329. };
  330. /* mcbsp3 */
  331. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  332. { .name = "tx", .irq = 89 + OMAP_INTC_START, },
  333. { .name = "rx", .irq = 90 + OMAP_INTC_START, },
  334. { .name = "common", .irq = 17 + OMAP_INTC_START, },
  335. { .irq = -1 },
  336. };
  337. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  338. .name = "mcbsp3",
  339. .class = &omap2430_mcbsp_hwmod_class,
  340. .mpu_irqs = omap2430_mcbsp3_irqs,
  341. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  342. .main_clk = "mcbsp3_fck",
  343. .prcm = {
  344. .omap2 = {
  345. .prcm_reg_id = 1,
  346. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  347. .module_offs = CORE_MOD,
  348. .idlest_reg_id = 2,
  349. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  350. },
  351. },
  352. .opt_clks = mcbsp_opt_clks,
  353. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  354. };
  355. /* mcbsp4 */
  356. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  357. { .name = "tx", .irq = 54 + OMAP_INTC_START, },
  358. { .name = "rx", .irq = 55 + OMAP_INTC_START, },
  359. { .name = "common", .irq = 18 + OMAP_INTC_START, },
  360. { .irq = -1 },
  361. };
  362. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  363. { .name = "rx", .dma_req = 20 },
  364. { .name = "tx", .dma_req = 19 },
  365. { .dma_req = -1 }
  366. };
  367. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  368. .name = "mcbsp4",
  369. .class = &omap2430_mcbsp_hwmod_class,
  370. .mpu_irqs = omap2430_mcbsp4_irqs,
  371. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  372. .main_clk = "mcbsp4_fck",
  373. .prcm = {
  374. .omap2 = {
  375. .prcm_reg_id = 1,
  376. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  377. .module_offs = CORE_MOD,
  378. .idlest_reg_id = 2,
  379. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  380. },
  381. },
  382. .opt_clks = mcbsp_opt_clks,
  383. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  384. };
  385. /* mcbsp5 */
  386. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  387. { .name = "tx", .irq = 81 + OMAP_INTC_START, },
  388. { .name = "rx", .irq = 82 + OMAP_INTC_START, },
  389. { .name = "common", .irq = 19 + OMAP_INTC_START, },
  390. { .irq = -1 },
  391. };
  392. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  393. { .name = "rx", .dma_req = 22 },
  394. { .name = "tx", .dma_req = 21 },
  395. { .dma_req = -1 }
  396. };
  397. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  398. .name = "mcbsp5",
  399. .class = &omap2430_mcbsp_hwmod_class,
  400. .mpu_irqs = omap2430_mcbsp5_irqs,
  401. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  402. .main_clk = "mcbsp5_fck",
  403. .prcm = {
  404. .omap2 = {
  405. .prcm_reg_id = 1,
  406. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  407. .module_offs = CORE_MOD,
  408. .idlest_reg_id = 2,
  409. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  410. },
  411. },
  412. .opt_clks = mcbsp_opt_clks,
  413. .opt_clks_cnt = ARRAY_SIZE(mcbsp_opt_clks),
  414. };
  415. /* MMC/SD/SDIO common */
  416. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  417. .rev_offs = 0x1fc,
  418. .sysc_offs = 0x10,
  419. .syss_offs = 0x14,
  420. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  421. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  422. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  423. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  424. .sysc_fields = &omap_hwmod_sysc_type1,
  425. };
  426. static struct omap_hwmod_class omap2430_mmc_class = {
  427. .name = "mmc",
  428. .sysc = &omap2430_mmc_sysc,
  429. };
  430. /* MMC/SD/SDIO1 */
  431. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  432. { .irq = 83 + OMAP_INTC_START, },
  433. { .irq = -1 },
  434. };
  435. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  436. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  437. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  438. { .dma_req = -1 }
  439. };
  440. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  441. { .role = "dbck", .clk = "mmchsdb1_fck" },
  442. };
  443. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  444. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  445. };
  446. static struct omap_hwmod omap2430_mmc1_hwmod = {
  447. .name = "mmc1",
  448. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  449. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  450. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  451. .opt_clks = omap2430_mmc1_opt_clks,
  452. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  453. .main_clk = "mmchs1_fck",
  454. .prcm = {
  455. .omap2 = {
  456. .module_offs = CORE_MOD,
  457. .prcm_reg_id = 2,
  458. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  459. .idlest_reg_id = 2,
  460. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  461. },
  462. },
  463. .dev_attr = &mmc1_dev_attr,
  464. .class = &omap2430_mmc_class,
  465. };
  466. /* MMC/SD/SDIO2 */
  467. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  468. { .irq = 86 + OMAP_INTC_START, },
  469. { .irq = -1 },
  470. };
  471. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  472. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  473. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  474. { .dma_req = -1 }
  475. };
  476. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  477. { .role = "dbck", .clk = "mmchsdb2_fck" },
  478. };
  479. static struct omap_hwmod omap2430_mmc2_hwmod = {
  480. .name = "mmc2",
  481. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  482. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  483. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  484. .opt_clks = omap2430_mmc2_opt_clks,
  485. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  486. .main_clk = "mmchs2_fck",
  487. .prcm = {
  488. .omap2 = {
  489. .module_offs = CORE_MOD,
  490. .prcm_reg_id = 2,
  491. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  492. .idlest_reg_id = 2,
  493. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  494. },
  495. },
  496. .class = &omap2430_mmc_class,
  497. };
  498. /* HDQ1W/1-wire */
  499. static struct omap_hwmod omap2430_hdq1w_hwmod = {
  500. .name = "hdq1w",
  501. .mpu_irqs = omap2_hdq1w_mpu_irqs,
  502. .main_clk = "hdq_fck",
  503. .prcm = {
  504. .omap2 = {
  505. .module_offs = CORE_MOD,
  506. .prcm_reg_id = 1,
  507. .module_bit = OMAP24XX_EN_HDQ_SHIFT,
  508. .idlest_reg_id = 1,
  509. .idlest_idle_bit = OMAP24XX_ST_HDQ_SHIFT,
  510. },
  511. },
  512. .class = &omap2_hdq1w_class,
  513. };
  514. /*
  515. * interfaces
  516. */
  517. /* L3 -> L4_CORE interface */
  518. /* l3_core -> usbhsotg interface */
  519. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  520. .master = &omap2430_usbhsotg_hwmod,
  521. .slave = &omap2xxx_l3_main_hwmod,
  522. .clk = "core_l3_ck",
  523. .user = OCP_USER_MPU,
  524. };
  525. /* L4 CORE -> I2C1 interface */
  526. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  527. .master = &omap2xxx_l4_core_hwmod,
  528. .slave = &omap2430_i2c1_hwmod,
  529. .clk = "i2c1_ick",
  530. .addr = omap2_i2c1_addr_space,
  531. .user = OCP_USER_MPU | OCP_USER_SDMA,
  532. };
  533. /* L4 CORE -> I2C2 interface */
  534. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  535. .master = &omap2xxx_l4_core_hwmod,
  536. .slave = &omap2430_i2c2_hwmod,
  537. .clk = "i2c2_ick",
  538. .addr = omap2_i2c2_addr_space,
  539. .user = OCP_USER_MPU | OCP_USER_SDMA,
  540. };
  541. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  542. {
  543. .pa_start = OMAP243X_HS_BASE,
  544. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  545. .flags = ADDR_TYPE_RT
  546. },
  547. { }
  548. };
  549. /* l4_core ->usbhsotg interface */
  550. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  551. .master = &omap2xxx_l4_core_hwmod,
  552. .slave = &omap2430_usbhsotg_hwmod,
  553. .clk = "usb_l4_ick",
  554. .addr = omap2430_usbhsotg_addrs,
  555. .user = OCP_USER_MPU,
  556. };
  557. /* L4 CORE -> MMC1 interface */
  558. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
  559. .master = &omap2xxx_l4_core_hwmod,
  560. .slave = &omap2430_mmc1_hwmod,
  561. .clk = "mmchs1_ick",
  562. .addr = omap2430_mmc1_addr_space,
  563. .user = OCP_USER_MPU | OCP_USER_SDMA,
  564. };
  565. /* L4 CORE -> MMC2 interface */
  566. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
  567. .master = &omap2xxx_l4_core_hwmod,
  568. .slave = &omap2430_mmc2_hwmod,
  569. .clk = "mmchs2_ick",
  570. .addr = omap2430_mmc2_addr_space,
  571. .user = OCP_USER_MPU | OCP_USER_SDMA,
  572. };
  573. /* l4 core -> mcspi3 interface */
  574. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  575. .master = &omap2xxx_l4_core_hwmod,
  576. .slave = &omap2430_mcspi3_hwmod,
  577. .clk = "mcspi3_ick",
  578. .addr = omap2430_mcspi3_addr_space,
  579. .user = OCP_USER_MPU | OCP_USER_SDMA,
  580. };
  581. /* IVA2 <- L3 interface */
  582. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  583. .master = &omap2xxx_l3_main_hwmod,
  584. .slave = &omap2430_iva_hwmod,
  585. .clk = "core_l3_ck",
  586. .user = OCP_USER_MPU | OCP_USER_SDMA,
  587. };
  588. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  589. {
  590. .pa_start = 0x49018000,
  591. .pa_end = 0x49018000 + SZ_1K - 1,
  592. .flags = ADDR_TYPE_RT
  593. },
  594. { }
  595. };
  596. /* l4_wkup -> timer1 */
  597. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  598. .master = &omap2xxx_l4_wkup_hwmod,
  599. .slave = &omap2xxx_timer1_hwmod,
  600. .clk = "gpt1_ick",
  601. .addr = omap2430_timer1_addrs,
  602. .user = OCP_USER_MPU | OCP_USER_SDMA,
  603. };
  604. /* l4_wkup -> wd_timer2 */
  605. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  606. {
  607. .pa_start = 0x49016000,
  608. .pa_end = 0x4901607f,
  609. .flags = ADDR_TYPE_RT
  610. },
  611. { }
  612. };
  613. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  614. .master = &omap2xxx_l4_wkup_hwmod,
  615. .slave = &omap2xxx_wd_timer2_hwmod,
  616. .clk = "mpu_wdt_ick",
  617. .addr = omap2430_wd_timer2_addrs,
  618. .user = OCP_USER_MPU | OCP_USER_SDMA,
  619. };
  620. /* l4_wkup -> gpio1 */
  621. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  622. {
  623. .pa_start = 0x4900C000,
  624. .pa_end = 0x4900C1ff,
  625. .flags = ADDR_TYPE_RT
  626. },
  627. { }
  628. };
  629. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  630. .master = &omap2xxx_l4_wkup_hwmod,
  631. .slave = &omap2xxx_gpio1_hwmod,
  632. .clk = "gpios_ick",
  633. .addr = omap2430_gpio1_addr_space,
  634. .user = OCP_USER_MPU | OCP_USER_SDMA,
  635. };
  636. /* l4_wkup -> gpio2 */
  637. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  638. {
  639. .pa_start = 0x4900E000,
  640. .pa_end = 0x4900E1ff,
  641. .flags = ADDR_TYPE_RT
  642. },
  643. { }
  644. };
  645. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  646. .master = &omap2xxx_l4_wkup_hwmod,
  647. .slave = &omap2xxx_gpio2_hwmod,
  648. .clk = "gpios_ick",
  649. .addr = omap2430_gpio2_addr_space,
  650. .user = OCP_USER_MPU | OCP_USER_SDMA,
  651. };
  652. /* l4_wkup -> gpio3 */
  653. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  654. {
  655. .pa_start = 0x49010000,
  656. .pa_end = 0x490101ff,
  657. .flags = ADDR_TYPE_RT
  658. },
  659. { }
  660. };
  661. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  662. .master = &omap2xxx_l4_wkup_hwmod,
  663. .slave = &omap2xxx_gpio3_hwmod,
  664. .clk = "gpios_ick",
  665. .addr = omap2430_gpio3_addr_space,
  666. .user = OCP_USER_MPU | OCP_USER_SDMA,
  667. };
  668. /* l4_wkup -> gpio4 */
  669. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  670. {
  671. .pa_start = 0x49012000,
  672. .pa_end = 0x490121ff,
  673. .flags = ADDR_TYPE_RT
  674. },
  675. { }
  676. };
  677. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  678. .master = &omap2xxx_l4_wkup_hwmod,
  679. .slave = &omap2xxx_gpio4_hwmod,
  680. .clk = "gpios_ick",
  681. .addr = omap2430_gpio4_addr_space,
  682. .user = OCP_USER_MPU | OCP_USER_SDMA,
  683. };
  684. /* l4_core -> gpio5 */
  685. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  686. {
  687. .pa_start = 0x480B6000,
  688. .pa_end = 0x480B61ff,
  689. .flags = ADDR_TYPE_RT
  690. },
  691. { }
  692. };
  693. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  694. .master = &omap2xxx_l4_core_hwmod,
  695. .slave = &omap2430_gpio5_hwmod,
  696. .clk = "gpio5_ick",
  697. .addr = omap2430_gpio5_addr_space,
  698. .user = OCP_USER_MPU | OCP_USER_SDMA,
  699. };
  700. /* dma_system -> L3 */
  701. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  702. .master = &omap2430_dma_system_hwmod,
  703. .slave = &omap2xxx_l3_main_hwmod,
  704. .clk = "core_l3_ck",
  705. .user = OCP_USER_MPU | OCP_USER_SDMA,
  706. };
  707. /* l4_core -> dma_system */
  708. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  709. .master = &omap2xxx_l4_core_hwmod,
  710. .slave = &omap2430_dma_system_hwmod,
  711. .clk = "sdma_ick",
  712. .addr = omap2_dma_system_addrs,
  713. .user = OCP_USER_MPU | OCP_USER_SDMA,
  714. };
  715. /* l4_core -> mailbox */
  716. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  717. .master = &omap2xxx_l4_core_hwmod,
  718. .slave = &omap2430_mailbox_hwmod,
  719. .addr = omap2_mailbox_addrs,
  720. .user = OCP_USER_MPU | OCP_USER_SDMA,
  721. };
  722. /* l4_core -> mcbsp1 */
  723. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  724. .master = &omap2xxx_l4_core_hwmod,
  725. .slave = &omap2430_mcbsp1_hwmod,
  726. .clk = "mcbsp1_ick",
  727. .addr = omap2_mcbsp1_addrs,
  728. .user = OCP_USER_MPU | OCP_USER_SDMA,
  729. };
  730. /* l4_core -> mcbsp2 */
  731. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  732. .master = &omap2xxx_l4_core_hwmod,
  733. .slave = &omap2430_mcbsp2_hwmod,
  734. .clk = "mcbsp2_ick",
  735. .addr = omap2xxx_mcbsp2_addrs,
  736. .user = OCP_USER_MPU | OCP_USER_SDMA,
  737. };
  738. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  739. {
  740. .name = "mpu",
  741. .pa_start = 0x4808C000,
  742. .pa_end = 0x4808C0ff,
  743. .flags = ADDR_TYPE_RT
  744. },
  745. { }
  746. };
  747. /* l4_core -> mcbsp3 */
  748. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  749. .master = &omap2xxx_l4_core_hwmod,
  750. .slave = &omap2430_mcbsp3_hwmod,
  751. .clk = "mcbsp3_ick",
  752. .addr = omap2430_mcbsp3_addrs,
  753. .user = OCP_USER_MPU | OCP_USER_SDMA,
  754. };
  755. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  756. {
  757. .name = "mpu",
  758. .pa_start = 0x4808E000,
  759. .pa_end = 0x4808E0ff,
  760. .flags = ADDR_TYPE_RT
  761. },
  762. { }
  763. };
  764. /* l4_core -> mcbsp4 */
  765. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  766. .master = &omap2xxx_l4_core_hwmod,
  767. .slave = &omap2430_mcbsp4_hwmod,
  768. .clk = "mcbsp4_ick",
  769. .addr = omap2430_mcbsp4_addrs,
  770. .user = OCP_USER_MPU | OCP_USER_SDMA,
  771. };
  772. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  773. {
  774. .name = "mpu",
  775. .pa_start = 0x48096000,
  776. .pa_end = 0x480960ff,
  777. .flags = ADDR_TYPE_RT
  778. },
  779. { }
  780. };
  781. /* l4_core -> mcbsp5 */
  782. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  783. .master = &omap2xxx_l4_core_hwmod,
  784. .slave = &omap2430_mcbsp5_hwmod,
  785. .clk = "mcbsp5_ick",
  786. .addr = omap2430_mcbsp5_addrs,
  787. .user = OCP_USER_MPU | OCP_USER_SDMA,
  788. };
  789. /* l4_core -> hdq1w */
  790. static struct omap_hwmod_ocp_if omap2430_l4_core__hdq1w = {
  791. .master = &omap2xxx_l4_core_hwmod,
  792. .slave = &omap2430_hdq1w_hwmod,
  793. .clk = "hdq_ick",
  794. .addr = omap2_hdq1w_addr_space,
  795. .user = OCP_USER_MPU | OCP_USER_SDMA,
  796. .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
  797. };
  798. /* l4_wkup -> 32ksync_counter */
  799. static struct omap_hwmod_addr_space omap2430_counter_32k_addrs[] = {
  800. {
  801. .pa_start = 0x49020000,
  802. .pa_end = 0x4902001f,
  803. .flags = ADDR_TYPE_RT
  804. },
  805. { }
  806. };
  807. static struct omap_hwmod_addr_space omap2430_gpmc_addrs[] = {
  808. {
  809. .pa_start = 0x6e000000,
  810. .pa_end = 0x6e000fff,
  811. .flags = ADDR_TYPE_RT
  812. },
  813. { }
  814. };
  815. static struct omap_hwmod_ocp_if omap2430_l4_wkup__counter_32k = {
  816. .master = &omap2xxx_l4_wkup_hwmod,
  817. .slave = &omap2xxx_counter_32k_hwmod,
  818. .clk = "sync_32k_ick",
  819. .addr = omap2430_counter_32k_addrs,
  820. .user = OCP_USER_MPU | OCP_USER_SDMA,
  821. };
  822. static struct omap_hwmod_ocp_if omap2430_l3__gpmc = {
  823. .master = &omap2xxx_l3_main_hwmod,
  824. .slave = &omap2xxx_gpmc_hwmod,
  825. .clk = "core_l3_ck",
  826. .addr = omap2430_gpmc_addrs,
  827. .user = OCP_USER_MPU | OCP_USER_SDMA,
  828. };
  829. static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
  830. &omap2xxx_l3_main__l4_core,
  831. &omap2xxx_mpu__l3_main,
  832. &omap2xxx_dss__l3,
  833. &omap2430_usbhsotg__l3,
  834. &omap2430_l4_core__i2c1,
  835. &omap2430_l4_core__i2c2,
  836. &omap2xxx_l4_core__l4_wkup,
  837. &omap2_l4_core__uart1,
  838. &omap2_l4_core__uart2,
  839. &omap2_l4_core__uart3,
  840. &omap2430_l4_core__usbhsotg,
  841. &omap2430_l4_core__mmc1,
  842. &omap2430_l4_core__mmc2,
  843. &omap2xxx_l4_core__mcspi1,
  844. &omap2xxx_l4_core__mcspi2,
  845. &omap2430_l4_core__mcspi3,
  846. &omap2430_l3__iva,
  847. &omap2430_l4_wkup__timer1,
  848. &omap2xxx_l4_core__timer2,
  849. &omap2xxx_l4_core__timer3,
  850. &omap2xxx_l4_core__timer4,
  851. &omap2xxx_l4_core__timer5,
  852. &omap2xxx_l4_core__timer6,
  853. &omap2xxx_l4_core__timer7,
  854. &omap2xxx_l4_core__timer8,
  855. &omap2xxx_l4_core__timer9,
  856. &omap2xxx_l4_core__timer10,
  857. &omap2xxx_l4_core__timer11,
  858. &omap2xxx_l4_core__timer12,
  859. &omap2430_l4_wkup__wd_timer2,
  860. &omap2xxx_l4_core__dss,
  861. &omap2xxx_l4_core__dss_dispc,
  862. &omap2xxx_l4_core__dss_rfbi,
  863. &omap2xxx_l4_core__dss_venc,
  864. &omap2430_l4_wkup__gpio1,
  865. &omap2430_l4_wkup__gpio2,
  866. &omap2430_l4_wkup__gpio3,
  867. &omap2430_l4_wkup__gpio4,
  868. &omap2430_l4_core__gpio5,
  869. &omap2430_dma_system__l3,
  870. &omap2430_l4_core__dma_system,
  871. &omap2430_l4_core__mailbox,
  872. &omap2430_l4_core__mcbsp1,
  873. &omap2430_l4_core__mcbsp2,
  874. &omap2430_l4_core__mcbsp3,
  875. &omap2430_l4_core__mcbsp4,
  876. &omap2430_l4_core__mcbsp5,
  877. &omap2430_l4_core__hdq1w,
  878. &omap2xxx_l4_core__rng,
  879. &omap2xxx_l4_core__sham,
  880. &omap2xxx_l4_core__aes,
  881. &omap2430_l4_wkup__counter_32k,
  882. &omap2430_l3__gpmc,
  883. NULL,
  884. };
  885. int __init omap2430_hwmod_init(void)
  886. {
  887. omap_hwmod_init();
  888. return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
  889. }