omap_hwmod_2xxx_ipblock_data.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. /*
  2. * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
  3. *
  4. * Copyright (C) 2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <plat/omap_hwmod.h>
  12. #include <plat/serial.h>
  13. #include <plat/gpio.h>
  14. #include <plat/dma.h>
  15. #include <plat/dmtimer.h>
  16. #include <plat/mcspi.h>
  17. #include <mach/irqs.h>
  18. #include "omap_hwmod_common_data.h"
  19. #include "cm-regbits-24xx.h"
  20. #include "prm-regbits-24xx.h"
  21. #include "wd_timer.h"
  22. struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
  23. { .irq = 48, },
  24. { .irq = -1 }
  25. };
  26. struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
  27. { .name = "dispc", .dma_req = 5 },
  28. { .dma_req = -1 }
  29. };
  30. /*
  31. * 'dispc' class
  32. * display controller
  33. */
  34. static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
  35. .rev_offs = 0x0000,
  36. .sysc_offs = 0x0010,
  37. .syss_offs = 0x0014,
  38. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  39. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  40. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  41. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  42. .sysc_fields = &omap_hwmod_sysc_type1,
  43. };
  44. struct omap_hwmod_class omap2_dispc_hwmod_class = {
  45. .name = "dispc",
  46. .sysc = &omap2_dispc_sysc,
  47. };
  48. /* OMAP2xxx Timer Common */
  49. static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
  50. .rev_offs = 0x0000,
  51. .sysc_offs = 0x0010,
  52. .syss_offs = 0x0014,
  53. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  54. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  55. SYSC_HAS_AUTOIDLE),
  56. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  57. .sysc_fields = &omap_hwmod_sysc_type1,
  58. };
  59. struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
  60. .name = "timer",
  61. .sysc = &omap2xxx_timer_sysc,
  62. .rev = OMAP_TIMER_IP_VERSION_1,
  63. };
  64. /*
  65. * 'wd_timer' class
  66. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  67. * overflow condition
  68. */
  69. static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
  70. .rev_offs = 0x0000,
  71. .sysc_offs = 0x0010,
  72. .syss_offs = 0x0014,
  73. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  74. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  75. .sysc_fields = &omap_hwmod_sysc_type1,
  76. };
  77. struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
  78. .name = "wd_timer",
  79. .sysc = &omap2xxx_wd_timer_sysc,
  80. .pre_shutdown = &omap2_wd_timer_disable
  81. };
  82. /*
  83. * 'gpio' class
  84. * general purpose io module
  85. */
  86. static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
  87. .rev_offs = 0x0000,
  88. .sysc_offs = 0x0010,
  89. .syss_offs = 0x0014,
  90. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  91. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  92. SYSS_HAS_RESET_STATUS),
  93. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  94. .sysc_fields = &omap_hwmod_sysc_type1,
  95. };
  96. struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
  97. .name = "gpio",
  98. .sysc = &omap2xxx_gpio_sysc,
  99. .rev = 0,
  100. };
  101. /* system dma */
  102. static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
  103. .rev_offs = 0x0000,
  104. .sysc_offs = 0x002c,
  105. .syss_offs = 0x0028,
  106. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  107. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  108. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  109. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  110. .sysc_fields = &omap_hwmod_sysc_type1,
  111. };
  112. struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
  113. .name = "dma",
  114. .sysc = &omap2xxx_dma_sysc,
  115. };
  116. /*
  117. * 'mailbox' class
  118. * mailbox module allowing communication between the on-chip processors
  119. * using a queued mailbox-interrupt mechanism.
  120. */
  121. static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
  122. .rev_offs = 0x000,
  123. .sysc_offs = 0x010,
  124. .syss_offs = 0x014,
  125. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  126. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  127. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  128. .sysc_fields = &omap_hwmod_sysc_type1,
  129. };
  130. struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
  131. .name = "mailbox",
  132. .sysc = &omap2xxx_mailbox_sysc,
  133. };
  134. /*
  135. * 'mcspi' class
  136. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  137. * bus
  138. */
  139. static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
  140. .rev_offs = 0x0000,
  141. .sysc_offs = 0x0010,
  142. .syss_offs = 0x0014,
  143. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  144. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  145. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  146. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  147. .sysc_fields = &omap_hwmod_sysc_type1,
  148. };
  149. struct omap_hwmod_class omap2xxx_mcspi_class = {
  150. .name = "mcspi",
  151. .sysc = &omap2xxx_mcspi_sysc,
  152. .rev = OMAP2_MCSPI_REV,
  153. };
  154. /*
  155. * IP blocks
  156. */
  157. /* L3 */
  158. struct omap_hwmod omap2xxx_l3_main_hwmod = {
  159. .name = "l3_main",
  160. .class = &l3_hwmod_class,
  161. .flags = HWMOD_NO_IDLEST,
  162. };
  163. /* L4 CORE */
  164. struct omap_hwmod omap2xxx_l4_core_hwmod = {
  165. .name = "l4_core",
  166. .class = &l4_hwmod_class,
  167. .flags = HWMOD_NO_IDLEST,
  168. };
  169. /* L4 WKUP */
  170. struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
  171. .name = "l4_wkup",
  172. .class = &l4_hwmod_class,
  173. .flags = HWMOD_NO_IDLEST,
  174. };
  175. /* MPU */
  176. struct omap_hwmod omap2xxx_mpu_hwmod = {
  177. .name = "mpu",
  178. .class = &mpu_hwmod_class,
  179. .main_clk = "mpu_ck",
  180. };
  181. /* IVA2 */
  182. struct omap_hwmod omap2xxx_iva_hwmod = {
  183. .name = "iva",
  184. .class = &iva_hwmod_class,
  185. };
  186. /* always-on timers dev attribute */
  187. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  188. .timer_capability = OMAP_TIMER_ALWON,
  189. };
  190. /* pwm timers dev attribute */
  191. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  192. .timer_capability = OMAP_TIMER_HAS_PWM,
  193. };
  194. /* timer1 */
  195. struct omap_hwmod omap2xxx_timer1_hwmod = {
  196. .name = "timer1",
  197. .mpu_irqs = omap2_timer1_mpu_irqs,
  198. .main_clk = "gpt1_fck",
  199. .prcm = {
  200. .omap2 = {
  201. .prcm_reg_id = 1,
  202. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  203. .module_offs = WKUP_MOD,
  204. .idlest_reg_id = 1,
  205. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  206. },
  207. },
  208. .dev_attr = &capability_alwon_dev_attr,
  209. .class = &omap2xxx_timer_hwmod_class,
  210. };
  211. /* timer2 */
  212. struct omap_hwmod omap2xxx_timer2_hwmod = {
  213. .name = "timer2",
  214. .mpu_irqs = omap2_timer2_mpu_irqs,
  215. .main_clk = "gpt2_fck",
  216. .prcm = {
  217. .omap2 = {
  218. .prcm_reg_id = 1,
  219. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  220. .module_offs = CORE_MOD,
  221. .idlest_reg_id = 1,
  222. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  223. },
  224. },
  225. .dev_attr = &capability_alwon_dev_attr,
  226. .class = &omap2xxx_timer_hwmod_class,
  227. };
  228. /* timer3 */
  229. struct omap_hwmod omap2xxx_timer3_hwmod = {
  230. .name = "timer3",
  231. .mpu_irqs = omap2_timer3_mpu_irqs,
  232. .main_clk = "gpt3_fck",
  233. .prcm = {
  234. .omap2 = {
  235. .prcm_reg_id = 1,
  236. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  237. .module_offs = CORE_MOD,
  238. .idlest_reg_id = 1,
  239. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  240. },
  241. },
  242. .dev_attr = &capability_alwon_dev_attr,
  243. .class = &omap2xxx_timer_hwmod_class,
  244. };
  245. /* timer4 */
  246. struct omap_hwmod omap2xxx_timer4_hwmod = {
  247. .name = "timer4",
  248. .mpu_irqs = omap2_timer4_mpu_irqs,
  249. .main_clk = "gpt4_fck",
  250. .prcm = {
  251. .omap2 = {
  252. .prcm_reg_id = 1,
  253. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  254. .module_offs = CORE_MOD,
  255. .idlest_reg_id = 1,
  256. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  257. },
  258. },
  259. .dev_attr = &capability_alwon_dev_attr,
  260. .class = &omap2xxx_timer_hwmod_class,
  261. };
  262. /* timer5 */
  263. struct omap_hwmod omap2xxx_timer5_hwmod = {
  264. .name = "timer5",
  265. .mpu_irqs = omap2_timer5_mpu_irqs,
  266. .main_clk = "gpt5_fck",
  267. .prcm = {
  268. .omap2 = {
  269. .prcm_reg_id = 1,
  270. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  271. .module_offs = CORE_MOD,
  272. .idlest_reg_id = 1,
  273. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  274. },
  275. },
  276. .dev_attr = &capability_alwon_dev_attr,
  277. .class = &omap2xxx_timer_hwmod_class,
  278. };
  279. /* timer6 */
  280. struct omap_hwmod omap2xxx_timer6_hwmod = {
  281. .name = "timer6",
  282. .mpu_irqs = omap2_timer6_mpu_irqs,
  283. .main_clk = "gpt6_fck",
  284. .prcm = {
  285. .omap2 = {
  286. .prcm_reg_id = 1,
  287. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  288. .module_offs = CORE_MOD,
  289. .idlest_reg_id = 1,
  290. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  291. },
  292. },
  293. .dev_attr = &capability_alwon_dev_attr,
  294. .class = &omap2xxx_timer_hwmod_class,
  295. };
  296. /* timer7 */
  297. struct omap_hwmod omap2xxx_timer7_hwmod = {
  298. .name = "timer7",
  299. .mpu_irqs = omap2_timer7_mpu_irqs,
  300. .main_clk = "gpt7_fck",
  301. .prcm = {
  302. .omap2 = {
  303. .prcm_reg_id = 1,
  304. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  305. .module_offs = CORE_MOD,
  306. .idlest_reg_id = 1,
  307. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  308. },
  309. },
  310. .dev_attr = &capability_alwon_dev_attr,
  311. .class = &omap2xxx_timer_hwmod_class,
  312. };
  313. /* timer8 */
  314. struct omap_hwmod omap2xxx_timer8_hwmod = {
  315. .name = "timer8",
  316. .mpu_irqs = omap2_timer8_mpu_irqs,
  317. .main_clk = "gpt8_fck",
  318. .prcm = {
  319. .omap2 = {
  320. .prcm_reg_id = 1,
  321. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  322. .module_offs = CORE_MOD,
  323. .idlest_reg_id = 1,
  324. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  325. },
  326. },
  327. .dev_attr = &capability_alwon_dev_attr,
  328. .class = &omap2xxx_timer_hwmod_class,
  329. };
  330. /* timer9 */
  331. struct omap_hwmod omap2xxx_timer9_hwmod = {
  332. .name = "timer9",
  333. .mpu_irqs = omap2_timer9_mpu_irqs,
  334. .main_clk = "gpt9_fck",
  335. .prcm = {
  336. .omap2 = {
  337. .prcm_reg_id = 1,
  338. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  339. .module_offs = CORE_MOD,
  340. .idlest_reg_id = 1,
  341. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  342. },
  343. },
  344. .dev_attr = &capability_pwm_dev_attr,
  345. .class = &omap2xxx_timer_hwmod_class,
  346. };
  347. /* timer10 */
  348. struct omap_hwmod omap2xxx_timer10_hwmod = {
  349. .name = "timer10",
  350. .mpu_irqs = omap2_timer10_mpu_irqs,
  351. .main_clk = "gpt10_fck",
  352. .prcm = {
  353. .omap2 = {
  354. .prcm_reg_id = 1,
  355. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  356. .module_offs = CORE_MOD,
  357. .idlest_reg_id = 1,
  358. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  359. },
  360. },
  361. .dev_attr = &capability_pwm_dev_attr,
  362. .class = &omap2xxx_timer_hwmod_class,
  363. };
  364. /* timer11 */
  365. struct omap_hwmod omap2xxx_timer11_hwmod = {
  366. .name = "timer11",
  367. .mpu_irqs = omap2_timer11_mpu_irqs,
  368. .main_clk = "gpt11_fck",
  369. .prcm = {
  370. .omap2 = {
  371. .prcm_reg_id = 1,
  372. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  373. .module_offs = CORE_MOD,
  374. .idlest_reg_id = 1,
  375. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  376. },
  377. },
  378. .dev_attr = &capability_pwm_dev_attr,
  379. .class = &omap2xxx_timer_hwmod_class,
  380. };
  381. /* timer12 */
  382. struct omap_hwmod omap2xxx_timer12_hwmod = {
  383. .name = "timer12",
  384. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  385. .main_clk = "gpt12_fck",
  386. .prcm = {
  387. .omap2 = {
  388. .prcm_reg_id = 1,
  389. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  390. .module_offs = CORE_MOD,
  391. .idlest_reg_id = 1,
  392. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  393. },
  394. },
  395. .dev_attr = &capability_pwm_dev_attr,
  396. .class = &omap2xxx_timer_hwmod_class,
  397. };
  398. /* wd_timer2 */
  399. struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
  400. .name = "wd_timer2",
  401. .class = &omap2xxx_wd_timer_hwmod_class,
  402. .main_clk = "mpu_wdt_fck",
  403. .prcm = {
  404. .omap2 = {
  405. .prcm_reg_id = 1,
  406. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  407. .module_offs = WKUP_MOD,
  408. .idlest_reg_id = 1,
  409. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  410. },
  411. },
  412. };
  413. /* UART1 */
  414. struct omap_hwmod omap2xxx_uart1_hwmod = {
  415. .name = "uart1",
  416. .mpu_irqs = omap2_uart1_mpu_irqs,
  417. .sdma_reqs = omap2_uart1_sdma_reqs,
  418. .main_clk = "uart1_fck",
  419. .prcm = {
  420. .omap2 = {
  421. .module_offs = CORE_MOD,
  422. .prcm_reg_id = 1,
  423. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  424. .idlest_reg_id = 1,
  425. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  426. },
  427. },
  428. .class = &omap2_uart_class,
  429. };
  430. /* UART2 */
  431. struct omap_hwmod omap2xxx_uart2_hwmod = {
  432. .name = "uart2",
  433. .mpu_irqs = omap2_uart2_mpu_irqs,
  434. .sdma_reqs = omap2_uart2_sdma_reqs,
  435. .main_clk = "uart2_fck",
  436. .prcm = {
  437. .omap2 = {
  438. .module_offs = CORE_MOD,
  439. .prcm_reg_id = 1,
  440. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  441. .idlest_reg_id = 1,
  442. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  443. },
  444. },
  445. .class = &omap2_uart_class,
  446. };
  447. /* UART3 */
  448. struct omap_hwmod omap2xxx_uart3_hwmod = {
  449. .name = "uart3",
  450. .mpu_irqs = omap2_uart3_mpu_irqs,
  451. .sdma_reqs = omap2_uart3_sdma_reqs,
  452. .main_clk = "uart3_fck",
  453. .prcm = {
  454. .omap2 = {
  455. .module_offs = CORE_MOD,
  456. .prcm_reg_id = 2,
  457. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  458. .idlest_reg_id = 2,
  459. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  460. },
  461. },
  462. .class = &omap2_uart_class,
  463. };
  464. /* dss */
  465. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  466. /*
  467. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  468. * driver does not use these clocks.
  469. */
  470. { .role = "tv_clk", .clk = "dss_54m_fck" },
  471. { .role = "sys_clk", .clk = "dss2_fck" },
  472. };
  473. struct omap_hwmod omap2xxx_dss_core_hwmod = {
  474. .name = "dss_core",
  475. .class = &omap2_dss_hwmod_class,
  476. .main_clk = "dss1_fck", /* instead of dss_fck */
  477. .sdma_reqs = omap2xxx_dss_sdma_chs,
  478. .prcm = {
  479. .omap2 = {
  480. .prcm_reg_id = 1,
  481. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  482. .module_offs = CORE_MOD,
  483. .idlest_reg_id = 1,
  484. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  485. },
  486. },
  487. .opt_clks = dss_opt_clks,
  488. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  489. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  490. };
  491. struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
  492. .name = "dss_dispc",
  493. .class = &omap2_dispc_hwmod_class,
  494. .mpu_irqs = omap2_dispc_irqs,
  495. .main_clk = "dss1_fck",
  496. .prcm = {
  497. .omap2 = {
  498. .prcm_reg_id = 1,
  499. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  500. .module_offs = CORE_MOD,
  501. .idlest_reg_id = 1,
  502. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  503. },
  504. },
  505. .flags = HWMOD_NO_IDLEST,
  506. .dev_attr = &omap2_3_dss_dispc_dev_attr
  507. };
  508. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  509. { .role = "ick", .clk = "dss_ick" },
  510. };
  511. struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
  512. .name = "dss_rfbi",
  513. .class = &omap2_rfbi_hwmod_class,
  514. .main_clk = "dss1_fck",
  515. .prcm = {
  516. .omap2 = {
  517. .prcm_reg_id = 1,
  518. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  519. .module_offs = CORE_MOD,
  520. },
  521. },
  522. .opt_clks = dss_rfbi_opt_clks,
  523. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  524. .flags = HWMOD_NO_IDLEST,
  525. };
  526. struct omap_hwmod omap2xxx_dss_venc_hwmod = {
  527. .name = "dss_venc",
  528. .class = &omap2_venc_hwmod_class,
  529. .main_clk = "dss_54m_fck",
  530. .prcm = {
  531. .omap2 = {
  532. .prcm_reg_id = 1,
  533. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  534. .module_offs = CORE_MOD,
  535. },
  536. },
  537. .flags = HWMOD_NO_IDLEST,
  538. };
  539. /* gpio dev_attr */
  540. struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
  541. .bank_width = 32,
  542. .dbck_flag = false,
  543. };
  544. /* gpio1 */
  545. struct omap_hwmod omap2xxx_gpio1_hwmod = {
  546. .name = "gpio1",
  547. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  548. .mpu_irqs = omap2_gpio1_irqs,
  549. .main_clk = "gpios_fck",
  550. .prcm = {
  551. .omap2 = {
  552. .prcm_reg_id = 1,
  553. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  554. .module_offs = WKUP_MOD,
  555. .idlest_reg_id = 1,
  556. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  557. },
  558. },
  559. .class = &omap2xxx_gpio_hwmod_class,
  560. .dev_attr = &omap2xxx_gpio_dev_attr,
  561. };
  562. /* gpio2 */
  563. struct omap_hwmod omap2xxx_gpio2_hwmod = {
  564. .name = "gpio2",
  565. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  566. .mpu_irqs = omap2_gpio2_irqs,
  567. .main_clk = "gpios_fck",
  568. .prcm = {
  569. .omap2 = {
  570. .prcm_reg_id = 1,
  571. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  572. .module_offs = WKUP_MOD,
  573. .idlest_reg_id = 1,
  574. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  575. },
  576. },
  577. .class = &omap2xxx_gpio_hwmod_class,
  578. .dev_attr = &omap2xxx_gpio_dev_attr,
  579. };
  580. /* gpio3 */
  581. struct omap_hwmod omap2xxx_gpio3_hwmod = {
  582. .name = "gpio3",
  583. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  584. .mpu_irqs = omap2_gpio3_irqs,
  585. .main_clk = "gpios_fck",
  586. .prcm = {
  587. .omap2 = {
  588. .prcm_reg_id = 1,
  589. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  590. .module_offs = WKUP_MOD,
  591. .idlest_reg_id = 1,
  592. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  593. },
  594. },
  595. .class = &omap2xxx_gpio_hwmod_class,
  596. .dev_attr = &omap2xxx_gpio_dev_attr,
  597. };
  598. /* gpio4 */
  599. struct omap_hwmod omap2xxx_gpio4_hwmod = {
  600. .name = "gpio4",
  601. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  602. .mpu_irqs = omap2_gpio4_irqs,
  603. .main_clk = "gpios_fck",
  604. .prcm = {
  605. .omap2 = {
  606. .prcm_reg_id = 1,
  607. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  608. .module_offs = WKUP_MOD,
  609. .idlest_reg_id = 1,
  610. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  611. },
  612. },
  613. .class = &omap2xxx_gpio_hwmod_class,
  614. .dev_attr = &omap2xxx_gpio_dev_attr,
  615. };
  616. /* mcspi1 */
  617. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  618. .num_chipselect = 4,
  619. };
  620. struct omap_hwmod omap2xxx_mcspi1_hwmod = {
  621. .name = "mcspi1",
  622. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  623. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  624. .main_clk = "mcspi1_fck",
  625. .prcm = {
  626. .omap2 = {
  627. .module_offs = CORE_MOD,
  628. .prcm_reg_id = 1,
  629. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  630. .idlest_reg_id = 1,
  631. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  632. },
  633. },
  634. .class = &omap2xxx_mcspi_class,
  635. .dev_attr = &omap_mcspi1_dev_attr,
  636. };
  637. /* mcspi2 */
  638. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  639. .num_chipselect = 2,
  640. };
  641. struct omap_hwmod omap2xxx_mcspi2_hwmod = {
  642. .name = "mcspi2",
  643. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  644. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  645. .main_clk = "mcspi2_fck",
  646. .prcm = {
  647. .omap2 = {
  648. .module_offs = CORE_MOD,
  649. .prcm_reg_id = 1,
  650. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  651. .idlest_reg_id = 1,
  652. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  653. },
  654. },
  655. .class = &omap2xxx_mcspi_class,
  656. .dev_attr = &omap_mcspi2_dev_attr,
  657. };
  658. static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
  659. .name = "counter",
  660. };
  661. struct omap_hwmod omap2xxx_counter_32k_hwmod = {
  662. .name = "counter_32k",
  663. .main_clk = "func_32k_ck",
  664. .prcm = {
  665. .omap2 = {
  666. .module_offs = WKUP_MOD,
  667. .prcm_reg_id = 1,
  668. .module_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  669. .idlest_reg_id = 1,
  670. .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  671. },
  672. },
  673. .class = &omap2xxx_counter_hwmod_class,
  674. };