omap_hwmod_2xxx_ipblock_data.c 17 KB

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