r8a7740.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. /*
  2. * Copyright (C) 2011 Renesas Solutions Corp.
  3. * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; version 2 of the License.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef __ASM_R8A7740_H__
  19. #define __ASM_R8A7740_H__
  20. #include <mach/pm-rmobile.h>
  21. /*
  22. * MD_CKx pin
  23. */
  24. #define MD_CK2 (1 << 2)
  25. #define MD_CK1 (1 << 1)
  26. #define MD_CK0 (1 << 0)
  27. /*
  28. * Pin Function Controller:
  29. * GPIO_FN_xx - GPIO used to select pin function
  30. * GPIO_PORTxx - GPIO mapped to real I/O pin on CPU
  31. */
  32. enum {
  33. /* PORT */
  34. GPIO_PORT0, GPIO_PORT1, GPIO_PORT2, GPIO_PORT3, GPIO_PORT4,
  35. GPIO_PORT5, GPIO_PORT6, GPIO_PORT7, GPIO_PORT8, GPIO_PORT9,
  36. GPIO_PORT10, GPIO_PORT11, GPIO_PORT12, GPIO_PORT13, GPIO_PORT14,
  37. GPIO_PORT15, GPIO_PORT16, GPIO_PORT17, GPIO_PORT18, GPIO_PORT19,
  38. GPIO_PORT20, GPIO_PORT21, GPIO_PORT22, GPIO_PORT23, GPIO_PORT24,
  39. GPIO_PORT25, GPIO_PORT26, GPIO_PORT27, GPIO_PORT28, GPIO_PORT29,
  40. GPIO_PORT30, GPIO_PORT31, GPIO_PORT32, GPIO_PORT33, GPIO_PORT34,
  41. GPIO_PORT35, GPIO_PORT36, GPIO_PORT37, GPIO_PORT38, GPIO_PORT39,
  42. GPIO_PORT40, GPIO_PORT41, GPIO_PORT42, GPIO_PORT43, GPIO_PORT44,
  43. GPIO_PORT45, GPIO_PORT46, GPIO_PORT47, GPIO_PORT48, GPIO_PORT49,
  44. GPIO_PORT50, GPIO_PORT51, GPIO_PORT52, GPIO_PORT53, GPIO_PORT54,
  45. GPIO_PORT55, GPIO_PORT56, GPIO_PORT57, GPIO_PORT58, GPIO_PORT59,
  46. GPIO_PORT60, GPIO_PORT61, GPIO_PORT62, GPIO_PORT63, GPIO_PORT64,
  47. GPIO_PORT65, GPIO_PORT66, GPIO_PORT67, GPIO_PORT68, GPIO_PORT69,
  48. GPIO_PORT70, GPIO_PORT71, GPIO_PORT72, GPIO_PORT73, GPIO_PORT74,
  49. GPIO_PORT75, GPIO_PORT76, GPIO_PORT77, GPIO_PORT78, GPIO_PORT79,
  50. GPIO_PORT80, GPIO_PORT81, GPIO_PORT82, GPIO_PORT83, GPIO_PORT84,
  51. GPIO_PORT85, GPIO_PORT86, GPIO_PORT87, GPIO_PORT88, GPIO_PORT89,
  52. GPIO_PORT90, GPIO_PORT91, GPIO_PORT92, GPIO_PORT93, GPIO_PORT94,
  53. GPIO_PORT95, GPIO_PORT96, GPIO_PORT97, GPIO_PORT98, GPIO_PORT99,
  54. GPIO_PORT100, GPIO_PORT101, GPIO_PORT102, GPIO_PORT103, GPIO_PORT104,
  55. GPIO_PORT105, GPIO_PORT106, GPIO_PORT107, GPIO_PORT108, GPIO_PORT109,
  56. GPIO_PORT110, GPIO_PORT111, GPIO_PORT112, GPIO_PORT113, GPIO_PORT114,
  57. GPIO_PORT115, GPIO_PORT116, GPIO_PORT117, GPIO_PORT118, GPIO_PORT119,
  58. GPIO_PORT120, GPIO_PORT121, GPIO_PORT122, GPIO_PORT123, GPIO_PORT124,
  59. GPIO_PORT125, GPIO_PORT126, GPIO_PORT127, GPIO_PORT128, GPIO_PORT129,
  60. GPIO_PORT130, GPIO_PORT131, GPIO_PORT132, GPIO_PORT133, GPIO_PORT134,
  61. GPIO_PORT135, GPIO_PORT136, GPIO_PORT137, GPIO_PORT138, GPIO_PORT139,
  62. GPIO_PORT140, GPIO_PORT141, GPIO_PORT142, GPIO_PORT143, GPIO_PORT144,
  63. GPIO_PORT145, GPIO_PORT146, GPIO_PORT147, GPIO_PORT148, GPIO_PORT149,
  64. GPIO_PORT150, GPIO_PORT151, GPIO_PORT152, GPIO_PORT153, GPIO_PORT154,
  65. GPIO_PORT155, GPIO_PORT156, GPIO_PORT157, GPIO_PORT158, GPIO_PORT159,
  66. GPIO_PORT160, GPIO_PORT161, GPIO_PORT162, GPIO_PORT163, GPIO_PORT164,
  67. GPIO_PORT165, GPIO_PORT166, GPIO_PORT167, GPIO_PORT168, GPIO_PORT169,
  68. GPIO_PORT170, GPIO_PORT171, GPIO_PORT172, GPIO_PORT173, GPIO_PORT174,
  69. GPIO_PORT175, GPIO_PORT176, GPIO_PORT177, GPIO_PORT178, GPIO_PORT179,
  70. GPIO_PORT180, GPIO_PORT181, GPIO_PORT182, GPIO_PORT183, GPIO_PORT184,
  71. GPIO_PORT185, GPIO_PORT186, GPIO_PORT187, GPIO_PORT188, GPIO_PORT189,
  72. GPIO_PORT190, GPIO_PORT191, GPIO_PORT192, GPIO_PORT193, GPIO_PORT194,
  73. GPIO_PORT195, GPIO_PORT196, GPIO_PORT197, GPIO_PORT198, GPIO_PORT199,
  74. GPIO_PORT200, GPIO_PORT201, GPIO_PORT202, GPIO_PORT203, GPIO_PORT204,
  75. GPIO_PORT205, GPIO_PORT206, GPIO_PORT207, GPIO_PORT208, GPIO_PORT209,
  76. GPIO_PORT210, GPIO_PORT211,
  77. /* IRQ */
  78. GPIO_FN_IRQ0_PORT2, GPIO_FN_IRQ0_PORT13,
  79. GPIO_FN_IRQ1,
  80. GPIO_FN_IRQ2_PORT11, GPIO_FN_IRQ2_PORT12,
  81. GPIO_FN_IRQ3_PORT10, GPIO_FN_IRQ3_PORT14,
  82. GPIO_FN_IRQ4_PORT15, GPIO_FN_IRQ4_PORT172,
  83. GPIO_FN_IRQ5_PORT0, GPIO_FN_IRQ5_PORT1,
  84. GPIO_FN_IRQ6_PORT121, GPIO_FN_IRQ6_PORT173,
  85. GPIO_FN_IRQ7_PORT120, GPIO_FN_IRQ7_PORT209,
  86. GPIO_FN_IRQ8,
  87. GPIO_FN_IRQ9_PORT118, GPIO_FN_IRQ9_PORT210,
  88. GPIO_FN_IRQ10,
  89. GPIO_FN_IRQ11,
  90. GPIO_FN_IRQ12_PORT42, GPIO_FN_IRQ12_PORT97,
  91. GPIO_FN_IRQ13_PORT64, GPIO_FN_IRQ13_PORT98,
  92. GPIO_FN_IRQ14_PORT63, GPIO_FN_IRQ14_PORT99,
  93. GPIO_FN_IRQ15_PORT62, GPIO_FN_IRQ15_PORT100,
  94. GPIO_FN_IRQ16_PORT68, GPIO_FN_IRQ16_PORT211,
  95. GPIO_FN_IRQ17,
  96. GPIO_FN_IRQ18,
  97. GPIO_FN_IRQ19,
  98. GPIO_FN_IRQ20,
  99. GPIO_FN_IRQ21,
  100. GPIO_FN_IRQ22,
  101. GPIO_FN_IRQ23,
  102. GPIO_FN_IRQ24,
  103. GPIO_FN_IRQ25,
  104. GPIO_FN_IRQ26_PORT58, GPIO_FN_IRQ26_PORT81,
  105. GPIO_FN_IRQ27_PORT57, GPIO_FN_IRQ27_PORT168,
  106. GPIO_FN_IRQ28_PORT56, GPIO_FN_IRQ28_PORT169,
  107. GPIO_FN_IRQ29_PORT50, GPIO_FN_IRQ29_PORT170,
  108. GPIO_FN_IRQ30_PORT49, GPIO_FN_IRQ30_PORT171,
  109. GPIO_FN_IRQ31_PORT41, GPIO_FN_IRQ31_PORT167,
  110. /* Function */
  111. /* DBGT */
  112. GPIO_FN_DBGMDT2, GPIO_FN_DBGMDT1, GPIO_FN_DBGMDT0,
  113. GPIO_FN_DBGMD10, GPIO_FN_DBGMD11, GPIO_FN_DBGMD20,
  114. GPIO_FN_DBGMD21,
  115. /* FSI-A */
  116. GPIO_FN_FSIAISLD_PORT0, /* FSIAISLD Port 0/5 */
  117. GPIO_FN_FSIAISLD_PORT5,
  118. GPIO_FN_FSIASPDIF_PORT9, /* FSIASPDIF Port 9/18 */
  119. GPIO_FN_FSIASPDIF_PORT18,
  120. GPIO_FN_FSIAOSLD1, GPIO_FN_FSIAOSLD2,
  121. GPIO_FN_FSIAOLR, GPIO_FN_FSIAOBT,
  122. GPIO_FN_FSIAOSLD, GPIO_FN_FSIAOMC,
  123. GPIO_FN_FSIACK, GPIO_FN_FSIAILR,
  124. GPIO_FN_FSIAIBT,
  125. /* FSI-B */
  126. GPIO_FN_FSIBCK,
  127. /* FMSI */
  128. GPIO_FN_FMSISLD_PORT1, /* FMSISLD Port 1/6 */
  129. GPIO_FN_FMSISLD_PORT6,
  130. GPIO_FN_FMSIILR, GPIO_FN_FMSIIBT,
  131. GPIO_FN_FMSIOLR, GPIO_FN_FMSIOBT,
  132. GPIO_FN_FMSICK, GPIO_FN_FMSOILR,
  133. GPIO_FN_FMSOIBT, GPIO_FN_FMSOOLR,
  134. GPIO_FN_FMSOOBT, GPIO_FN_FMSOSLD,
  135. GPIO_FN_FMSOCK,
  136. /* SCIFA0 */
  137. GPIO_FN_SCIFA0_SCK, GPIO_FN_SCIFA0_CTS,
  138. GPIO_FN_SCIFA0_RTS, GPIO_FN_SCIFA0_RXD,
  139. GPIO_FN_SCIFA0_TXD,
  140. /* SCIFA1 */
  141. GPIO_FN_SCIFA1_CTS, GPIO_FN_SCIFA1_SCK,
  142. GPIO_FN_SCIFA1_RXD, GPIO_FN_SCIFA1_TXD,
  143. GPIO_FN_SCIFA1_RTS,
  144. /* SCIFA2 */
  145. GPIO_FN_SCIFA2_SCK_PORT22, /* SCIFA2_SCK Port 22/199 */
  146. GPIO_FN_SCIFA2_SCK_PORT199,
  147. GPIO_FN_SCIFA2_RXD, GPIO_FN_SCIFA2_TXD,
  148. GPIO_FN_SCIFA2_CTS, GPIO_FN_SCIFA2_RTS,
  149. /* SCIFA3 */
  150. GPIO_FN_SCIFA3_RTS_PORT105, /* MSEL5CR_8_0 */
  151. GPIO_FN_SCIFA3_SCK_PORT116,
  152. GPIO_FN_SCIFA3_CTS_PORT117,
  153. GPIO_FN_SCIFA3_RXD_PORT174,
  154. GPIO_FN_SCIFA3_TXD_PORT175,
  155. GPIO_FN_SCIFA3_RTS_PORT161, /* MSEL5CR_8_1 */
  156. GPIO_FN_SCIFA3_SCK_PORT158,
  157. GPIO_FN_SCIFA3_CTS_PORT162,
  158. GPIO_FN_SCIFA3_RXD_PORT159,
  159. GPIO_FN_SCIFA3_TXD_PORT160,
  160. /* SCIFA4 */
  161. GPIO_FN_SCIFA4_RXD_PORT12, /* MSEL5CR[12:11] = 00 */
  162. GPIO_FN_SCIFA4_TXD_PORT13,
  163. GPIO_FN_SCIFA4_RXD_PORT204, /* MSEL5CR[12:11] = 01 */
  164. GPIO_FN_SCIFA4_TXD_PORT203,
  165. GPIO_FN_SCIFA4_RXD_PORT94, /* MSEL5CR[12:11] = 10 */
  166. GPIO_FN_SCIFA4_TXD_PORT93,
  167. GPIO_FN_SCIFA4_SCK_PORT21, /* SCIFA4_SCK Port 21/205 */
  168. GPIO_FN_SCIFA4_SCK_PORT205,
  169. /* SCIFA5 */
  170. GPIO_FN_SCIFA5_TXD_PORT20, /* MSEL5CR[15:14] = 00 */
  171. GPIO_FN_SCIFA5_RXD_PORT10,
  172. GPIO_FN_SCIFA5_RXD_PORT207, /* MSEL5CR[15:14] = 01 */
  173. GPIO_FN_SCIFA5_TXD_PORT208,
  174. GPIO_FN_SCIFA5_TXD_PORT91, /* MSEL5CR[15:14] = 10 */
  175. GPIO_FN_SCIFA5_RXD_PORT92,
  176. GPIO_FN_SCIFA5_SCK_PORT23, /* SCIFA5_SCK Port 23/206 */
  177. GPIO_FN_SCIFA5_SCK_PORT206,
  178. /* SCIFA6 */
  179. GPIO_FN_SCIFA6_SCK, GPIO_FN_SCIFA6_RXD, GPIO_FN_SCIFA6_TXD,
  180. /* SCIFA7 */
  181. GPIO_FN_SCIFA7_TXD, GPIO_FN_SCIFA7_RXD,
  182. /* SCIFAB */
  183. GPIO_FN_SCIFB_SCK_PORT190, /* MSEL5CR_17_0 */
  184. GPIO_FN_SCIFB_RXD_PORT191,
  185. GPIO_FN_SCIFB_TXD_PORT192,
  186. GPIO_FN_SCIFB_RTS_PORT186,
  187. GPIO_FN_SCIFB_CTS_PORT187,
  188. GPIO_FN_SCIFB_SCK_PORT2, /* MSEL5CR_17_1 */
  189. GPIO_FN_SCIFB_RXD_PORT3,
  190. GPIO_FN_SCIFB_TXD_PORT4,
  191. GPIO_FN_SCIFB_RTS_PORT172,
  192. GPIO_FN_SCIFB_CTS_PORT173,
  193. /* LCD0 */
  194. GPIO_FN_LCDC0_SELECT,
  195. /* LCD1 */
  196. GPIO_FN_LCDC1_SELECT,
  197. /* RSPI */
  198. GPIO_FN_RSPI_SSL0_A, GPIO_FN_RSPI_SSL1_A,
  199. GPIO_FN_RSPI_SSL2_A, GPIO_FN_RSPI_SSL3_A,
  200. GPIO_FN_RSPI_MOSI_A, GPIO_FN_RSPI_MISO_A,
  201. GPIO_FN_RSPI_CK_A,
  202. /* VIO CKO */
  203. GPIO_FN_VIO_CKO1,
  204. GPIO_FN_VIO_CKO2,
  205. GPIO_FN_VIO_CKO_1,
  206. GPIO_FN_VIO_CKO,
  207. /* VIO0 */
  208. GPIO_FN_VIO0_D0, GPIO_FN_VIO0_D1, GPIO_FN_VIO0_D2,
  209. GPIO_FN_VIO0_D3, GPIO_FN_VIO0_D4, GPIO_FN_VIO0_D5,
  210. GPIO_FN_VIO0_D6, GPIO_FN_VIO0_D7, GPIO_FN_VIO0_D8,
  211. GPIO_FN_VIO0_D9, GPIO_FN_VIO0_D10, GPIO_FN_VIO0_D11,
  212. GPIO_FN_VIO0_D12, GPIO_FN_VIO0_VD, GPIO_FN_VIO0_HD,
  213. GPIO_FN_VIO0_CLK, GPIO_FN_VIO0_FIELD,
  214. GPIO_FN_VIO0_D13_PORT26, /* MSEL5CR_27_0 */
  215. GPIO_FN_VIO0_D14_PORT25,
  216. GPIO_FN_VIO0_D15_PORT24,
  217. GPIO_FN_VIO0_D13_PORT22, /* MSEL5CR_27_1 */
  218. GPIO_FN_VIO0_D14_PORT95,
  219. GPIO_FN_VIO0_D15_PORT96,
  220. /* VIO1 */
  221. GPIO_FN_VIO1_D0, GPIO_FN_VIO1_D1, GPIO_FN_VIO1_D2,
  222. GPIO_FN_VIO1_D3, GPIO_FN_VIO1_D4, GPIO_FN_VIO1_D5,
  223. GPIO_FN_VIO1_D6, GPIO_FN_VIO1_D7, GPIO_FN_VIO1_VD,
  224. GPIO_FN_VIO1_HD, GPIO_FN_VIO1_CLK, GPIO_FN_VIO1_FIELD,
  225. /* TPU0 */
  226. GPIO_FN_TPU0TO0, GPIO_FN_TPU0TO1,
  227. GPIO_FN_TPU0TO3,
  228. GPIO_FN_TPU0TO2_PORT66, /* TPU0TO2 Port 66/202 */
  229. GPIO_FN_TPU0TO2_PORT202,
  230. /* SSP1 0 */
  231. GPIO_FN_STP0_IPD0, GPIO_FN_STP0_IPD1, GPIO_FN_STP0_IPD2,
  232. GPIO_FN_STP0_IPD3, GPIO_FN_STP0_IPD4, GPIO_FN_STP0_IPD5,
  233. GPIO_FN_STP0_IPD6, GPIO_FN_STP0_IPD7, GPIO_FN_STP0_IPEN,
  234. GPIO_FN_STP0_IPCLK, GPIO_FN_STP0_IPSYNC,
  235. /* SSP1 1 */
  236. GPIO_FN_STP1_IPD1, GPIO_FN_STP1_IPD2, GPIO_FN_STP1_IPD3,
  237. GPIO_FN_STP1_IPD4, GPIO_FN_STP1_IPD5, GPIO_FN_STP1_IPD6,
  238. GPIO_FN_STP1_IPD7, GPIO_FN_STP1_IPCLK, GPIO_FN_STP1_IPSYNC,
  239. GPIO_FN_STP1_IPD0_PORT186, /* MSEL5CR_23_0 */
  240. GPIO_FN_STP1_IPEN_PORT187,
  241. GPIO_FN_STP1_IPD0_PORT194, /* MSEL5CR_23_1 */
  242. GPIO_FN_STP1_IPEN_PORT193,
  243. /* SIM */
  244. GPIO_FN_SIM_RST, GPIO_FN_SIM_CLK,
  245. GPIO_FN_SIM_D_PORT22, /* SIM_D Port 22/199 */
  246. GPIO_FN_SIM_D_PORT199,
  247. /* MSIOF2 */
  248. GPIO_FN_MSIOF2_TXD, GPIO_FN_MSIOF2_RXD, GPIO_FN_MSIOF2_TSCK,
  249. GPIO_FN_MSIOF2_SS2, GPIO_FN_MSIOF2_TSYNC, GPIO_FN_MSIOF2_SS1,
  250. GPIO_FN_MSIOF2_MCK1, GPIO_FN_MSIOF2_MCK0, GPIO_FN_MSIOF2_RSYNC,
  251. GPIO_FN_MSIOF2_RSCK,
  252. /* KEYSC */
  253. GPIO_FN_KEYIN4, GPIO_FN_KEYIN5,
  254. GPIO_FN_KEYIN6, GPIO_FN_KEYIN7,
  255. GPIO_FN_KEYOUT0, GPIO_FN_KEYOUT1, GPIO_FN_KEYOUT2,
  256. GPIO_FN_KEYOUT3, GPIO_FN_KEYOUT4, GPIO_FN_KEYOUT5,
  257. GPIO_FN_KEYOUT6, GPIO_FN_KEYOUT7,
  258. GPIO_FN_KEYIN0_PORT43, /* MSEL4CR_18_0 */
  259. GPIO_FN_KEYIN1_PORT44,
  260. GPIO_FN_KEYIN2_PORT45,
  261. GPIO_FN_KEYIN3_PORT46,
  262. GPIO_FN_KEYIN0_PORT58, /* MSEL4CR_18_1 */
  263. GPIO_FN_KEYIN1_PORT57,
  264. GPIO_FN_KEYIN2_PORT56,
  265. GPIO_FN_KEYIN3_PORT55,
  266. /* VOU */
  267. GPIO_FN_DV_D0, GPIO_FN_DV_D1, GPIO_FN_DV_D2, GPIO_FN_DV_D3,
  268. GPIO_FN_DV_D4, GPIO_FN_DV_D5, GPIO_FN_DV_D6, GPIO_FN_DV_D7,
  269. GPIO_FN_DV_D8, GPIO_FN_DV_D9, GPIO_FN_DV_D10, GPIO_FN_DV_D11,
  270. GPIO_FN_DV_D12, GPIO_FN_DV_D13, GPIO_FN_DV_D14, GPIO_FN_DV_D15,
  271. GPIO_FN_DV_CLK,
  272. GPIO_FN_DV_VSYNC,
  273. GPIO_FN_DV_HSYNC,
  274. /* MEMC */
  275. GPIO_FN_MEMC_AD0, GPIO_FN_MEMC_AD1, GPIO_FN_MEMC_AD2,
  276. GPIO_FN_MEMC_AD3, GPIO_FN_MEMC_AD4, GPIO_FN_MEMC_AD5,
  277. GPIO_FN_MEMC_AD6, GPIO_FN_MEMC_AD7, GPIO_FN_MEMC_AD8,
  278. GPIO_FN_MEMC_AD9, GPIO_FN_MEMC_AD10, GPIO_FN_MEMC_AD11,
  279. GPIO_FN_MEMC_AD12, GPIO_FN_MEMC_AD13, GPIO_FN_MEMC_AD14,
  280. GPIO_FN_MEMC_AD15, GPIO_FN_MEMC_CS0, GPIO_FN_MEMC_INT,
  281. GPIO_FN_MEMC_NWE, GPIO_FN_MEMC_NOE,
  282. GPIO_FN_MEMC_CS1, /* MSEL4CR_6_0 */
  283. GPIO_FN_MEMC_ADV,
  284. GPIO_FN_MEMC_WAIT,
  285. GPIO_FN_MEMC_BUSCLK,
  286. GPIO_FN_MEMC_A1, /* MSEL4CR_6_1 */
  287. GPIO_FN_MEMC_DREQ0,
  288. GPIO_FN_MEMC_DREQ1,
  289. GPIO_FN_MEMC_A0,
  290. /* MSIOF0 */
  291. GPIO_FN_MSIOF0_SS1, GPIO_FN_MSIOF0_SS2,
  292. GPIO_FN_MSIOF0_RXD, GPIO_FN_MSIOF0_TXD,
  293. GPIO_FN_MSIOF0_MCK0, GPIO_FN_MSIOF0_MCK1,
  294. GPIO_FN_MSIOF0_RSYNC, GPIO_FN_MSIOF0_RSCK,
  295. GPIO_FN_MSIOF0_TSCK, GPIO_FN_MSIOF0_TSYNC,
  296. /* MSIOF1 */
  297. GPIO_FN_MSIOF1_RSCK, GPIO_FN_MSIOF1_RSYNC,
  298. GPIO_FN_MSIOF1_MCK0, GPIO_FN_MSIOF1_MCK1,
  299. GPIO_FN_MSIOF1_SS2_PORT116, GPIO_FN_MSIOF1_SS1_PORT117,
  300. GPIO_FN_MSIOF1_RXD_PORT118, GPIO_FN_MSIOF1_TXD_PORT119,
  301. GPIO_FN_MSIOF1_TSYNC_PORT120,
  302. GPIO_FN_MSIOF1_TSCK_PORT121, /* MSEL4CR_10_0 */
  303. GPIO_FN_MSIOF1_SS1_PORT67, GPIO_FN_MSIOF1_TSCK_PORT72,
  304. GPIO_FN_MSIOF1_TSYNC_PORT73, GPIO_FN_MSIOF1_TXD_PORT74,
  305. GPIO_FN_MSIOF1_RXD_PORT75,
  306. GPIO_FN_MSIOF1_SS2_PORT202, /* MSEL4CR_10_1 */
  307. /* GPIO */
  308. GPIO_FN_GPO0, GPIO_FN_GPI0,
  309. GPIO_FN_GPO1, GPIO_FN_GPI1,
  310. /* USB0 */
  311. GPIO_FN_USB0_OCI, GPIO_FN_USB0_PPON, GPIO_FN_VBUS,
  312. /* USB1 */
  313. GPIO_FN_USB1_OCI, GPIO_FN_USB1_PPON,
  314. /* BBIF1 */
  315. GPIO_FN_BBIF1_RXD, GPIO_FN_BBIF1_TXD, GPIO_FN_BBIF1_TSYNC,
  316. GPIO_FN_BBIF1_TSCK, GPIO_FN_BBIF1_RSCK, GPIO_FN_BBIF1_RSYNC,
  317. GPIO_FN_BBIF1_FLOW, GPIO_FN_BBIF1_RX_FLOW_N,
  318. /* BBIF2 */
  319. GPIO_FN_BBIF2_TXD2_PORT5, /* MSEL5CR_0_0 */
  320. GPIO_FN_BBIF2_RXD2_PORT60,
  321. GPIO_FN_BBIF2_TSYNC2_PORT6,
  322. GPIO_FN_BBIF2_TSCK2_PORT59,
  323. GPIO_FN_BBIF2_RXD2_PORT90, /* MSEL5CR_0_1 */
  324. GPIO_FN_BBIF2_TXD2_PORT183,
  325. GPIO_FN_BBIF2_TSCK2_PORT89,
  326. GPIO_FN_BBIF2_TSYNC2_PORT184,
  327. /* BSC / FLCTL / PCMCIA */
  328. GPIO_FN_CS0, GPIO_FN_CS2, GPIO_FN_CS4,
  329. GPIO_FN_CS5B, GPIO_FN_CS6A,
  330. GPIO_FN_CS5A_PORT105, /* CS5A PORT 19/105 */
  331. GPIO_FN_CS5A_PORT19,
  332. GPIO_FN_IOIS16, /* ? */
  333. GPIO_FN_A0, GPIO_FN_A1, GPIO_FN_A2, GPIO_FN_A3,
  334. GPIO_FN_A4_FOE, /* share with FLCTL */
  335. GPIO_FN_A5_FCDE, /* share with FLCTL */
  336. GPIO_FN_A6, GPIO_FN_A7, GPIO_FN_A8, GPIO_FN_A9,
  337. GPIO_FN_A10, GPIO_FN_A11, GPIO_FN_A12, GPIO_FN_A13,
  338. GPIO_FN_A14, GPIO_FN_A15, GPIO_FN_A16, GPIO_FN_A17,
  339. GPIO_FN_A18, GPIO_FN_A19, GPIO_FN_A20, GPIO_FN_A21,
  340. GPIO_FN_A22, GPIO_FN_A23, GPIO_FN_A24, GPIO_FN_A25,
  341. GPIO_FN_A26,
  342. GPIO_FN_D0_NAF0, GPIO_FN_D1_NAF1, /* share with FLCTL */
  343. GPIO_FN_D2_NAF2, GPIO_FN_D3_NAF3, /* share with FLCTL */
  344. GPIO_FN_D4_NAF4, GPIO_FN_D5_NAF5, /* share with FLCTL */
  345. GPIO_FN_D6_NAF6, GPIO_FN_D7_NAF7, /* share with FLCTL */
  346. GPIO_FN_D8_NAF8, GPIO_FN_D9_NAF9, /* share with FLCTL */
  347. GPIO_FN_D10_NAF10, GPIO_FN_D11_NAF11, /* share with FLCTL */
  348. GPIO_FN_D12_NAF12, GPIO_FN_D13_NAF13, /* share with FLCTL */
  349. GPIO_FN_D14_NAF14, GPIO_FN_D15_NAF15, /* share with FLCTL */
  350. GPIO_FN_D16, GPIO_FN_D17, GPIO_FN_D18, GPIO_FN_D19,
  351. GPIO_FN_D20, GPIO_FN_D21, GPIO_FN_D22, GPIO_FN_D23,
  352. GPIO_FN_D24, GPIO_FN_D25, GPIO_FN_D26, GPIO_FN_D27,
  353. GPIO_FN_D28, GPIO_FN_D29, GPIO_FN_D30, GPIO_FN_D31,
  354. GPIO_FN_WE0_FWE, /* share with FLCTL */
  355. GPIO_FN_WE1,
  356. GPIO_FN_WE2_ICIORD, /* share with PCMCIA */
  357. GPIO_FN_WE3_ICIOWR, /* share with PCMCIA */
  358. GPIO_FN_CKO, GPIO_FN_BS, GPIO_FN_RDWR,
  359. GPIO_FN_RD_FSC, /* share with FLCTL */
  360. GPIO_FN_WAIT_PORT177, /* WAIT Port 90/177 */
  361. GPIO_FN_WAIT_PORT90,
  362. GPIO_FN_FCE0, GPIO_FN_FCE1, GPIO_FN_FRB, /* FLCTL */
  363. /* IRDA */
  364. GPIO_FN_IRDA_FIRSEL, GPIO_FN_IRDA_IN, GPIO_FN_IRDA_OUT,
  365. /* ATAPI */
  366. GPIO_FN_IDE_D0, GPIO_FN_IDE_D1, GPIO_FN_IDE_D2,
  367. GPIO_FN_IDE_D3, GPIO_FN_IDE_D4, GPIO_FN_IDE_D5,
  368. GPIO_FN_IDE_D6, GPIO_FN_IDE_D7, GPIO_FN_IDE_D8,
  369. GPIO_FN_IDE_D9, GPIO_FN_IDE_D10, GPIO_FN_IDE_D11,
  370. GPIO_FN_IDE_D12, GPIO_FN_IDE_D13, GPIO_FN_IDE_D14,
  371. GPIO_FN_IDE_D15, GPIO_FN_IDE_A0, GPIO_FN_IDE_A1,
  372. GPIO_FN_IDE_A2, GPIO_FN_IDE_CS0, GPIO_FN_IDE_CS1,
  373. GPIO_FN_IDE_IOWR, GPIO_FN_IDE_IORD, GPIO_FN_IDE_IORDY,
  374. GPIO_FN_IDE_INT, GPIO_FN_IDE_RST, GPIO_FN_IDE_DIRECTION,
  375. GPIO_FN_IDE_EXBUF_ENB, GPIO_FN_IDE_IODACK, GPIO_FN_IDE_IODREQ,
  376. /* RMII */
  377. GPIO_FN_RMII_CRS_DV, GPIO_FN_RMII_RX_ER, GPIO_FN_RMII_RXD0,
  378. GPIO_FN_RMII_RXD1, GPIO_FN_RMII_TX_EN, GPIO_FN_RMII_TXD0,
  379. GPIO_FN_RMII_MDC, GPIO_FN_RMII_TXD1, GPIO_FN_RMII_MDIO,
  380. GPIO_FN_RMII_REF50CK, /* for RMII */
  381. GPIO_FN_RMII_REF125CK, /* for GMII */
  382. /* GEther */
  383. GPIO_FN_ET_TX_CLK, GPIO_FN_ET_TX_EN, GPIO_FN_ET_ETXD0,
  384. GPIO_FN_ET_ETXD1, GPIO_FN_ET_ETXD2, GPIO_FN_ET_ETXD3,
  385. GPIO_FN_ET_ETXD4, GPIO_FN_ET_ETXD5, /* for GEther */
  386. GPIO_FN_ET_ETXD6, GPIO_FN_ET_ETXD7, /* for GEther */
  387. GPIO_FN_ET_COL, GPIO_FN_ET_TX_ER,
  388. GPIO_FN_ET_RX_CLK, GPIO_FN_ET_RX_DV,
  389. GPIO_FN_ET_ERXD0, GPIO_FN_ET_ERXD1,
  390. GPIO_FN_ET_ERXD2, GPIO_FN_ET_ERXD3,
  391. GPIO_FN_ET_ERXD4, GPIO_FN_ET_ERXD5, /* for GEther */
  392. GPIO_FN_ET_ERXD6, GPIO_FN_ET_ERXD7, /* for GEther */
  393. GPIO_FN_ET_RX_ER, GPIO_FN_ET_CRS,
  394. GPIO_FN_ET_MDC, GPIO_FN_ET_MDIO,
  395. GPIO_FN_ET_LINK, GPIO_FN_ET_PHY_INT,
  396. GPIO_FN_ET_WOL, GPIO_FN_ET_GTX_CLK,
  397. /* DMA0 */
  398. GPIO_FN_DREQ0, GPIO_FN_DACK0,
  399. /* DMA1 */
  400. GPIO_FN_DREQ1, GPIO_FN_DACK1,
  401. /* SYSC */
  402. GPIO_FN_RESETOUTS,
  403. GPIO_FN_RESETP_PULLUP,
  404. GPIO_FN_RESETP_PLAIN,
  405. /* HDMI */
  406. GPIO_FN_HDMI_HPD,
  407. GPIO_FN_HDMI_CEC,
  408. /* SDENC */
  409. GPIO_FN_SDENC_CPG,
  410. GPIO_FN_SDENC_DV_CLKI,
  411. /* IRREM */
  412. GPIO_FN_IROUT,
  413. /* DEBUG */
  414. GPIO_FN_EDEBGREQ_PULLDOWN,
  415. GPIO_FN_EDEBGREQ_PULLUP,
  416. GPIO_FN_TRACEAUD_FROM_VIO,
  417. GPIO_FN_TRACEAUD_FROM_LCDC0,
  418. GPIO_FN_TRACEAUD_FROM_MEMC,
  419. };
  420. /* DMA slave IDs */
  421. enum {
  422. SHDMA_SLAVE_INVALID,
  423. SHDMA_SLAVE_SDHI0_RX,
  424. SHDMA_SLAVE_SDHI0_TX,
  425. SHDMA_SLAVE_SDHI1_RX,
  426. SHDMA_SLAVE_SDHI1_TX,
  427. SHDMA_SLAVE_SDHI2_RX,
  428. SHDMA_SLAVE_SDHI2_TX,
  429. SHDMA_SLAVE_FSIA_RX,
  430. SHDMA_SLAVE_FSIA_TX,
  431. SHDMA_SLAVE_FSIB_TX,
  432. SHDMA_SLAVE_USBHS_TX,
  433. SHDMA_SLAVE_USBHS_RX,
  434. };
  435. extern void r8a7740_meram_workaround(void);
  436. extern void r8a7740_init_irq(void);
  437. extern void r8a7740_map_io(void);
  438. extern void r8a7740_add_early_devices(void);
  439. extern void r8a7740_add_standard_devices(void);
  440. extern void r8a7740_clock_init(u8 md_ck);
  441. extern void r8a7740_pinmux_init(void);
  442. extern void r8a7740_pm_init(void);
  443. #ifdef CONFIG_PM
  444. extern void __init r8a7740_init_pm_domains(void);
  445. #else
  446. static inline void r8a7740_init_pm_domains(void) {}
  447. #endif /* CONFIG_PM */
  448. #endif /* __ASM_R8A7740_H__ */