omap_hwmod_2xxx_ipblock_data.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  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. * 'gpmc' class
  155. * general purpose memory controller
  156. */
  157. static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = {
  158. .rev_offs = 0x0000,
  159. .sysc_offs = 0x0010,
  160. .syss_offs = 0x0014,
  161. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  162. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  163. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  164. .sysc_fields = &omap_hwmod_sysc_type1,
  165. };
  166. static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = {
  167. .name = "gpmc",
  168. .sysc = &omap2xxx_gpmc_sysc,
  169. };
  170. /*
  171. * IP blocks
  172. */
  173. /* L3 */
  174. struct omap_hwmod omap2xxx_l3_main_hwmod = {
  175. .name = "l3_main",
  176. .class = &l3_hwmod_class,
  177. .flags = HWMOD_NO_IDLEST,
  178. };
  179. /* L4 CORE */
  180. struct omap_hwmod omap2xxx_l4_core_hwmod = {
  181. .name = "l4_core",
  182. .class = &l4_hwmod_class,
  183. .flags = HWMOD_NO_IDLEST,
  184. };
  185. /* L4 WKUP */
  186. struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
  187. .name = "l4_wkup",
  188. .class = &l4_hwmod_class,
  189. .flags = HWMOD_NO_IDLEST,
  190. };
  191. /* MPU */
  192. struct omap_hwmod omap2xxx_mpu_hwmod = {
  193. .name = "mpu",
  194. .class = &mpu_hwmod_class,
  195. .main_clk = "mpu_ck",
  196. };
  197. /* IVA2 */
  198. struct omap_hwmod omap2xxx_iva_hwmod = {
  199. .name = "iva",
  200. .class = &iva_hwmod_class,
  201. };
  202. /* always-on timers dev attribute */
  203. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  204. .timer_capability = OMAP_TIMER_ALWON,
  205. };
  206. /* pwm timers dev attribute */
  207. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  208. .timer_capability = OMAP_TIMER_HAS_PWM,
  209. };
  210. /* timers with DSP interrupt dev attribute */
  211. static struct omap_timer_capability_dev_attr capability_dsp_dev_attr = {
  212. .timer_capability = OMAP_TIMER_HAS_DSP_IRQ,
  213. };
  214. /* timer1 */
  215. struct omap_hwmod omap2xxx_timer1_hwmod = {
  216. .name = "timer1",
  217. .mpu_irqs = omap2_timer1_mpu_irqs,
  218. .main_clk = "gpt1_fck",
  219. .prcm = {
  220. .omap2 = {
  221. .prcm_reg_id = 1,
  222. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  223. .module_offs = WKUP_MOD,
  224. .idlest_reg_id = 1,
  225. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  226. },
  227. },
  228. .dev_attr = &capability_alwon_dev_attr,
  229. .class = &omap2xxx_timer_hwmod_class,
  230. };
  231. /* timer2 */
  232. struct omap_hwmod omap2xxx_timer2_hwmod = {
  233. .name = "timer2",
  234. .mpu_irqs = omap2_timer2_mpu_irqs,
  235. .main_clk = "gpt2_fck",
  236. .prcm = {
  237. .omap2 = {
  238. .prcm_reg_id = 1,
  239. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  240. .module_offs = CORE_MOD,
  241. .idlest_reg_id = 1,
  242. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  243. },
  244. },
  245. .class = &omap2xxx_timer_hwmod_class,
  246. };
  247. /* timer3 */
  248. struct omap_hwmod omap2xxx_timer3_hwmod = {
  249. .name = "timer3",
  250. .mpu_irqs = omap2_timer3_mpu_irqs,
  251. .main_clk = "gpt3_fck",
  252. .prcm = {
  253. .omap2 = {
  254. .prcm_reg_id = 1,
  255. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  256. .module_offs = CORE_MOD,
  257. .idlest_reg_id = 1,
  258. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  259. },
  260. },
  261. .class = &omap2xxx_timer_hwmod_class,
  262. };
  263. /* timer4 */
  264. struct omap_hwmod omap2xxx_timer4_hwmod = {
  265. .name = "timer4",
  266. .mpu_irqs = omap2_timer4_mpu_irqs,
  267. .main_clk = "gpt4_fck",
  268. .prcm = {
  269. .omap2 = {
  270. .prcm_reg_id = 1,
  271. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  272. .module_offs = CORE_MOD,
  273. .idlest_reg_id = 1,
  274. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  275. },
  276. },
  277. .class = &omap2xxx_timer_hwmod_class,
  278. };
  279. /* timer5 */
  280. struct omap_hwmod omap2xxx_timer5_hwmod = {
  281. .name = "timer5",
  282. .mpu_irqs = omap2_timer5_mpu_irqs,
  283. .main_clk = "gpt5_fck",
  284. .prcm = {
  285. .omap2 = {
  286. .prcm_reg_id = 1,
  287. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  288. .module_offs = CORE_MOD,
  289. .idlest_reg_id = 1,
  290. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  291. },
  292. },
  293. .dev_attr = &capability_dsp_dev_attr,
  294. .class = &omap2xxx_timer_hwmod_class,
  295. };
  296. /* timer6 */
  297. struct omap_hwmod omap2xxx_timer6_hwmod = {
  298. .name = "timer6",
  299. .mpu_irqs = omap2_timer6_mpu_irqs,
  300. .main_clk = "gpt6_fck",
  301. .prcm = {
  302. .omap2 = {
  303. .prcm_reg_id = 1,
  304. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  305. .module_offs = CORE_MOD,
  306. .idlest_reg_id = 1,
  307. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  308. },
  309. },
  310. .dev_attr = &capability_dsp_dev_attr,
  311. .class = &omap2xxx_timer_hwmod_class,
  312. };
  313. /* timer7 */
  314. struct omap_hwmod omap2xxx_timer7_hwmod = {
  315. .name = "timer7",
  316. .mpu_irqs = omap2_timer7_mpu_irqs,
  317. .main_clk = "gpt7_fck",
  318. .prcm = {
  319. .omap2 = {
  320. .prcm_reg_id = 1,
  321. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  322. .module_offs = CORE_MOD,
  323. .idlest_reg_id = 1,
  324. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  325. },
  326. },
  327. .dev_attr = &capability_dsp_dev_attr,
  328. .class = &omap2xxx_timer_hwmod_class,
  329. };
  330. /* timer8 */
  331. struct omap_hwmod omap2xxx_timer8_hwmod = {
  332. .name = "timer8",
  333. .mpu_irqs = omap2_timer8_mpu_irqs,
  334. .main_clk = "gpt8_fck",
  335. .prcm = {
  336. .omap2 = {
  337. .prcm_reg_id = 1,
  338. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  339. .module_offs = CORE_MOD,
  340. .idlest_reg_id = 1,
  341. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  342. },
  343. },
  344. .dev_attr = &capability_dsp_dev_attr,
  345. .class = &omap2xxx_timer_hwmod_class,
  346. };
  347. /* timer9 */
  348. struct omap_hwmod omap2xxx_timer9_hwmod = {
  349. .name = "timer9",
  350. .mpu_irqs = omap2_timer9_mpu_irqs,
  351. .main_clk = "gpt9_fck",
  352. .prcm = {
  353. .omap2 = {
  354. .prcm_reg_id = 1,
  355. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  356. .module_offs = CORE_MOD,
  357. .idlest_reg_id = 1,
  358. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  359. },
  360. },
  361. .dev_attr = &capability_pwm_dev_attr,
  362. .class = &omap2xxx_timer_hwmod_class,
  363. };
  364. /* timer10 */
  365. struct omap_hwmod omap2xxx_timer10_hwmod = {
  366. .name = "timer10",
  367. .mpu_irqs = omap2_timer10_mpu_irqs,
  368. .main_clk = "gpt10_fck",
  369. .prcm = {
  370. .omap2 = {
  371. .prcm_reg_id = 1,
  372. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  373. .module_offs = CORE_MOD,
  374. .idlest_reg_id = 1,
  375. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  376. },
  377. },
  378. .dev_attr = &capability_pwm_dev_attr,
  379. .class = &omap2xxx_timer_hwmod_class,
  380. };
  381. /* timer11 */
  382. struct omap_hwmod omap2xxx_timer11_hwmod = {
  383. .name = "timer11",
  384. .mpu_irqs = omap2_timer11_mpu_irqs,
  385. .main_clk = "gpt11_fck",
  386. .prcm = {
  387. .omap2 = {
  388. .prcm_reg_id = 1,
  389. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  390. .module_offs = CORE_MOD,
  391. .idlest_reg_id = 1,
  392. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  393. },
  394. },
  395. .dev_attr = &capability_pwm_dev_attr,
  396. .class = &omap2xxx_timer_hwmod_class,
  397. };
  398. /* timer12 */
  399. struct omap_hwmod omap2xxx_timer12_hwmod = {
  400. .name = "timer12",
  401. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  402. .main_clk = "gpt12_fck",
  403. .prcm = {
  404. .omap2 = {
  405. .prcm_reg_id = 1,
  406. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  407. .module_offs = CORE_MOD,
  408. .idlest_reg_id = 1,
  409. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  410. },
  411. },
  412. .dev_attr = &capability_pwm_dev_attr,
  413. .class = &omap2xxx_timer_hwmod_class,
  414. };
  415. /* wd_timer2 */
  416. struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
  417. .name = "wd_timer2",
  418. .class = &omap2xxx_wd_timer_hwmod_class,
  419. .main_clk = "mpu_wdt_fck",
  420. .prcm = {
  421. .omap2 = {
  422. .prcm_reg_id = 1,
  423. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  424. .module_offs = WKUP_MOD,
  425. .idlest_reg_id = 1,
  426. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  427. },
  428. },
  429. };
  430. /* UART1 */
  431. struct omap_hwmod omap2xxx_uart1_hwmod = {
  432. .name = "uart1",
  433. .mpu_irqs = omap2_uart1_mpu_irqs,
  434. .sdma_reqs = omap2_uart1_sdma_reqs,
  435. .main_clk = "uart1_fck",
  436. .prcm = {
  437. .omap2 = {
  438. .module_offs = CORE_MOD,
  439. .prcm_reg_id = 1,
  440. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  441. .idlest_reg_id = 1,
  442. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  443. },
  444. },
  445. .class = &omap2_uart_class,
  446. };
  447. /* UART2 */
  448. struct omap_hwmod omap2xxx_uart2_hwmod = {
  449. .name = "uart2",
  450. .mpu_irqs = omap2_uart2_mpu_irqs,
  451. .sdma_reqs = omap2_uart2_sdma_reqs,
  452. .main_clk = "uart2_fck",
  453. .prcm = {
  454. .omap2 = {
  455. .module_offs = CORE_MOD,
  456. .prcm_reg_id = 1,
  457. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  458. .idlest_reg_id = 1,
  459. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  460. },
  461. },
  462. .class = &omap2_uart_class,
  463. };
  464. /* UART3 */
  465. struct omap_hwmod omap2xxx_uart3_hwmod = {
  466. .name = "uart3",
  467. .mpu_irqs = omap2_uart3_mpu_irqs,
  468. .sdma_reqs = omap2_uart3_sdma_reqs,
  469. .main_clk = "uart3_fck",
  470. .prcm = {
  471. .omap2 = {
  472. .module_offs = CORE_MOD,
  473. .prcm_reg_id = 2,
  474. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  475. .idlest_reg_id = 2,
  476. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  477. },
  478. },
  479. .class = &omap2_uart_class,
  480. };
  481. /* dss */
  482. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  483. /*
  484. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  485. * driver does not use these clocks.
  486. */
  487. { .role = "tv_clk", .clk = "dss_54m_fck" },
  488. { .role = "sys_clk", .clk = "dss2_fck" },
  489. };
  490. struct omap_hwmod omap2xxx_dss_core_hwmod = {
  491. .name = "dss_core",
  492. .class = &omap2_dss_hwmod_class,
  493. .main_clk = "dss1_fck", /* instead of dss_fck */
  494. .sdma_reqs = omap2xxx_dss_sdma_chs,
  495. .prcm = {
  496. .omap2 = {
  497. .prcm_reg_id = 1,
  498. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  499. .module_offs = CORE_MOD,
  500. .idlest_reg_id = 1,
  501. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  502. },
  503. },
  504. .opt_clks = dss_opt_clks,
  505. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  506. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  507. };
  508. struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
  509. .name = "dss_dispc",
  510. .class = &omap2_dispc_hwmod_class,
  511. .mpu_irqs = omap2_dispc_irqs,
  512. .main_clk = "dss1_fck",
  513. .prcm = {
  514. .omap2 = {
  515. .prcm_reg_id = 1,
  516. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  517. .module_offs = CORE_MOD,
  518. .idlest_reg_id = 1,
  519. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  520. },
  521. },
  522. .flags = HWMOD_NO_IDLEST,
  523. .dev_attr = &omap2_3_dss_dispc_dev_attr
  524. };
  525. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  526. { .role = "ick", .clk = "dss_ick" },
  527. };
  528. struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
  529. .name = "dss_rfbi",
  530. .class = &omap2_rfbi_hwmod_class,
  531. .main_clk = "dss1_fck",
  532. .prcm = {
  533. .omap2 = {
  534. .prcm_reg_id = 1,
  535. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  536. .module_offs = CORE_MOD,
  537. },
  538. },
  539. .opt_clks = dss_rfbi_opt_clks,
  540. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  541. .flags = HWMOD_NO_IDLEST,
  542. };
  543. struct omap_hwmod omap2xxx_dss_venc_hwmod = {
  544. .name = "dss_venc",
  545. .class = &omap2_venc_hwmod_class,
  546. .main_clk = "dss_54m_fck",
  547. .prcm = {
  548. .omap2 = {
  549. .prcm_reg_id = 1,
  550. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  551. .module_offs = CORE_MOD,
  552. },
  553. },
  554. .flags = HWMOD_NO_IDLEST,
  555. };
  556. /* gpio dev_attr */
  557. struct omap_gpio_dev_attr omap2xxx_gpio_dev_attr = {
  558. .bank_width = 32,
  559. .dbck_flag = false,
  560. };
  561. /* gpio1 */
  562. struct omap_hwmod omap2xxx_gpio1_hwmod = {
  563. .name = "gpio1",
  564. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  565. .mpu_irqs = omap2_gpio1_irqs,
  566. .main_clk = "gpios_fck",
  567. .prcm = {
  568. .omap2 = {
  569. .prcm_reg_id = 1,
  570. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  571. .module_offs = WKUP_MOD,
  572. .idlest_reg_id = 1,
  573. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  574. },
  575. },
  576. .class = &omap2xxx_gpio_hwmod_class,
  577. .dev_attr = &omap2xxx_gpio_dev_attr,
  578. };
  579. /* gpio2 */
  580. struct omap_hwmod omap2xxx_gpio2_hwmod = {
  581. .name = "gpio2",
  582. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  583. .mpu_irqs = omap2_gpio2_irqs,
  584. .main_clk = "gpios_fck",
  585. .prcm = {
  586. .omap2 = {
  587. .prcm_reg_id = 1,
  588. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  589. .module_offs = WKUP_MOD,
  590. .idlest_reg_id = 1,
  591. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  592. },
  593. },
  594. .class = &omap2xxx_gpio_hwmod_class,
  595. .dev_attr = &omap2xxx_gpio_dev_attr,
  596. };
  597. /* gpio3 */
  598. struct omap_hwmod omap2xxx_gpio3_hwmod = {
  599. .name = "gpio3",
  600. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  601. .mpu_irqs = omap2_gpio3_irqs,
  602. .main_clk = "gpios_fck",
  603. .prcm = {
  604. .omap2 = {
  605. .prcm_reg_id = 1,
  606. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  607. .module_offs = WKUP_MOD,
  608. .idlest_reg_id = 1,
  609. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  610. },
  611. },
  612. .class = &omap2xxx_gpio_hwmod_class,
  613. .dev_attr = &omap2xxx_gpio_dev_attr,
  614. };
  615. /* gpio4 */
  616. struct omap_hwmod omap2xxx_gpio4_hwmod = {
  617. .name = "gpio4",
  618. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  619. .mpu_irqs = omap2_gpio4_irqs,
  620. .main_clk = "gpios_fck",
  621. .prcm = {
  622. .omap2 = {
  623. .prcm_reg_id = 1,
  624. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  625. .module_offs = WKUP_MOD,
  626. .idlest_reg_id = 1,
  627. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  628. },
  629. },
  630. .class = &omap2xxx_gpio_hwmod_class,
  631. .dev_attr = &omap2xxx_gpio_dev_attr,
  632. };
  633. /* mcspi1 */
  634. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  635. .num_chipselect = 4,
  636. };
  637. struct omap_hwmod omap2xxx_mcspi1_hwmod = {
  638. .name = "mcspi1",
  639. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  640. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  641. .main_clk = "mcspi1_fck",
  642. .prcm = {
  643. .omap2 = {
  644. .module_offs = CORE_MOD,
  645. .prcm_reg_id = 1,
  646. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  647. .idlest_reg_id = 1,
  648. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  649. },
  650. },
  651. .class = &omap2xxx_mcspi_class,
  652. .dev_attr = &omap_mcspi1_dev_attr,
  653. };
  654. /* mcspi2 */
  655. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  656. .num_chipselect = 2,
  657. };
  658. struct omap_hwmod omap2xxx_mcspi2_hwmod = {
  659. .name = "mcspi2",
  660. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  661. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  662. .main_clk = "mcspi2_fck",
  663. .prcm = {
  664. .omap2 = {
  665. .module_offs = CORE_MOD,
  666. .prcm_reg_id = 1,
  667. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  668. .idlest_reg_id = 1,
  669. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  670. },
  671. },
  672. .class = &omap2xxx_mcspi_class,
  673. .dev_attr = &omap_mcspi2_dev_attr,
  674. };
  675. static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
  676. .name = "counter",
  677. };
  678. struct omap_hwmod omap2xxx_counter_32k_hwmod = {
  679. .name = "counter_32k",
  680. .main_clk = "func_32k_ck",
  681. .prcm = {
  682. .omap2 = {
  683. .module_offs = WKUP_MOD,
  684. .prcm_reg_id = 1,
  685. .module_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  686. .idlest_reg_id = 1,
  687. .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  688. },
  689. },
  690. .class = &omap2xxx_counter_hwmod_class,
  691. };
  692. /* gpmc */
  693. static struct omap_hwmod_irq_info omap2xxx_gpmc_irqs[] = {
  694. { .irq = 20 },
  695. { .irq = -1 }
  696. };
  697. struct omap_hwmod omap2xxx_gpmc_hwmod = {
  698. .name = "gpmc",
  699. .class = &omap2xxx_gpmc_hwmod_class,
  700. .mpu_irqs = omap2xxx_gpmc_irqs,
  701. .main_clk = "gpmc_fck",
  702. /*
  703. * XXX HWMOD_INIT_NO_RESET should not be needed for this IP
  704. * block. It is not being added due to any known bugs with
  705. * resetting the GPMC IP block, but rather because any timings
  706. * set by the bootloader are not being correctly programmed by
  707. * the kernel from the board file or DT data.
  708. * HWMOD_INIT_NO_RESET should be removed ASAP.
  709. */
  710. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
  711. HWMOD_NO_IDLEST),
  712. .prcm = {
  713. .omap2 = {
  714. .prcm_reg_id = 3,
  715. .module_bit = OMAP24XX_EN_GPMC_MASK,
  716. .module_offs = CORE_MOD,
  717. },
  718. },
  719. };
  720. /* RNG */
  721. static struct omap_hwmod_class_sysconfig omap2_rng_sysc = {
  722. .rev_offs = 0x3c,
  723. .sysc_offs = 0x40,
  724. .syss_offs = 0x44,
  725. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  726. SYSS_HAS_RESET_STATUS),
  727. .sysc_fields = &omap_hwmod_sysc_type1,
  728. };
  729. static struct omap_hwmod_class omap2_rng_hwmod_class = {
  730. .name = "rng",
  731. .sysc = &omap2_rng_sysc,
  732. };
  733. static struct omap_hwmod_irq_info omap2_rng_mpu_irqs[] = {
  734. { .irq = 52 },
  735. { .irq = -1 }
  736. };
  737. struct omap_hwmod omap2xxx_rng_hwmod = {
  738. .name = "rng",
  739. .mpu_irqs = omap2_rng_mpu_irqs,
  740. .main_clk = "l4_ck",
  741. .prcm = {
  742. .omap2 = {
  743. .module_offs = CORE_MOD,
  744. .prcm_reg_id = 4,
  745. .module_bit = OMAP24XX_EN_RNG_SHIFT,
  746. .idlest_reg_id = 4,
  747. .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT,
  748. },
  749. },
  750. /*
  751. * XXX The first read from the SYSSTATUS register of the RNG
  752. * after the SYSCONFIG SOFTRESET bit is set triggers an
  753. * imprecise external abort. It's unclear why this happens.
  754. * Until this is analyzed, skip the IP block reset.
  755. */
  756. .flags = HWMOD_INIT_NO_RESET,
  757. .class = &omap2_rng_hwmod_class,
  758. };