omap_hwmod_3xxx_data.c 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  1. /*
  2. * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
  3. *
  4. * Copyright (C) 2009-2010 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. * The data in this file should be completely autogeneratable from
  12. * the TI hardware database or other technical documentation.
  13. *
  14. * XXX these should be marked initdata for multi-OMAP kernels
  15. */
  16. #include <plat/omap_hwmod.h>
  17. #include <mach/irqs.h>
  18. #include <plat/cpu.h>
  19. #include <plat/dma.h>
  20. #include <plat/serial.h>
  21. #include <plat/l4_3xxx.h>
  22. #include <plat/i2c.h>
  23. #include <plat/gpio.h>
  24. #include "omap_hwmod_common_data.h"
  25. #include "prm-regbits-34xx.h"
  26. #include "cm-regbits-34xx.h"
  27. #include "wd_timer.h"
  28. /*
  29. * OMAP3xxx hardware module integration data
  30. *
  31. * ALl of the data in this section should be autogeneratable from the
  32. * TI hardware database or other technical documentation. Data that
  33. * is driver-specific or driver-kernel integration-specific belongs
  34. * elsewhere.
  35. */
  36. static struct omap_hwmod omap3xxx_mpu_hwmod;
  37. static struct omap_hwmod omap3xxx_iva_hwmod;
  38. static struct omap_hwmod omap3xxx_l3_main_hwmod;
  39. static struct omap_hwmod omap3xxx_l4_core_hwmod;
  40. static struct omap_hwmod omap3xxx_l4_per_hwmod;
  41. static struct omap_hwmod omap3xxx_wd_timer2_hwmod;
  42. static struct omap_hwmod omap3xxx_i2c1_hwmod;
  43. static struct omap_hwmod omap3xxx_i2c2_hwmod;
  44. static struct omap_hwmod omap3xxx_i2c3_hwmod;
  45. static struct omap_hwmod omap3xxx_gpio1_hwmod;
  46. static struct omap_hwmod omap3xxx_gpio2_hwmod;
  47. static struct omap_hwmod omap3xxx_gpio3_hwmod;
  48. static struct omap_hwmod omap3xxx_gpio4_hwmod;
  49. static struct omap_hwmod omap3xxx_gpio5_hwmod;
  50. static struct omap_hwmod omap3xxx_gpio6_hwmod;
  51. static struct omap_hwmod omap3xxx_dma_system_hwmod;
  52. /* L3 -> L4_CORE interface */
  53. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
  54. .master = &omap3xxx_l3_main_hwmod,
  55. .slave = &omap3xxx_l4_core_hwmod,
  56. .user = OCP_USER_MPU | OCP_USER_SDMA,
  57. };
  58. /* L3 -> L4_PER interface */
  59. static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
  60. .master = &omap3xxx_l3_main_hwmod,
  61. .slave = &omap3xxx_l4_per_hwmod,
  62. .user = OCP_USER_MPU | OCP_USER_SDMA,
  63. };
  64. /* MPU -> L3 interface */
  65. static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
  66. .master = &omap3xxx_mpu_hwmod,
  67. .slave = &omap3xxx_l3_main_hwmod,
  68. .user = OCP_USER_MPU,
  69. };
  70. /* Slave interfaces on the L3 interconnect */
  71. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = {
  72. &omap3xxx_mpu__l3_main,
  73. };
  74. /* Master interfaces on the L3 interconnect */
  75. static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
  76. &omap3xxx_l3_main__l4_core,
  77. &omap3xxx_l3_main__l4_per,
  78. };
  79. /* L3 */
  80. static struct omap_hwmod omap3xxx_l3_main_hwmod = {
  81. .name = "l3_main",
  82. .class = &l3_hwmod_class,
  83. .masters = omap3xxx_l3_main_masters,
  84. .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
  85. .slaves = omap3xxx_l3_main_slaves,
  86. .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_main_slaves),
  87. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  88. .flags = HWMOD_NO_IDLEST,
  89. };
  90. static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
  91. static struct omap_hwmod omap3xxx_uart1_hwmod;
  92. static struct omap_hwmod omap3xxx_uart2_hwmod;
  93. static struct omap_hwmod omap3xxx_uart3_hwmod;
  94. static struct omap_hwmod omap3xxx_uart4_hwmod;
  95. /* L4_CORE -> L4_WKUP interface */
  96. static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
  97. .master = &omap3xxx_l4_core_hwmod,
  98. .slave = &omap3xxx_l4_wkup_hwmod,
  99. .user = OCP_USER_MPU | OCP_USER_SDMA,
  100. };
  101. /* L4 CORE -> UART1 interface */
  102. static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
  103. {
  104. .pa_start = OMAP3_UART1_BASE,
  105. .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
  106. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  107. },
  108. };
  109. static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
  110. .master = &omap3xxx_l4_core_hwmod,
  111. .slave = &omap3xxx_uart1_hwmod,
  112. .clk = "uart1_ick",
  113. .addr = omap3xxx_uart1_addr_space,
  114. .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
  115. .user = OCP_USER_MPU | OCP_USER_SDMA,
  116. };
  117. /* L4 CORE -> UART2 interface */
  118. static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
  119. {
  120. .pa_start = OMAP3_UART2_BASE,
  121. .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
  122. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  123. },
  124. };
  125. static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
  126. .master = &omap3xxx_l4_core_hwmod,
  127. .slave = &omap3xxx_uart2_hwmod,
  128. .clk = "uart2_ick",
  129. .addr = omap3xxx_uart2_addr_space,
  130. .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
  131. .user = OCP_USER_MPU | OCP_USER_SDMA,
  132. };
  133. /* L4 PER -> UART3 interface */
  134. static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
  135. {
  136. .pa_start = OMAP3_UART3_BASE,
  137. .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
  138. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  139. },
  140. };
  141. static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
  142. .master = &omap3xxx_l4_per_hwmod,
  143. .slave = &omap3xxx_uart3_hwmod,
  144. .clk = "uart3_ick",
  145. .addr = omap3xxx_uart3_addr_space,
  146. .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
  147. .user = OCP_USER_MPU | OCP_USER_SDMA,
  148. };
  149. /* L4 PER -> UART4 interface */
  150. static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
  151. {
  152. .pa_start = OMAP3_UART4_BASE,
  153. .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
  154. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  155. },
  156. };
  157. static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
  158. .master = &omap3xxx_l4_per_hwmod,
  159. .slave = &omap3xxx_uart4_hwmod,
  160. .clk = "uart4_ick",
  161. .addr = omap3xxx_uart4_addr_space,
  162. .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
  163. .user = OCP_USER_MPU | OCP_USER_SDMA,
  164. };
  165. /* I2C IP block address space length (in bytes) */
  166. #define OMAP2_I2C_AS_LEN 128
  167. /* L4 CORE -> I2C1 interface */
  168. static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
  169. {
  170. .pa_start = 0x48070000,
  171. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  172. .flags = ADDR_TYPE_RT,
  173. },
  174. };
  175. static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
  176. .master = &omap3xxx_l4_core_hwmod,
  177. .slave = &omap3xxx_i2c1_hwmod,
  178. .clk = "i2c1_ick",
  179. .addr = omap3xxx_i2c1_addr_space,
  180. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
  181. .fw = {
  182. .omap2 = {
  183. .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
  184. .l4_prot_group = 7,
  185. .flags = OMAP_FIREWALL_L4,
  186. }
  187. },
  188. .user = OCP_USER_MPU | OCP_USER_SDMA,
  189. };
  190. /* L4 CORE -> I2C2 interface */
  191. static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
  192. {
  193. .pa_start = 0x48072000,
  194. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  195. .flags = ADDR_TYPE_RT,
  196. },
  197. };
  198. static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
  199. .master = &omap3xxx_l4_core_hwmod,
  200. .slave = &omap3xxx_i2c2_hwmod,
  201. .clk = "i2c2_ick",
  202. .addr = omap3xxx_i2c2_addr_space,
  203. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
  204. .fw = {
  205. .omap2 = {
  206. .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
  207. .l4_prot_group = 7,
  208. .flags = OMAP_FIREWALL_L4,
  209. }
  210. },
  211. .user = OCP_USER_MPU | OCP_USER_SDMA,
  212. };
  213. /* L4 CORE -> I2C3 interface */
  214. static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
  215. {
  216. .pa_start = 0x48060000,
  217. .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1,
  218. .flags = ADDR_TYPE_RT,
  219. },
  220. };
  221. static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
  222. .master = &omap3xxx_l4_core_hwmod,
  223. .slave = &omap3xxx_i2c3_hwmod,
  224. .clk = "i2c3_ick",
  225. .addr = omap3xxx_i2c3_addr_space,
  226. .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
  227. .fw = {
  228. .omap2 = {
  229. .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
  230. .l4_prot_group = 7,
  231. .flags = OMAP_FIREWALL_L4,
  232. }
  233. },
  234. .user = OCP_USER_MPU | OCP_USER_SDMA,
  235. };
  236. /* Slave interfaces on the L4_CORE interconnect */
  237. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
  238. &omap3xxx_l3_main__l4_core,
  239. };
  240. /* Master interfaces on the L4_CORE interconnect */
  241. static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = {
  242. &omap3xxx_l4_core__l4_wkup,
  243. &omap3_l4_core__uart1,
  244. &omap3_l4_core__uart2,
  245. &omap3_l4_core__i2c1,
  246. &omap3_l4_core__i2c2,
  247. &omap3_l4_core__i2c3,
  248. };
  249. /* L4 CORE */
  250. static struct omap_hwmod omap3xxx_l4_core_hwmod = {
  251. .name = "l4_core",
  252. .class = &l4_hwmod_class,
  253. .masters = omap3xxx_l4_core_masters,
  254. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters),
  255. .slaves = omap3xxx_l4_core_slaves,
  256. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves),
  257. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  258. .flags = HWMOD_NO_IDLEST,
  259. };
  260. /* Slave interfaces on the L4_PER interconnect */
  261. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
  262. &omap3xxx_l3_main__l4_per,
  263. };
  264. /* Master interfaces on the L4_PER interconnect */
  265. static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
  266. &omap3_l4_per__uart3,
  267. &omap3_l4_per__uart4,
  268. };
  269. /* L4 PER */
  270. static struct omap_hwmod omap3xxx_l4_per_hwmod = {
  271. .name = "l4_per",
  272. .class = &l4_hwmod_class,
  273. .masters = omap3xxx_l4_per_masters,
  274. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters),
  275. .slaves = omap3xxx_l4_per_slaves,
  276. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves),
  277. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  278. .flags = HWMOD_NO_IDLEST,
  279. };
  280. /* Slave interfaces on the L4_WKUP interconnect */
  281. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = {
  282. &omap3xxx_l4_core__l4_wkup,
  283. };
  284. /* Master interfaces on the L4_WKUP interconnect */
  285. static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = {
  286. };
  287. /* L4 WKUP */
  288. static struct omap_hwmod omap3xxx_l4_wkup_hwmod = {
  289. .name = "l4_wkup",
  290. .class = &l4_hwmod_class,
  291. .masters = omap3xxx_l4_wkup_masters,
  292. .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters),
  293. .slaves = omap3xxx_l4_wkup_slaves,
  294. .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves),
  295. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  296. .flags = HWMOD_NO_IDLEST,
  297. };
  298. /* Master interfaces on the MPU device */
  299. static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = {
  300. &omap3xxx_mpu__l3_main,
  301. };
  302. /* MPU */
  303. static struct omap_hwmod omap3xxx_mpu_hwmod = {
  304. .name = "mpu",
  305. .class = &mpu_hwmod_class,
  306. .main_clk = "arm_fck",
  307. .masters = omap3xxx_mpu_masters,
  308. .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters),
  309. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  310. };
  311. /*
  312. * IVA2_2 interface data
  313. */
  314. /* IVA2 <- L3 interface */
  315. static struct omap_hwmod_ocp_if omap3xxx_l3__iva = {
  316. .master = &omap3xxx_l3_main_hwmod,
  317. .slave = &omap3xxx_iva_hwmod,
  318. .clk = "iva2_ck",
  319. .user = OCP_USER_MPU | OCP_USER_SDMA,
  320. };
  321. static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = {
  322. &omap3xxx_l3__iva,
  323. };
  324. /*
  325. * IVA2 (IVA2)
  326. */
  327. static struct omap_hwmod omap3xxx_iva_hwmod = {
  328. .name = "iva",
  329. .class = &iva_hwmod_class,
  330. .masters = omap3xxx_iva_masters,
  331. .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters),
  332. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430)
  333. };
  334. /* l4_wkup -> wd_timer2 */
  335. static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
  336. {
  337. .pa_start = 0x48314000,
  338. .pa_end = 0x4831407f,
  339. .flags = ADDR_TYPE_RT
  340. },
  341. };
  342. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
  343. .master = &omap3xxx_l4_wkup_hwmod,
  344. .slave = &omap3xxx_wd_timer2_hwmod,
  345. .clk = "wdt2_ick",
  346. .addr = omap3xxx_wd_timer2_addrs,
  347. .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
  348. .user = OCP_USER_MPU | OCP_USER_SDMA,
  349. };
  350. /*
  351. * 'wd_timer' class
  352. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  353. * overflow condition
  354. */
  355. static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = {
  356. .rev_offs = 0x0000,
  357. .sysc_offs = 0x0010,
  358. .syss_offs = 0x0014,
  359. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE |
  360. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  361. SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY),
  362. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  363. .sysc_fields = &omap_hwmod_sysc_type1,
  364. };
  365. /* I2C common */
  366. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  367. .rev_offs = 0x00,
  368. .sysc_offs = 0x20,
  369. .syss_offs = 0x10,
  370. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  371. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  372. SYSC_HAS_AUTOIDLE),
  373. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  374. .sysc_fields = &omap_hwmod_sysc_type1,
  375. };
  376. static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = {
  377. .name = "wd_timer",
  378. .sysc = &omap3xxx_wd_timer_sysc,
  379. .pre_shutdown = &omap2_wd_timer_disable
  380. };
  381. /* wd_timer2 */
  382. static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = {
  383. &omap3xxx_l4_wkup__wd_timer2,
  384. };
  385. static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
  386. .name = "wd_timer2",
  387. .class = &omap3xxx_wd_timer_hwmod_class,
  388. .main_clk = "wdt2_fck",
  389. .prcm = {
  390. .omap2 = {
  391. .prcm_reg_id = 1,
  392. .module_bit = OMAP3430_EN_WDT2_SHIFT,
  393. .module_offs = WKUP_MOD,
  394. .idlest_reg_id = 1,
  395. .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT,
  396. },
  397. },
  398. .slaves = omap3xxx_wd_timer2_slaves,
  399. .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves),
  400. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  401. };
  402. /* UART common */
  403. static struct omap_hwmod_class_sysconfig uart_sysc = {
  404. .rev_offs = 0x50,
  405. .sysc_offs = 0x54,
  406. .syss_offs = 0x58,
  407. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  408. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  409. SYSC_HAS_AUTOIDLE),
  410. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  411. .sysc_fields = &omap_hwmod_sysc_type1,
  412. };
  413. static struct omap_hwmod_class uart_class = {
  414. .name = "uart",
  415. .sysc = &uart_sysc,
  416. };
  417. /* UART1 */
  418. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  419. { .irq = INT_24XX_UART1_IRQ, },
  420. };
  421. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  422. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  423. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  424. };
  425. static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
  426. &omap3_l4_core__uart1,
  427. };
  428. static struct omap_hwmod omap3xxx_uart1_hwmod = {
  429. .name = "uart1",
  430. .mpu_irqs = uart1_mpu_irqs,
  431. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  432. .sdma_reqs = uart1_sdma_reqs,
  433. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  434. .main_clk = "uart1_fck",
  435. .prcm = {
  436. .omap2 = {
  437. .module_offs = CORE_MOD,
  438. .prcm_reg_id = 1,
  439. .module_bit = OMAP3430_EN_UART1_SHIFT,
  440. .idlest_reg_id = 1,
  441. .idlest_idle_bit = OMAP3430_EN_UART1_SHIFT,
  442. },
  443. },
  444. .slaves = omap3xxx_uart1_slaves,
  445. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
  446. .class = &uart_class,
  447. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  448. };
  449. /* UART2 */
  450. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  451. { .irq = INT_24XX_UART2_IRQ, },
  452. };
  453. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  454. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  455. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  456. };
  457. static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
  458. &omap3_l4_core__uart2,
  459. };
  460. static struct omap_hwmod omap3xxx_uart2_hwmod = {
  461. .name = "uart2",
  462. .mpu_irqs = uart2_mpu_irqs,
  463. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  464. .sdma_reqs = uart2_sdma_reqs,
  465. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  466. .main_clk = "uart2_fck",
  467. .prcm = {
  468. .omap2 = {
  469. .module_offs = CORE_MOD,
  470. .prcm_reg_id = 1,
  471. .module_bit = OMAP3430_EN_UART2_SHIFT,
  472. .idlest_reg_id = 1,
  473. .idlest_idle_bit = OMAP3430_EN_UART2_SHIFT,
  474. },
  475. },
  476. .slaves = omap3xxx_uart2_slaves,
  477. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
  478. .class = &uart_class,
  479. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  480. };
  481. /* UART3 */
  482. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  483. { .irq = INT_24XX_UART3_IRQ, },
  484. };
  485. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  486. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  487. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  488. };
  489. static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
  490. &omap3_l4_per__uart3,
  491. };
  492. static struct omap_hwmod omap3xxx_uart3_hwmod = {
  493. .name = "uart3",
  494. .mpu_irqs = uart3_mpu_irqs,
  495. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  496. .sdma_reqs = uart3_sdma_reqs,
  497. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  498. .main_clk = "uart3_fck",
  499. .prcm = {
  500. .omap2 = {
  501. .module_offs = OMAP3430_PER_MOD,
  502. .prcm_reg_id = 1,
  503. .module_bit = OMAP3430_EN_UART3_SHIFT,
  504. .idlest_reg_id = 1,
  505. .idlest_idle_bit = OMAP3430_EN_UART3_SHIFT,
  506. },
  507. },
  508. .slaves = omap3xxx_uart3_slaves,
  509. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
  510. .class = &uart_class,
  511. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  512. };
  513. /* UART4 */
  514. static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
  515. { .irq = INT_36XX_UART4_IRQ, },
  516. };
  517. static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
  518. { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
  519. { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
  520. };
  521. static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
  522. &omap3_l4_per__uart4,
  523. };
  524. static struct omap_hwmod omap3xxx_uart4_hwmod = {
  525. .name = "uart4",
  526. .mpu_irqs = uart4_mpu_irqs,
  527. .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
  528. .sdma_reqs = uart4_sdma_reqs,
  529. .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
  530. .main_clk = "uart4_fck",
  531. .prcm = {
  532. .omap2 = {
  533. .module_offs = OMAP3430_PER_MOD,
  534. .prcm_reg_id = 1,
  535. .module_bit = OMAP3630_EN_UART4_SHIFT,
  536. .idlest_reg_id = 1,
  537. .idlest_idle_bit = OMAP3630_EN_UART4_SHIFT,
  538. },
  539. },
  540. .slaves = omap3xxx_uart4_slaves,
  541. .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
  542. .class = &uart_class,
  543. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
  544. };
  545. static struct omap_hwmod_class i2c_class = {
  546. .name = "i2c",
  547. .sysc = &i2c_sysc,
  548. };
  549. /* I2C1 */
  550. static struct omap_i2c_dev_attr i2c1_dev_attr = {
  551. .fifo_depth = 8, /* bytes */
  552. };
  553. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  554. { .irq = INT_24XX_I2C1_IRQ, },
  555. };
  556. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  557. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  558. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  559. };
  560. static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
  561. &omap3_l4_core__i2c1,
  562. };
  563. static struct omap_hwmod omap3xxx_i2c1_hwmod = {
  564. .name = "i2c1",
  565. .mpu_irqs = i2c1_mpu_irqs,
  566. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  567. .sdma_reqs = i2c1_sdma_reqs,
  568. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  569. .main_clk = "i2c1_fck",
  570. .prcm = {
  571. .omap2 = {
  572. .module_offs = CORE_MOD,
  573. .prcm_reg_id = 1,
  574. .module_bit = OMAP3430_EN_I2C1_SHIFT,
  575. .idlest_reg_id = 1,
  576. .idlest_idle_bit = OMAP3430_ST_I2C1_SHIFT,
  577. },
  578. },
  579. .slaves = omap3xxx_i2c1_slaves,
  580. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c1_slaves),
  581. .class = &i2c_class,
  582. .dev_attr = &i2c1_dev_attr,
  583. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  584. };
  585. /* I2C2 */
  586. static struct omap_i2c_dev_attr i2c2_dev_attr = {
  587. .fifo_depth = 8, /* bytes */
  588. };
  589. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  590. { .irq = INT_24XX_I2C2_IRQ, },
  591. };
  592. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  593. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  594. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  595. };
  596. static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
  597. &omap3_l4_core__i2c2,
  598. };
  599. static struct omap_hwmod omap3xxx_i2c2_hwmod = {
  600. .name = "i2c2",
  601. .mpu_irqs = i2c2_mpu_irqs,
  602. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  603. .sdma_reqs = i2c2_sdma_reqs,
  604. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  605. .main_clk = "i2c2_fck",
  606. .prcm = {
  607. .omap2 = {
  608. .module_offs = CORE_MOD,
  609. .prcm_reg_id = 1,
  610. .module_bit = OMAP3430_EN_I2C2_SHIFT,
  611. .idlest_reg_id = 1,
  612. .idlest_idle_bit = OMAP3430_ST_I2C2_SHIFT,
  613. },
  614. },
  615. .slaves = omap3xxx_i2c2_slaves,
  616. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c2_slaves),
  617. .class = &i2c_class,
  618. .dev_attr = &i2c2_dev_attr,
  619. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  620. };
  621. /* I2C3 */
  622. static struct omap_i2c_dev_attr i2c3_dev_attr = {
  623. .fifo_depth = 64, /* bytes */
  624. };
  625. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  626. { .irq = INT_34XX_I2C3_IRQ, },
  627. };
  628. static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
  629. { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
  630. { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
  631. };
  632. static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
  633. &omap3_l4_core__i2c3,
  634. };
  635. static struct omap_hwmod omap3xxx_i2c3_hwmod = {
  636. .name = "i2c3",
  637. .mpu_irqs = i2c3_mpu_irqs,
  638. .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
  639. .sdma_reqs = i2c3_sdma_reqs,
  640. .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
  641. .main_clk = "i2c3_fck",
  642. .prcm = {
  643. .omap2 = {
  644. .module_offs = CORE_MOD,
  645. .prcm_reg_id = 1,
  646. .module_bit = OMAP3430_EN_I2C3_SHIFT,
  647. .idlest_reg_id = 1,
  648. .idlest_idle_bit = OMAP3430_ST_I2C3_SHIFT,
  649. },
  650. },
  651. .slaves = omap3xxx_i2c3_slaves,
  652. .slaves_cnt = ARRAY_SIZE(omap3xxx_i2c3_slaves),
  653. .class = &i2c_class,
  654. .dev_attr = &i2c3_dev_attr,
  655. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  656. };
  657. /* l4_wkup -> gpio1 */
  658. static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
  659. {
  660. .pa_start = 0x48310000,
  661. .pa_end = 0x483101ff,
  662. .flags = ADDR_TYPE_RT
  663. },
  664. };
  665. static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
  666. .master = &omap3xxx_l4_wkup_hwmod,
  667. .slave = &omap3xxx_gpio1_hwmod,
  668. .addr = omap3xxx_gpio1_addrs,
  669. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
  670. .user = OCP_USER_MPU | OCP_USER_SDMA,
  671. };
  672. /* l4_per -> gpio2 */
  673. static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
  674. {
  675. .pa_start = 0x49050000,
  676. .pa_end = 0x490501ff,
  677. .flags = ADDR_TYPE_RT
  678. },
  679. };
  680. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
  681. .master = &omap3xxx_l4_per_hwmod,
  682. .slave = &omap3xxx_gpio2_hwmod,
  683. .addr = omap3xxx_gpio2_addrs,
  684. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
  685. .user = OCP_USER_MPU | OCP_USER_SDMA,
  686. };
  687. /* l4_per -> gpio3 */
  688. static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
  689. {
  690. .pa_start = 0x49052000,
  691. .pa_end = 0x490521ff,
  692. .flags = ADDR_TYPE_RT
  693. },
  694. };
  695. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
  696. .master = &omap3xxx_l4_per_hwmod,
  697. .slave = &omap3xxx_gpio3_hwmod,
  698. .addr = omap3xxx_gpio3_addrs,
  699. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
  700. .user = OCP_USER_MPU | OCP_USER_SDMA,
  701. };
  702. /* l4_per -> gpio4 */
  703. static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
  704. {
  705. .pa_start = 0x49054000,
  706. .pa_end = 0x490541ff,
  707. .flags = ADDR_TYPE_RT
  708. },
  709. };
  710. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
  711. .master = &omap3xxx_l4_per_hwmod,
  712. .slave = &omap3xxx_gpio4_hwmod,
  713. .addr = omap3xxx_gpio4_addrs,
  714. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
  715. .user = OCP_USER_MPU | OCP_USER_SDMA,
  716. };
  717. /* l4_per -> gpio5 */
  718. static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
  719. {
  720. .pa_start = 0x49056000,
  721. .pa_end = 0x490561ff,
  722. .flags = ADDR_TYPE_RT
  723. },
  724. };
  725. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
  726. .master = &omap3xxx_l4_per_hwmod,
  727. .slave = &omap3xxx_gpio5_hwmod,
  728. .addr = omap3xxx_gpio5_addrs,
  729. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
  730. .user = OCP_USER_MPU | OCP_USER_SDMA,
  731. };
  732. /* l4_per -> gpio6 */
  733. static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
  734. {
  735. .pa_start = 0x49058000,
  736. .pa_end = 0x490581ff,
  737. .flags = ADDR_TYPE_RT
  738. },
  739. };
  740. static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
  741. .master = &omap3xxx_l4_per_hwmod,
  742. .slave = &omap3xxx_gpio6_hwmod,
  743. .addr = omap3xxx_gpio6_addrs,
  744. .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
  745. .user = OCP_USER_MPU | OCP_USER_SDMA,
  746. };
  747. /*
  748. * 'gpio' class
  749. * general purpose io module
  750. */
  751. static struct omap_hwmod_class_sysconfig omap3xxx_gpio_sysc = {
  752. .rev_offs = 0x0000,
  753. .sysc_offs = 0x0010,
  754. .syss_offs = 0x0014,
  755. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  756. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  757. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  758. .sysc_fields = &omap_hwmod_sysc_type1,
  759. };
  760. static struct omap_hwmod_class omap3xxx_gpio_hwmod_class = {
  761. .name = "gpio",
  762. .sysc = &omap3xxx_gpio_sysc,
  763. .rev = 1,
  764. };
  765. /* gpio_dev_attr*/
  766. static struct omap_gpio_dev_attr gpio_dev_attr = {
  767. .bank_width = 32,
  768. .dbck_flag = true,
  769. };
  770. /* gpio1 */
  771. static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
  772. { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
  773. };
  774. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  775. { .role = "dbclk", .clk = "gpio1_dbck", },
  776. };
  777. static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
  778. &omap3xxx_l4_wkup__gpio1,
  779. };
  780. static struct omap_hwmod omap3xxx_gpio1_hwmod = {
  781. .name = "gpio1",
  782. .mpu_irqs = omap3xxx_gpio1_irqs,
  783. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
  784. .main_clk = "gpio1_ick",
  785. .opt_clks = gpio1_opt_clks,
  786. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  787. .prcm = {
  788. .omap2 = {
  789. .prcm_reg_id = 1,
  790. .module_bit = OMAP3430_EN_GPIO1_SHIFT,
  791. .module_offs = WKUP_MOD,
  792. .idlest_reg_id = 1,
  793. .idlest_idle_bit = OMAP3430_ST_GPIO1_SHIFT,
  794. },
  795. },
  796. .slaves = omap3xxx_gpio1_slaves,
  797. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio1_slaves),
  798. .class = &omap3xxx_gpio_hwmod_class,
  799. .dev_attr = &gpio_dev_attr,
  800. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  801. };
  802. /* gpio2 */
  803. static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
  804. { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
  805. };
  806. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  807. { .role = "dbclk", .clk = "gpio2_dbck", },
  808. };
  809. static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
  810. &omap3xxx_l4_per__gpio2,
  811. };
  812. static struct omap_hwmod omap3xxx_gpio2_hwmod = {
  813. .name = "gpio2",
  814. .mpu_irqs = omap3xxx_gpio2_irqs,
  815. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
  816. .main_clk = "gpio2_ick",
  817. .opt_clks = gpio2_opt_clks,
  818. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  819. .prcm = {
  820. .omap2 = {
  821. .prcm_reg_id = 1,
  822. .module_bit = OMAP3430_EN_GPIO2_SHIFT,
  823. .module_offs = OMAP3430_PER_MOD,
  824. .idlest_reg_id = 1,
  825. .idlest_idle_bit = OMAP3430_ST_GPIO2_SHIFT,
  826. },
  827. },
  828. .slaves = omap3xxx_gpio2_slaves,
  829. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio2_slaves),
  830. .class = &omap3xxx_gpio_hwmod_class,
  831. .dev_attr = &gpio_dev_attr,
  832. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  833. };
  834. /* gpio3 */
  835. static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
  836. { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
  837. };
  838. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  839. { .role = "dbclk", .clk = "gpio3_dbck", },
  840. };
  841. static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
  842. &omap3xxx_l4_per__gpio3,
  843. };
  844. static struct omap_hwmod omap3xxx_gpio3_hwmod = {
  845. .name = "gpio3",
  846. .mpu_irqs = omap3xxx_gpio3_irqs,
  847. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
  848. .main_clk = "gpio3_ick",
  849. .opt_clks = gpio3_opt_clks,
  850. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  851. .prcm = {
  852. .omap2 = {
  853. .prcm_reg_id = 1,
  854. .module_bit = OMAP3430_EN_GPIO3_SHIFT,
  855. .module_offs = OMAP3430_PER_MOD,
  856. .idlest_reg_id = 1,
  857. .idlest_idle_bit = OMAP3430_ST_GPIO3_SHIFT,
  858. },
  859. },
  860. .slaves = omap3xxx_gpio3_slaves,
  861. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio3_slaves),
  862. .class = &omap3xxx_gpio_hwmod_class,
  863. .dev_attr = &gpio_dev_attr,
  864. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  865. };
  866. /* gpio4 */
  867. static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
  868. { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
  869. };
  870. static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
  871. { .role = "dbclk", .clk = "gpio4_dbck", },
  872. };
  873. static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
  874. &omap3xxx_l4_per__gpio4,
  875. };
  876. static struct omap_hwmod omap3xxx_gpio4_hwmod = {
  877. .name = "gpio4",
  878. .mpu_irqs = omap3xxx_gpio4_irqs,
  879. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
  880. .main_clk = "gpio4_ick",
  881. .opt_clks = gpio4_opt_clks,
  882. .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
  883. .prcm = {
  884. .omap2 = {
  885. .prcm_reg_id = 1,
  886. .module_bit = OMAP3430_EN_GPIO4_SHIFT,
  887. .module_offs = OMAP3430_PER_MOD,
  888. .idlest_reg_id = 1,
  889. .idlest_idle_bit = OMAP3430_ST_GPIO4_SHIFT,
  890. },
  891. },
  892. .slaves = omap3xxx_gpio4_slaves,
  893. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio4_slaves),
  894. .class = &omap3xxx_gpio_hwmod_class,
  895. .dev_attr = &gpio_dev_attr,
  896. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  897. };
  898. /* gpio5 */
  899. static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
  900. { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
  901. };
  902. static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
  903. { .role = "dbclk", .clk = "gpio5_dbck", },
  904. };
  905. static struct omap_hwmod_ocp_if *omap3xxx_gpio5_slaves[] = {
  906. &omap3xxx_l4_per__gpio5,
  907. };
  908. static struct omap_hwmod omap3xxx_gpio5_hwmod = {
  909. .name = "gpio5",
  910. .mpu_irqs = omap3xxx_gpio5_irqs,
  911. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
  912. .main_clk = "gpio5_ick",
  913. .opt_clks = gpio5_opt_clks,
  914. .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
  915. .prcm = {
  916. .omap2 = {
  917. .prcm_reg_id = 1,
  918. .module_bit = OMAP3430_EN_GPIO5_SHIFT,
  919. .module_offs = OMAP3430_PER_MOD,
  920. .idlest_reg_id = 1,
  921. .idlest_idle_bit = OMAP3430_ST_GPIO5_SHIFT,
  922. },
  923. },
  924. .slaves = omap3xxx_gpio5_slaves,
  925. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio5_slaves),
  926. .class = &omap3xxx_gpio_hwmod_class,
  927. .dev_attr = &gpio_dev_attr,
  928. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  929. };
  930. /* gpio6 */
  931. static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
  932. { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
  933. };
  934. static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
  935. { .role = "dbclk", .clk = "gpio6_dbck", },
  936. };
  937. static struct omap_hwmod_ocp_if *omap3xxx_gpio6_slaves[] = {
  938. &omap3xxx_l4_per__gpio6,
  939. };
  940. static struct omap_hwmod omap3xxx_gpio6_hwmod = {
  941. .name = "gpio6",
  942. .mpu_irqs = omap3xxx_gpio6_irqs,
  943. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
  944. .main_clk = "gpio6_ick",
  945. .opt_clks = gpio6_opt_clks,
  946. .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
  947. .prcm = {
  948. .omap2 = {
  949. .prcm_reg_id = 1,
  950. .module_bit = OMAP3430_EN_GPIO6_SHIFT,
  951. .module_offs = OMAP3430_PER_MOD,
  952. .idlest_reg_id = 1,
  953. .idlest_idle_bit = OMAP3430_ST_GPIO6_SHIFT,
  954. },
  955. },
  956. .slaves = omap3xxx_gpio6_slaves,
  957. .slaves_cnt = ARRAY_SIZE(omap3xxx_gpio6_slaves),
  958. .class = &omap3xxx_gpio_hwmod_class,
  959. .dev_attr = &gpio_dev_attr,
  960. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  961. };
  962. /* dma_system -> L3 */
  963. static struct omap_hwmod_ocp_if omap3xxx_dma_system__l3 = {
  964. .master = &omap3xxx_dma_system_hwmod,
  965. .slave = &omap3xxx_l3_main_hwmod,
  966. .clk = "core_l3_ick",
  967. .user = OCP_USER_MPU | OCP_USER_SDMA,
  968. };
  969. /* dma attributes */
  970. static struct omap_dma_dev_attr dma_dev_attr = {
  971. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  972. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  973. .lch_count = 32,
  974. };
  975. static struct omap_hwmod_class_sysconfig omap3xxx_dma_sysc = {
  976. .rev_offs = 0x0000,
  977. .sysc_offs = 0x002c,
  978. .syss_offs = 0x0028,
  979. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  980. SYSC_HAS_MIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  981. SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
  982. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  983. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  984. .sysc_fields = &omap_hwmod_sysc_type1,
  985. };
  986. static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
  987. .name = "dma",
  988. .sysc = &omap3xxx_dma_sysc,
  989. };
  990. /* dma_system */
  991. static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
  992. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  993. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  994. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  995. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  996. };
  997. static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
  998. {
  999. .pa_start = 0x48056000,
  1000. .pa_end = 0x4a0560ff,
  1001. .flags = ADDR_TYPE_RT
  1002. },
  1003. };
  1004. /* dma_system master ports */
  1005. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_masters[] = {
  1006. &omap3xxx_dma_system__l3,
  1007. };
  1008. /* l4_cfg -> dma_system */
  1009. static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
  1010. .master = &omap3xxx_l4_core_hwmod,
  1011. .slave = &omap3xxx_dma_system_hwmod,
  1012. .clk = "core_l4_ick",
  1013. .addr = omap3xxx_dma_system_addrs,
  1014. .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
  1015. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1016. };
  1017. /* dma_system slave ports */
  1018. static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
  1019. &omap3xxx_l4_core__dma_system,
  1020. };
  1021. static struct omap_hwmod omap3xxx_dma_system_hwmod = {
  1022. .name = "dma",
  1023. .class = &omap3xxx_dma_hwmod_class,
  1024. .mpu_irqs = omap3xxx_dma_system_irqs,
  1025. .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
  1026. .main_clk = "core_l3_ick",
  1027. .prcm = {
  1028. .omap2 = {
  1029. .module_offs = CORE_MOD,
  1030. .prcm_reg_id = 1,
  1031. .module_bit = OMAP3430_ST_SDMA_SHIFT,
  1032. .idlest_reg_id = 1,
  1033. .idlest_idle_bit = OMAP3430_ST_SDMA_SHIFT,
  1034. },
  1035. },
  1036. .slaves = omap3xxx_dma_system_slaves,
  1037. .slaves_cnt = ARRAY_SIZE(omap3xxx_dma_system_slaves),
  1038. .masters = omap3xxx_dma_system_masters,
  1039. .masters_cnt = ARRAY_SIZE(omap3xxx_dma_system_masters),
  1040. .dev_attr = &dma_dev_attr,
  1041. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
  1042. .flags = HWMOD_NO_IDLEST,
  1043. };
  1044. static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
  1045. &omap3xxx_l3_main_hwmod,
  1046. &omap3xxx_l4_core_hwmod,
  1047. &omap3xxx_l4_per_hwmod,
  1048. &omap3xxx_l4_wkup_hwmod,
  1049. &omap3xxx_mpu_hwmod,
  1050. &omap3xxx_iva_hwmod,
  1051. &omap3xxx_wd_timer2_hwmod,
  1052. &omap3xxx_uart1_hwmod,
  1053. &omap3xxx_uart2_hwmod,
  1054. &omap3xxx_uart3_hwmod,
  1055. &omap3xxx_uart4_hwmod,
  1056. &omap3xxx_i2c1_hwmod,
  1057. &omap3xxx_i2c2_hwmod,
  1058. &omap3xxx_i2c3_hwmod,
  1059. /* gpio class */
  1060. &omap3xxx_gpio1_hwmod,
  1061. &omap3xxx_gpio2_hwmod,
  1062. &omap3xxx_gpio3_hwmod,
  1063. &omap3xxx_gpio4_hwmod,
  1064. &omap3xxx_gpio5_hwmod,
  1065. &omap3xxx_gpio6_hwmod,
  1066. /* dma_system class*/
  1067. &omap3xxx_dma_system_hwmod,
  1068. NULL,
  1069. };
  1070. int __init omap3xxx_hwmod_init(void)
  1071. {
  1072. return omap_hwmod_init(omap3xxx_hwmods);
  1073. }