sh7372.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. /*
  2. * Copyright (C) 2010 Renesas Solutions Corp.
  3. *
  4. * Kuninori Morimoto <morimoto.kuninori@renesas.com>
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef __ASM_SH7372_H__
  11. #define __ASM_SH7372_H__
  12. #include <linux/sh_clk.h>
  13. #include <linux/pm_domain.h>
  14. /*
  15. * Pin Function Controller:
  16. * GPIO_FN_xx - GPIO used to select pin function
  17. * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
  18. */
  19. enum {
  20. /* PORT */
  21. GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4,
  22. GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9,
  23. GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14,
  24. GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19,
  25. GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24,
  26. GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29,
  27. GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34,
  28. GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39,
  29. GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44,
  30. GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49,
  31. GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54,
  32. GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59,
  33. GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64,
  34. GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69,
  35. GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74,
  36. GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79,
  37. GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84,
  38. GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89,
  39. GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94,
  40. GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99,
  41. GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104,
  42. GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109,
  43. GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114,
  44. GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119,
  45. GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124,
  46. GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129,
  47. GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134,
  48. GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139,
  49. GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144,
  50. GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149,
  51. GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154,
  52. GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159,
  53. GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164,
  54. GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169,
  55. GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174,
  56. GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179,
  57. GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184,
  58. GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189,
  59. GPIO_PORT190,
  60. /* IRQ */
  61. GPIO_FN_IRQ0_6, /* PORT 6 */
  62. GPIO_FN_IRQ0_162, /* PORT 162 */
  63. GPIO_FN_IRQ1, /* PORT 12 */
  64. GPIO_FN_IRQ2_4, /* PORT 4 */
  65. GPIO_FN_IRQ2_5, /* PORT 5 */
  66. GPIO_FN_IRQ3_8, /* PORT 8 */
  67. GPIO_FN_IRQ3_16, /* PORT 16 */
  68. GPIO_FN_IRQ4_17, /* PORT 17 */
  69. GPIO_FN_IRQ4_163, /* PORT 163 */
  70. GPIO_FN_IRQ5, /* PORT 18 */
  71. GPIO_FN_IRQ6_39, /* PORT 39 */
  72. GPIO_FN_IRQ6_164, /* PORT 164 */
  73. GPIO_FN_IRQ7_40, /* PORT 40 */
  74. GPIO_FN_IRQ7_167, /* PORT 167 */
  75. GPIO_FN_IRQ8_41, /* PORT 41 */
  76. GPIO_FN_IRQ8_168, /* PORT 168 */
  77. GPIO_FN_IRQ9_42, /* PORT 42 */
  78. GPIO_FN_IRQ9_169, /* PORT 169 */
  79. GPIO_FN_IRQ10, /* PORT 65 */
  80. GPIO_FN_IRQ11, /* PORT 67 */
  81. GPIO_FN_IRQ12_80, /* PORT 80 */
  82. GPIO_FN_IRQ12_137, /* PORT 137 */
  83. GPIO_FN_IRQ13_81, /* PORT 81 */
  84. GPIO_FN_IRQ13_145, /* PORT 145 */
  85. GPIO_FN_IRQ14_82, /* PORT 82 */
  86. GPIO_FN_IRQ14_146, /* PORT 146 */
  87. GPIO_FN_IRQ15_83, /* PORT 83 */
  88. GPIO_FN_IRQ15_147, /* PORT 147 */
  89. GPIO_FN_IRQ16_84, /* PORT 84 */
  90. GPIO_FN_IRQ16_170, /* PORT 170 */
  91. GPIO_FN_IRQ17, /* PORT 85 */
  92. GPIO_FN_IRQ18, /* PORT 86 */
  93. GPIO_FN_IRQ19, /* PORT 87 */
  94. GPIO_FN_IRQ20, /* PORT 92 */
  95. GPIO_FN_IRQ21, /* PORT 93 */
  96. GPIO_FN_IRQ22, /* PORT 94 */
  97. GPIO_FN_IRQ23, /* PORT 95 */
  98. GPIO_FN_IRQ24, /* PORT 112 */
  99. GPIO_FN_IRQ25, /* PORT 119 */
  100. GPIO_FN_IRQ26_121, /* PORT 121 */
  101. GPIO_FN_IRQ26_172, /* PORT 172 */
  102. GPIO_FN_IRQ27_122, /* PORT 122 */
  103. GPIO_FN_IRQ27_180, /* PORT 180 */
  104. GPIO_FN_IRQ28_123, /* PORT 123 */
  105. GPIO_FN_IRQ28_181, /* PORT 181 */
  106. GPIO_FN_IRQ29_129, /* PORT 129 */
  107. GPIO_FN_IRQ29_182, /* PORT 182 */
  108. GPIO_FN_IRQ30_130, /* PORT 130 */
  109. GPIO_FN_IRQ30_183, /* PORT 183 */
  110. GPIO_FN_IRQ31_138, /* PORT 138 */
  111. GPIO_FN_IRQ31_184, /* PORT 184 */
  112. /*
  113. * MSIOF0 (PORT 36, 37, 38, 39
  114. * 40, 41, 42, 43, 44, 45)
  115. */
  116. GPIO_FN_MSIOF0_TSYNC, GPIO_FN_MSIOF0_TSCK,
  117. GPIO_FN_MSIOF0_RXD, GPIO_FN_MSIOF0_RSCK,
  118. GPIO_FN_MSIOF0_RSYNC, GPIO_FN_MSIOF0_MCK0,
  119. GPIO_FN_MSIOF0_MCK1, GPIO_FN_MSIOF0_SS1,
  120. GPIO_FN_MSIOF0_SS2, GPIO_FN_MSIOF0_TXD,
  121. /*
  122. * MSIOF1 (PORT 39, 40, 41, 42, 43, 44
  123. * 84, 85, 86, 87, 88, 89, 90, 91, 92, 93)
  124. */
  125. GPIO_FN_MSIOF1_TSCK_39, GPIO_FN_MSIOF1_TSYNC_40,
  126. GPIO_FN_MSIOF1_TSCK_88, GPIO_FN_MSIOF1_TSYNC_89,
  127. GPIO_FN_MSIOF1_TXD_41, GPIO_FN_MSIOF1_RXD_42,
  128. GPIO_FN_MSIOF1_TXD_90, GPIO_FN_MSIOF1_RXD_91,
  129. GPIO_FN_MSIOF1_SS1_43, GPIO_FN_MSIOF1_SS2_44,
  130. GPIO_FN_MSIOF1_SS1_92, GPIO_FN_MSIOF1_SS2_93,
  131. GPIO_FN_MSIOF1_RSCK, GPIO_FN_MSIOF1_RSYNC,
  132. GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1,
  133. /*
  134. * MSIOF2 (PORT 134, 135, 136, 137, 138, 139
  135. * 148, 149, 150, 151)
  136. */
  137. GPIO_FN_MSIOF2_RSCK, GPIO_FN_MSIOF2_RSYNC,
  138. GPIO_FN_MSIOF2_MCK0, GPIO_FN_MSIOF2_MCK1,
  139. GPIO_FN_MSIOF2_SS1, GPIO_FN_MSIOF2_SS2,
  140. GPIO_FN_MSIOF2_TSYNC, GPIO_FN_MSIOF2_TSCK,
  141. GPIO_FN_MSIOF2_RXD, GPIO_FN_MSIOF2_TXD,
  142. /* MSIOF3 (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
  143. GPIO_FN_BBIF1_RXD, GPIO_FN_BBIF1_TSYNC,
  144. GPIO_FN_BBIF1_TSCK, GPIO_FN_BBIF1_TXD,
  145. GPIO_FN_BBIF1_RSCK, GPIO_FN_BBIF1_RSYNC,
  146. GPIO_FN_BBIF1_FLOW, GPIO_FN_BB_RX_FLOW_N,
  147. /* MSIOF4 (PORT 0, 1, 2, 3) */
  148. GPIO_FN_BBIF2_TSCK1, GPIO_FN_BBIF2_TSYNC1,
  149. GPIO_FN_BBIF2_TXD1, GPIO_FN_BBIF2_RXD,
  150. /* FSI (PORT 4, 5, 6, 7, 8, 9, 10, 11, 15) */
  151. GPIO_FN_FSIACK, GPIO_FN_FSIBCK,
  152. GPIO_FN_FSIAILR, GPIO_FN_FSIAIBT,
  153. GPIO_FN_FSIAISLD, GPIO_FN_FSIAOMC,
  154. GPIO_FN_FSIAOLR, GPIO_FN_FSIAOBT,
  155. GPIO_FN_FSIAOSLD, GPIO_FN_FSIASPDIF_11,
  156. GPIO_FN_FSIASPDIF_15,
  157. /* FMSI (PORT 12, 13, 14, 15, 16, 17, 18, 65) */
  158. GPIO_FN_FMSOCK, GPIO_FN_FMSOOLR,
  159. GPIO_FN_FMSIOLR, GPIO_FN_FMSOOBT,
  160. GPIO_FN_FMSIOBT, GPIO_FN_FMSOSLD,
  161. GPIO_FN_FMSOILR, GPIO_FN_FMSIILR,
  162. GPIO_FN_FMSOIBT, GPIO_FN_FMSIIBT,
  163. GPIO_FN_FMSISLD, GPIO_FN_FMSICK,
  164. /* SCIFA0 (PORT 152, 153, 156, 157, 158) */
  165. GPIO_FN_SCIFA0_TXD, GPIO_FN_SCIFA0_RXD,
  166. GPIO_FN_SCIFA0_SCK, GPIO_FN_SCIFA0_RTS,
  167. GPIO_FN_SCIFA0_CTS,
  168. /* SCIFA1 (PORT 154, 155, 159, 160, 161) */
  169. GPIO_FN_SCIFA1_TXD, GPIO_FN_SCIFA1_RXD,
  170. GPIO_FN_SCIFA1_SCK, GPIO_FN_SCIFA1_RTS,
  171. GPIO_FN_SCIFA1_CTS,
  172. /* SCIFA2 (PORT 94, 95, 96, 97, 98) */
  173. GPIO_FN_SCIFA2_CTS1, GPIO_FN_SCIFA2_RTS1,
  174. GPIO_FN_SCIFA2_TXD1, GPIO_FN_SCIFA2_RXD1,
  175. GPIO_FN_SCIFA2_SCK1,
  176. /* SCIFA3 (PORT 43, 44,
  177. 140, 141, 142, 143, 144) */
  178. GPIO_FN_SCIFA3_CTS_43, GPIO_FN_SCIFA3_CTS_140,
  179. GPIO_FN_SCIFA3_RTS_44, GPIO_FN_SCIFA3_RTS_141,
  180. GPIO_FN_SCIFA3_SCK, GPIO_FN_SCIFA3_TXD,
  181. GPIO_FN_SCIFA3_RXD,
  182. /* SCIFA4 (PORT 5, 6) */
  183. GPIO_FN_SCIFA4_RXD, GPIO_FN_SCIFA4_TXD,
  184. /* SCIFA5 (PORT 8, 12) */
  185. GPIO_FN_SCIFA5_RXD, GPIO_FN_SCIFA5_TXD,
  186. /* SCIFB (PORT 162, 163, 164, 165, 166) */
  187. GPIO_FN_SCIFB_SCK, GPIO_FN_SCIFB_RTS,
  188. GPIO_FN_SCIFB_CTS, GPIO_FN_SCIFB_TXD,
  189. GPIO_FN_SCIFB_RXD,
  190. /*
  191. * CEU (PORT 16, 17,
  192. * 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  193. * 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
  194. * 120)
  195. */
  196. GPIO_FN_VIO_HD, GPIO_FN_VIO_CKO1, GPIO_FN_VIO_CKO2,
  197. GPIO_FN_VIO_VD, GPIO_FN_VIO_CLK, GPIO_FN_VIO_FIELD,
  198. GPIO_FN_VIO_CKO,
  199. GPIO_FN_VIO_D0, GPIO_FN_VIO_D1, GPIO_FN_VIO_D2,
  200. GPIO_FN_VIO_D3, GPIO_FN_VIO_D4, GPIO_FN_VIO_D5,
  201. GPIO_FN_VIO_D6, GPIO_FN_VIO_D7, GPIO_FN_VIO_D8,
  202. GPIO_FN_VIO_D9, GPIO_FN_VIO_D10, GPIO_FN_VIO_D11,
  203. GPIO_FN_VIO_D12, GPIO_FN_VIO_D13, GPIO_FN_VIO_D14,
  204. GPIO_FN_VIO_D15,
  205. /* USB0 (PORT 113, 114, 115, 116, 117, 167) */
  206. GPIO_FN_IDIN_0, GPIO_FN_EXTLP_0,
  207. GPIO_FN_OVCN2_0, GPIO_FN_PWEN_0,
  208. GPIO_FN_OVCN_0, GPIO_FN_VBUS0_0,
  209. /* USB1 (PORT 18, 113, 114, 115, 116, 117, 138, 162, 168) */
  210. GPIO_FN_IDIN_1_18, GPIO_FN_IDIN_1_113,
  211. GPIO_FN_PWEN_1_115, GPIO_FN_PWEN_1_138,
  212. GPIO_FN_OVCN_1_114, GPIO_FN_OVCN_1_162,
  213. GPIO_FN_EXTLP_1, GPIO_FN_OVCN2_1,
  214. GPIO_FN_VBUS0_1,
  215. /* GPIO (PORT 41, 42, 43, 44) */
  216. GPIO_FN_GPI0, GPIO_FN_GPI1, GPIO_FN_GPO0, GPIO_FN_GPO1,
  217. /*
  218. * BSC (PORT 19,
  219. * 20, 21, 22, 25, 26, 27, 28, 29,
  220. * 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
  221. * 40, 41, 42, 43, 44, 45,
  222. * 62, 63, 64, 65, 66, 67,
  223. * 71, 72, 74, 75)
  224. */
  225. GPIO_FN_BS, GPIO_FN_WE1,
  226. GPIO_FN_CKO, GPIO_FN_WAIT, GPIO_FN_RDWR,
  227. GPIO_FN_A0, GPIO_FN_A1, GPIO_FN_A2, GPIO_FN_A3,
  228. GPIO_FN_A6, GPIO_FN_A7, GPIO_FN_A8, GPIO_FN_A9,
  229. GPIO_FN_A10, GPIO_FN_A11, GPIO_FN_A12, GPIO_FN_A13,
  230. GPIO_FN_A14, GPIO_FN_A15, GPIO_FN_A16, GPIO_FN_A17,
  231. GPIO_FN_A18, GPIO_FN_A19, GPIO_FN_A20, GPIO_FN_A21,
  232. GPIO_FN_A22, GPIO_FN_A23, GPIO_FN_A24, GPIO_FN_A25,
  233. GPIO_FN_A26,
  234. GPIO_FN_CS0, GPIO_FN_CS2, GPIO_FN_CS4,
  235. GPIO_FN_CS5A, GPIO_FN_CS5B, GPIO_FN_CS6A,
  236. /*
  237. * BSC/FLCTL (PORT 23, 24,
  238. * 46, 47, 48, 49,
  239. * 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  240. * 60, 61, 69, 70)
  241. */
  242. GPIO_FN_RD_FSC, GPIO_FN_WE0_FWE,
  243. GPIO_FN_A4_FOE, GPIO_FN_A5_FCDE,
  244. GPIO_FN_D0_NAF0, GPIO_FN_D1_NAF1, GPIO_FN_D2_NAF2,
  245. GPIO_FN_D3_NAF3, GPIO_FN_D4_NAF4, GPIO_FN_D5_NAF5,
  246. GPIO_FN_D6_NAF6, GPIO_FN_D7_NAF7, GPIO_FN_D8_NAF8,
  247. GPIO_FN_D9_NAF9, GPIO_FN_D10_NAF10, GPIO_FN_D11_NAF11,
  248. GPIO_FN_D12_NAF12, GPIO_FN_D13_NAF13, GPIO_FN_D14_NAF14,
  249. GPIO_FN_D15_NAF15,
  250. /*
  251. * MMCIF(1) (PORT 84, 85, 86, 87, 88, 89,
  252. * 90, 91, 92, 99)
  253. */
  254. GPIO_FN_MMCD0_0, GPIO_FN_MMCD0_1, GPIO_FN_MMCD0_2,
  255. GPIO_FN_MMCD0_3, GPIO_FN_MMCD0_4, GPIO_FN_MMCD0_5,
  256. GPIO_FN_MMCD0_6, GPIO_FN_MMCD0_7,
  257. GPIO_FN_MMCCMD0, GPIO_FN_MMCCLK0,
  258. /* MMCIF(2) (PORT 54, 55, 56, 57, 58, 59, 60, 61, 66, 67) */
  259. GPIO_FN_MMCD1_0, GPIO_FN_MMCD1_1, GPIO_FN_MMCD1_2,
  260. GPIO_FN_MMCD1_3, GPIO_FN_MMCD1_4, GPIO_FN_MMCD1_5,
  261. GPIO_FN_MMCD1_6, GPIO_FN_MMCD1_7,
  262. GPIO_FN_MMCCLK1, GPIO_FN_MMCCMD1,
  263. /* SPU2 (PORT 65) */
  264. GPIO_FN_VINT_I,
  265. /* FLCTL (PORT 66, 68, 73) */
  266. GPIO_FN_FCE1, GPIO_FN_FCE0, GPIO_FN_FRB,
  267. /* HSI (PORT 76, 77, 78, 79, 80, 81, 82, 83) */
  268. GPIO_FN_GP_RX_FLAG, GPIO_FN_GP_RX_DATA, GPIO_FN_GP_TX_READY,
  269. GPIO_FN_GP_RX_WAKE, GPIO_FN_MP_TX_FLAG, GPIO_FN_MP_TX_DATA,
  270. GPIO_FN_MP_RX_READY, GPIO_FN_MP_TX_WAKE,
  271. /*
  272. * MFI (PORT 76, 77, 78, 79,
  273. * 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  274. * 90, 91, 92, 93, 94, 95, 96, 97, 98, 99)
  275. */
  276. GPIO_FN_MFIv6, /* see MSEL4CR 6 */
  277. GPIO_FN_MFIv4, /* see MSEL4CR 6 */
  278. GPIO_FN_MEMC_CS0, GPIO_FN_MEMC_BUSCLK_MEMC_A0,
  279. GPIO_FN_MEMC_CS1_MEMC_A1, GPIO_FN_MEMC_ADV_MEMC_DREQ0,
  280. GPIO_FN_MEMC_WAIT_MEMC_DREQ1, GPIO_FN_MEMC_NOE,
  281. GPIO_FN_MEMC_NWE, GPIO_FN_MEMC_INT,
  282. GPIO_FN_MEMC_AD0, GPIO_FN_MEMC_AD1, GPIO_FN_MEMC_AD2,
  283. GPIO_FN_MEMC_AD3, GPIO_FN_MEMC_AD4, GPIO_FN_MEMC_AD5,
  284. GPIO_FN_MEMC_AD6, GPIO_FN_MEMC_AD7, GPIO_FN_MEMC_AD8,
  285. GPIO_FN_MEMC_AD9, GPIO_FN_MEMC_AD10, GPIO_FN_MEMC_AD11,
  286. GPIO_FN_MEMC_AD12, GPIO_FN_MEMC_AD13, GPIO_FN_MEMC_AD14,
  287. GPIO_FN_MEMC_AD15,
  288. /* SIM (PORT 94, 95, 98) */
  289. GPIO_FN_SIM_RST, GPIO_FN_SIM_CLK, GPIO_FN_SIM_D,
  290. /* TPU (PORT 93, 99, 112, 160, 161) */
  291. GPIO_FN_TPU0TO0, GPIO_FN_TPU0TO1,
  292. GPIO_FN_TPU0TO2_93, GPIO_FN_TPU0TO2_99,
  293. GPIO_FN_TPU0TO3,
  294. /* I2C2 (PORT 110, 111) */
  295. GPIO_FN_I2C_SCL2, GPIO_FN_I2C_SDA2,
  296. /* I2C3(1) (PORT 114, 115) */
  297. GPIO_FN_I2C_SCL3, GPIO_FN_I2C_SDA3,
  298. /* I2C3(2) (PORT 137, 145) */
  299. GPIO_FN_I2C_SCL3S, GPIO_FN_I2C_SDA3S,
  300. /* I2C4(2) (PORT 116, 117) */
  301. GPIO_FN_I2C_SCL4, GPIO_FN_I2C_SDA4,
  302. /* I2C4(2) (PORT 146, 147) */
  303. GPIO_FN_I2C_SCL4S, GPIO_FN_I2C_SDA4S,
  304. /*
  305. * KEYSC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
  306. * 130, 131, 132, 133, 134, 135, 136)
  307. */
  308. GPIO_FN_KEYOUT0, GPIO_FN_KEYIN0_121, GPIO_FN_KEYIN0_136,
  309. GPIO_FN_KEYOUT1, GPIO_FN_KEYIN1_122, GPIO_FN_KEYIN1_135,
  310. GPIO_FN_KEYOUT2, GPIO_FN_KEYIN2_123, GPIO_FN_KEYIN2_134,
  311. GPIO_FN_KEYOUT3, GPIO_FN_KEYIN3_124, GPIO_FN_KEYIN3_133,
  312. GPIO_FN_KEYOUT4, GPIO_FN_KEYIN4,
  313. GPIO_FN_KEYOUT5, GPIO_FN_KEYIN5,
  314. GPIO_FN_KEYOUT6, GPIO_FN_KEYIN6,
  315. GPIO_FN_KEYOUT7, GPIO_FN_KEYIN7,
  316. /*
  317. * LCDC (PORT 121, 122, 123, 124, 125, 126, 127, 128, 129,
  318. * 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
  319. * 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
  320. * 150, 151)
  321. */
  322. GPIO_FN_LCDC0_SELECT, /* LCDC 0 */
  323. GPIO_FN_LCDC1_SELECT, /* LCDC 1 */
  324. GPIO_FN_LCDHSYN, GPIO_FN_LCDCS, GPIO_FN_LCDVSYN,
  325. GPIO_FN_LCDDCK, GPIO_FN_LCDWR, GPIO_FN_LCDRD,
  326. GPIO_FN_LCDDISP, GPIO_FN_LCDRS, GPIO_FN_LCDLCLK,
  327. GPIO_FN_LCDDON,
  328. GPIO_FN_LCDD0, GPIO_FN_LCDD1, GPIO_FN_LCDD2, GPIO_FN_LCDD3,
  329. GPIO_FN_LCDD4, GPIO_FN_LCDD5, GPIO_FN_LCDD6, GPIO_FN_LCDD7,
  330. GPIO_FN_LCDD8, GPIO_FN_LCDD9, GPIO_FN_LCDD10, GPIO_FN_LCDD11,
  331. GPIO_FN_LCDD12, GPIO_FN_LCDD13, GPIO_FN_LCDD14, GPIO_FN_LCDD15,
  332. GPIO_FN_LCDD16, GPIO_FN_LCDD17, GPIO_FN_LCDD18, GPIO_FN_LCDD19,
  333. GPIO_FN_LCDD20, GPIO_FN_LCDD21, GPIO_FN_LCDD22, GPIO_FN_LCDD23,
  334. /* IRDA (PORT 139, 140, 141, 142) */
  335. GPIO_FN_IRDA_OUT, GPIO_FN_IRDA_IN, GPIO_FN_IRDA_FIRSEL,
  336. GPIO_FN_IROUT_139, GPIO_FN_IROUT_140,
  337. /* TSIF1 (PORT 156, 157, 158, 159) */
  338. GPIO_FN_TS0_1SELECT, /* TSIF0 - 1 select */
  339. GPIO_FN_TS0_2SELECT, /* TSIF0 - 2 select */
  340. GPIO_FN_TS1_1SELECT, /* TSIF1 - 1 select */
  341. GPIO_FN_TS1_2SELECT, /* TSIF1 - 2 select */
  342. GPIO_FN_TS_SPSYNC1, GPIO_FN_TS_SDAT1,
  343. GPIO_FN_TS_SDEN1, GPIO_FN_TS_SCK1,
  344. /* TSIF2 (PORT 137, 145, 146, 147) */
  345. GPIO_FN_TS_SPSYNC2, GPIO_FN_TS_SDAT2,
  346. GPIO_FN_TS_SDEN2, GPIO_FN_TS_SCK2,
  347. /* HDMI (PORT 169, 170) */
  348. GPIO_FN_HDMI_HPD, GPIO_FN_HDMI_CEC,
  349. /* SDHI0 (PORT 171, 172, 173, 174, 175, 176, 177, 178) */
  350. GPIO_FN_SDHICLK0, GPIO_FN_SDHICD0,
  351. GPIO_FN_SDHICMD0, GPIO_FN_SDHIWP0,
  352. GPIO_FN_SDHID0_0, GPIO_FN_SDHID0_1,
  353. GPIO_FN_SDHID0_2, GPIO_FN_SDHID0_3,
  354. /* SDHI1 (PORT 179, 180, 181, 182, 183, 184) */
  355. GPIO_FN_SDHICLK1, GPIO_FN_SDHICMD1, GPIO_FN_SDHID1_0,
  356. GPIO_FN_SDHID1_1, GPIO_FN_SDHID1_2, GPIO_FN_SDHID1_3,
  357. /* SDHI2 (PORT 185, 186, 187, 188, 189, 190) */
  358. GPIO_FN_SDHICLK2, GPIO_FN_SDHICMD2, GPIO_FN_SDHID2_0,
  359. GPIO_FN_SDHID2_1, GPIO_FN_SDHID2_2, GPIO_FN_SDHID2_3,
  360. /* SDENC see MSEL4CR 19 */
  361. GPIO_FN_SDENC_CPG,
  362. GPIO_FN_SDENC_DV_CLKI,
  363. };
  364. /* DMA slave IDs */
  365. enum {
  366. SHDMA_SLAVE_INVALID,
  367. SHDMA_SLAVE_SCIF0_TX,
  368. SHDMA_SLAVE_SCIF0_RX,
  369. SHDMA_SLAVE_SCIF1_TX,
  370. SHDMA_SLAVE_SCIF1_RX,
  371. SHDMA_SLAVE_SCIF2_TX,
  372. SHDMA_SLAVE_SCIF2_RX,
  373. SHDMA_SLAVE_SCIF3_TX,
  374. SHDMA_SLAVE_SCIF3_RX,
  375. SHDMA_SLAVE_SCIF4_TX,
  376. SHDMA_SLAVE_SCIF4_RX,
  377. SHDMA_SLAVE_SCIF5_TX,
  378. SHDMA_SLAVE_SCIF5_RX,
  379. SHDMA_SLAVE_SCIF6_TX,
  380. SHDMA_SLAVE_SCIF6_RX,
  381. SHDMA_SLAVE_SDHI0_RX,
  382. SHDMA_SLAVE_SDHI0_TX,
  383. SHDMA_SLAVE_SDHI1_RX,
  384. SHDMA_SLAVE_SDHI1_TX,
  385. SHDMA_SLAVE_SDHI2_RX,
  386. SHDMA_SLAVE_SDHI2_TX,
  387. SHDMA_SLAVE_MMCIF_RX,
  388. SHDMA_SLAVE_MMCIF_TX,
  389. SHDMA_SLAVE_USB0_TX,
  390. SHDMA_SLAVE_USB0_RX,
  391. SHDMA_SLAVE_USB1_TX,
  392. SHDMA_SLAVE_USB1_RX,
  393. };
  394. extern struct clk sh7372_extal1_clk;
  395. extern struct clk sh7372_extal2_clk;
  396. extern struct clk sh7372_dv_clki_clk;
  397. extern struct clk sh7372_dv_clki_div2_clk;
  398. extern struct clk sh7372_pllc2_clk;
  399. extern struct clk sh7372_fsiack_clk;
  400. extern struct clk sh7372_fsibck_clk;
  401. extern struct clk sh7372_fsidiva_clk;
  402. extern struct clk sh7372_fsidivb_clk;
  403. struct platform_device;
  404. struct sh7372_pm_domain {
  405. struct generic_pm_domain genpd;
  406. struct dev_power_governor *gov;
  407. int (*suspend)(void);
  408. void (*resume)(void);
  409. unsigned int bit_shift;
  410. bool no_debug;
  411. };
  412. static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d)
  413. {
  414. return container_of(d, struct sh7372_pm_domain, genpd);
  415. }
  416. #ifdef CONFIG_PM
  417. extern struct sh7372_pm_domain sh7372_a4lc;
  418. extern struct sh7372_pm_domain sh7372_a4mp;
  419. extern struct sh7372_pm_domain sh7372_d4;
  420. extern struct sh7372_pm_domain sh7372_a4r;
  421. extern struct sh7372_pm_domain sh7372_a3rv;
  422. extern struct sh7372_pm_domain sh7372_a3ri;
  423. extern struct sh7372_pm_domain sh7372_a4s;
  424. extern struct sh7372_pm_domain sh7372_a3sp;
  425. extern struct sh7372_pm_domain sh7372_a3sg;
  426. extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd);
  427. extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd,
  428. struct platform_device *pdev);
  429. extern void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd,
  430. struct sh7372_pm_domain *sh7372_sd);
  431. #else
  432. #define sh7372_init_pm_domain(pd) do { } while(0)
  433. #define sh7372_add_device_to_domain(pd, pdev) do { } while(0)
  434. #define sh7372_pm_add_subdomain(pd, sd) do { } while(0)
  435. #endif /* CONFIG_PM */
  436. extern void sh7372_intcs_suspend(void);
  437. extern void sh7372_intcs_resume(void);
  438. extern void sh7372_intca_suspend(void);
  439. extern void sh7372_intca_resume(void);
  440. #endif /* __ASM_SH7372_H__ */