omap_hwmod_2xxx_ipblock_data.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  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. };
  63. /*
  64. * 'wd_timer' class
  65. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  66. * overflow condition
  67. */
  68. static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
  69. .rev_offs = 0x0000,
  70. .sysc_offs = 0x0010,
  71. .syss_offs = 0x0014,
  72. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  73. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  74. .sysc_fields = &omap_hwmod_sysc_type1,
  75. };
  76. struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
  77. .name = "wd_timer",
  78. .sysc = &omap2xxx_wd_timer_sysc,
  79. .pre_shutdown = &omap2_wd_timer_disable,
  80. .reset = &omap2_wd_timer_reset,
  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. .class = &omap2xxx_timer_hwmod_class,
  226. };
  227. /* timer3 */
  228. struct omap_hwmod omap2xxx_timer3_hwmod = {
  229. .name = "timer3",
  230. .mpu_irqs = omap2_timer3_mpu_irqs,
  231. .main_clk = "gpt3_fck",
  232. .prcm = {
  233. .omap2 = {
  234. .prcm_reg_id = 1,
  235. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  236. .module_offs = CORE_MOD,
  237. .idlest_reg_id = 1,
  238. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  239. },
  240. },
  241. .class = &omap2xxx_timer_hwmod_class,
  242. };
  243. /* timer4 */
  244. struct omap_hwmod omap2xxx_timer4_hwmod = {
  245. .name = "timer4",
  246. .mpu_irqs = omap2_timer4_mpu_irqs,
  247. .main_clk = "gpt4_fck",
  248. .prcm = {
  249. .omap2 = {
  250. .prcm_reg_id = 1,
  251. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  252. .module_offs = CORE_MOD,
  253. .idlest_reg_id = 1,
  254. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  255. },
  256. },
  257. .class = &omap2xxx_timer_hwmod_class,
  258. };
  259. /* timer5 */
  260. struct omap_hwmod omap2xxx_timer5_hwmod = {
  261. .name = "timer5",
  262. .mpu_irqs = omap2_timer5_mpu_irqs,
  263. .main_clk = "gpt5_fck",
  264. .prcm = {
  265. .omap2 = {
  266. .prcm_reg_id = 1,
  267. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  268. .module_offs = CORE_MOD,
  269. .idlest_reg_id = 1,
  270. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  271. },
  272. },
  273. .class = &omap2xxx_timer_hwmod_class,
  274. };
  275. /* timer6 */
  276. struct omap_hwmod omap2xxx_timer6_hwmod = {
  277. .name = "timer6",
  278. .mpu_irqs = omap2_timer6_mpu_irqs,
  279. .main_clk = "gpt6_fck",
  280. .prcm = {
  281. .omap2 = {
  282. .prcm_reg_id = 1,
  283. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  284. .module_offs = CORE_MOD,
  285. .idlest_reg_id = 1,
  286. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  287. },
  288. },
  289. .class = &omap2xxx_timer_hwmod_class,
  290. };
  291. /* timer7 */
  292. struct omap_hwmod omap2xxx_timer7_hwmod = {
  293. .name = "timer7",
  294. .mpu_irqs = omap2_timer7_mpu_irqs,
  295. .main_clk = "gpt7_fck",
  296. .prcm = {
  297. .omap2 = {
  298. .prcm_reg_id = 1,
  299. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  300. .module_offs = CORE_MOD,
  301. .idlest_reg_id = 1,
  302. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  303. },
  304. },
  305. .class = &omap2xxx_timer_hwmod_class,
  306. };
  307. /* timer8 */
  308. struct omap_hwmod omap2xxx_timer8_hwmod = {
  309. .name = "timer8",
  310. .mpu_irqs = omap2_timer8_mpu_irqs,
  311. .main_clk = "gpt8_fck",
  312. .prcm = {
  313. .omap2 = {
  314. .prcm_reg_id = 1,
  315. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  316. .module_offs = CORE_MOD,
  317. .idlest_reg_id = 1,
  318. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  319. },
  320. },
  321. .class = &omap2xxx_timer_hwmod_class,
  322. };
  323. /* timer9 */
  324. struct omap_hwmod omap2xxx_timer9_hwmod = {
  325. .name = "timer9",
  326. .mpu_irqs = omap2_timer9_mpu_irqs,
  327. .main_clk = "gpt9_fck",
  328. .prcm = {
  329. .omap2 = {
  330. .prcm_reg_id = 1,
  331. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  332. .module_offs = CORE_MOD,
  333. .idlest_reg_id = 1,
  334. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  335. },
  336. },
  337. .dev_attr = &capability_pwm_dev_attr,
  338. .class = &omap2xxx_timer_hwmod_class,
  339. };
  340. /* timer10 */
  341. struct omap_hwmod omap2xxx_timer10_hwmod = {
  342. .name = "timer10",
  343. .mpu_irqs = omap2_timer10_mpu_irqs,
  344. .main_clk = "gpt10_fck",
  345. .prcm = {
  346. .omap2 = {
  347. .prcm_reg_id = 1,
  348. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  349. .module_offs = CORE_MOD,
  350. .idlest_reg_id = 1,
  351. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  352. },
  353. },
  354. .dev_attr = &capability_pwm_dev_attr,
  355. .class = &omap2xxx_timer_hwmod_class,
  356. };
  357. /* timer11 */
  358. struct omap_hwmod omap2xxx_timer11_hwmod = {
  359. .name = "timer11",
  360. .mpu_irqs = omap2_timer11_mpu_irqs,
  361. .main_clk = "gpt11_fck",
  362. .prcm = {
  363. .omap2 = {
  364. .prcm_reg_id = 1,
  365. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  366. .module_offs = CORE_MOD,
  367. .idlest_reg_id = 1,
  368. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  369. },
  370. },
  371. .dev_attr = &capability_pwm_dev_attr,
  372. .class = &omap2xxx_timer_hwmod_class,
  373. };
  374. /* timer12 */
  375. struct omap_hwmod omap2xxx_timer12_hwmod = {
  376. .name = "timer12",
  377. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  378. .main_clk = "gpt12_fck",
  379. .prcm = {
  380. .omap2 = {
  381. .prcm_reg_id = 1,
  382. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  383. .module_offs = CORE_MOD,
  384. .idlest_reg_id = 1,
  385. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  386. },
  387. },
  388. .dev_attr = &capability_pwm_dev_attr,
  389. .class = &omap2xxx_timer_hwmod_class,
  390. };
  391. /* wd_timer2 */
  392. struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
  393. .name = "wd_timer2",
  394. .class = &omap2xxx_wd_timer_hwmod_class,
  395. .main_clk = "mpu_wdt_fck",
  396. .prcm = {
  397. .omap2 = {
  398. .prcm_reg_id = 1,
  399. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  400. .module_offs = WKUP_MOD,
  401. .idlest_reg_id = 1,
  402. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  403. },
  404. },
  405. };
  406. /* UART1 */
  407. struct omap_hwmod omap2xxx_uart1_hwmod = {
  408. .name = "uart1",
  409. .mpu_irqs = omap2_uart1_mpu_irqs,
  410. .sdma_reqs = omap2_uart1_sdma_reqs,
  411. .main_clk = "uart1_fck",
  412. .prcm = {
  413. .omap2 = {
  414. .module_offs = CORE_MOD,
  415. .prcm_reg_id = 1,
  416. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  417. .idlest_reg_id = 1,
  418. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  419. },
  420. },
  421. .class = &omap2_uart_class,
  422. };
  423. /* UART2 */
  424. struct omap_hwmod omap2xxx_uart2_hwmod = {
  425. .name = "uart2",
  426. .mpu_irqs = omap2_uart2_mpu_irqs,
  427. .sdma_reqs = omap2_uart2_sdma_reqs,
  428. .main_clk = "uart2_fck",
  429. .prcm = {
  430. .omap2 = {
  431. .module_offs = CORE_MOD,
  432. .prcm_reg_id = 1,
  433. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  434. .idlest_reg_id = 1,
  435. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  436. },
  437. },
  438. .class = &omap2_uart_class,
  439. };
  440. /* UART3 */
  441. struct omap_hwmod omap2xxx_uart3_hwmod = {
  442. .name = "uart3",
  443. .mpu_irqs = omap2_uart3_mpu_irqs,
  444. .sdma_reqs = omap2_uart3_sdma_reqs,
  445. .main_clk = "uart3_fck",
  446. .prcm = {
  447. .omap2 = {
  448. .module_offs = CORE_MOD,
  449. .prcm_reg_id = 2,
  450. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  451. .idlest_reg_id = 2,
  452. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  453. },
  454. },
  455. .class = &omap2_uart_class,
  456. };
  457. /* dss */
  458. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  459. /*
  460. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  461. * driver does not use these clocks.
  462. */
  463. { .role = "tv_clk", .clk = "dss_54m_fck" },
  464. { .role = "sys_clk", .clk = "dss2_fck" },
  465. };
  466. struct omap_hwmod omap2xxx_dss_core_hwmod = {
  467. .name = "dss_core",
  468. .class = &omap2_dss_hwmod_class,
  469. .main_clk = "dss1_fck", /* instead of dss_fck */
  470. .sdma_reqs = omap2xxx_dss_sdma_chs,
  471. .prcm = {
  472. .omap2 = {
  473. .prcm_reg_id = 1,
  474. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  475. .module_offs = CORE_MOD,
  476. .idlest_reg_id = 1,
  477. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  478. },
  479. },
  480. .opt_clks = dss_opt_clks,
  481. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  482. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  483. };
  484. struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
  485. .name = "dss_dispc",
  486. .class = &omap2_dispc_hwmod_class,
  487. .mpu_irqs = omap2_dispc_irqs,
  488. .main_clk = "dss1_fck",
  489. .prcm = {
  490. .omap2 = {
  491. .prcm_reg_id = 1,
  492. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  493. .module_offs = CORE_MOD,
  494. .idlest_reg_id = 1,
  495. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  496. },
  497. },
  498. .flags = HWMOD_NO_IDLEST,
  499. .dev_attr = &omap2_3_dss_dispc_dev_attr
  500. };
  501. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  502. { .role = "ick", .clk = "dss_ick" },
  503. };
  504. struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
  505. .name = "dss_rfbi",
  506. .class = &omap2_rfbi_hwmod_class,
  507. .main_clk = "dss1_fck",
  508. .prcm = {
  509. .omap2 = {
  510. .prcm_reg_id = 1,
  511. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  512. .module_offs = CORE_MOD,
  513. },
  514. },
  515. .opt_clks = dss_rfbi_opt_clks,
  516. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  517. .flags = HWMOD_NO_IDLEST,
  518. };
  519. struct omap_hwmod omap2xxx_dss_venc_hwmod = {
  520. .name = "dss_venc",
  521. .class = &omap2_venc_hwmod_class,
  522. .main_clk = "dss_54m_fck",
  523. .prcm = {
  524. .omap2 = {
  525. .prcm_reg_id = 1,
  526. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  527. .module_offs = CORE_MOD,
  528. },
  529. },
  530. .flags = HWMOD_NO_IDLEST,
  531. };
  532. /* gpio dev_attr */
  533. struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
  534. .bank_width = 32,
  535. .dbck_flag = false,
  536. };
  537. /* gpio1 */
  538. struct omap_hwmod omap2xxx_gpio1_hwmod = {
  539. .name = "gpio1",
  540. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  541. .mpu_irqs = omap2_gpio1_irqs,
  542. .main_clk = "gpios_fck",
  543. .prcm = {
  544. .omap2 = {
  545. .prcm_reg_id = 1,
  546. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  547. .module_offs = WKUP_MOD,
  548. .idlest_reg_id = 1,
  549. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  550. },
  551. },
  552. .class = &omap2xxx_gpio_hwmod_class,
  553. .dev_attr = &omap2xxx_gpio_dev_attr,
  554. };
  555. /* gpio2 */
  556. struct omap_hwmod omap2xxx_gpio2_hwmod = {
  557. .name = "gpio2",
  558. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  559. .mpu_irqs = omap2_gpio2_irqs,
  560. .main_clk = "gpios_fck",
  561. .prcm = {
  562. .omap2 = {
  563. .prcm_reg_id = 1,
  564. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  565. .module_offs = WKUP_MOD,
  566. .idlest_reg_id = 1,
  567. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  568. },
  569. },
  570. .class = &omap2xxx_gpio_hwmod_class,
  571. .dev_attr = &omap2xxx_gpio_dev_attr,
  572. };
  573. /* gpio3 */
  574. struct omap_hwmod omap2xxx_gpio3_hwmod = {
  575. .name = "gpio3",
  576. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  577. .mpu_irqs = omap2_gpio3_irqs,
  578. .main_clk = "gpios_fck",
  579. .prcm = {
  580. .omap2 = {
  581. .prcm_reg_id = 1,
  582. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  583. .module_offs = WKUP_MOD,
  584. .idlest_reg_id = 1,
  585. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  586. },
  587. },
  588. .class = &omap2xxx_gpio_hwmod_class,
  589. .dev_attr = &omap2xxx_gpio_dev_attr,
  590. };
  591. /* gpio4 */
  592. struct omap_hwmod omap2xxx_gpio4_hwmod = {
  593. .name = "gpio4",
  594. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  595. .mpu_irqs = omap2_gpio4_irqs,
  596. .main_clk = "gpios_fck",
  597. .prcm = {
  598. .omap2 = {
  599. .prcm_reg_id = 1,
  600. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  601. .module_offs = WKUP_MOD,
  602. .idlest_reg_id = 1,
  603. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  604. },
  605. },
  606. .class = &omap2xxx_gpio_hwmod_class,
  607. .dev_attr = &omap2xxx_gpio_dev_attr,
  608. };
  609. /* mcspi1 */
  610. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  611. .num_chipselect = 4,
  612. };
  613. struct omap_hwmod omap2xxx_mcspi1_hwmod = {
  614. .name = "mcspi1",
  615. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  616. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  617. .main_clk = "mcspi1_fck",
  618. .prcm = {
  619. .omap2 = {
  620. .module_offs = CORE_MOD,
  621. .prcm_reg_id = 1,
  622. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  623. .idlest_reg_id = 1,
  624. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  625. },
  626. },
  627. .class = &omap2xxx_mcspi_class,
  628. .dev_attr = &omap_mcspi1_dev_attr,
  629. };
  630. /* mcspi2 */
  631. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  632. .num_chipselect = 2,
  633. };
  634. struct omap_hwmod omap2xxx_mcspi2_hwmod = {
  635. .name = "mcspi2",
  636. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  637. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  638. .main_clk = "mcspi2_fck",
  639. .prcm = {
  640. .omap2 = {
  641. .module_offs = CORE_MOD,
  642. .prcm_reg_id = 1,
  643. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  644. .idlest_reg_id = 1,
  645. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  646. },
  647. },
  648. .class = &omap2xxx_mcspi_class,
  649. .dev_attr = &omap_mcspi2_dev_attr,
  650. };
  651. static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
  652. .name = "counter",
  653. };
  654. struct omap_hwmod omap2xxx_counter_32k_hwmod = {
  655. .name = "counter_32k",
  656. .main_clk = "func_32k_ck",
  657. .prcm = {
  658. .omap2 = {
  659. .module_offs = WKUP_MOD,
  660. .prcm_reg_id = 1,
  661. .module_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  662. .idlest_reg_id = 1,
  663. .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  664. },
  665. },
  666. .class = &omap2xxx_counter_hwmod_class,
  667. };