pinctrl-sun6i-a31.c 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. /*
  2. * Allwinner A31 SoCs pinctrl driver.
  3. *
  4. * Copyright (C) 2014 Maxime Ripard
  5. *
  6. * Maxime Ripard <maxime.ripard@free-electrons.com>
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #include <linux/module.h>
  13. #include <linux/platform_device.h>
  14. #include <linux/of.h>
  15. #include <linux/of_device.h>
  16. #include <linux/pinctrl/pinctrl.h>
  17. #include "pinctrl-sunxi.h"
  18. static const struct sunxi_desc_pin sun6i_a31_pins[] = {
  19. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
  20. SUNXI_FUNCTION(0x0, "gpio_in"),
  21. SUNXI_FUNCTION(0x1, "gpio_out"),
  22. SUNXI_FUNCTION(0x2, "gmac"), /* TXD0 */
  23. SUNXI_FUNCTION(0x3, "lcd1"), /* D0 */
  24. SUNXI_FUNCTION(0x4, "uart1"), /* DTR */
  25. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */
  26. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
  27. SUNXI_FUNCTION(0x0, "gpio_in"),
  28. SUNXI_FUNCTION(0x1, "gpio_out"),
  29. SUNXI_FUNCTION(0x2, "gmac"), /* TXD1 */
  30. SUNXI_FUNCTION(0x3, "lcd1"), /* D1 */
  31. SUNXI_FUNCTION(0x4, "uart1"), /* DSR */
  32. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */
  33. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
  34. SUNXI_FUNCTION(0x0, "gpio_in"),
  35. SUNXI_FUNCTION(0x1, "gpio_out"),
  36. SUNXI_FUNCTION(0x2, "gmac"), /* TXD2 */
  37. SUNXI_FUNCTION(0x3, "lcd1"), /* D2 */
  38. SUNXI_FUNCTION(0x4, "uart1"), /* DCD */
  39. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */
  40. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
  41. SUNXI_FUNCTION(0x0, "gpio_in"),
  42. SUNXI_FUNCTION(0x1, "gpio_out"),
  43. SUNXI_FUNCTION(0x2, "gmac"), /* TXD3 */
  44. SUNXI_FUNCTION(0x3, "lcd1"), /* D3 */
  45. SUNXI_FUNCTION(0x4, "uart1"), /* RING */
  46. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */
  47. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
  48. SUNXI_FUNCTION(0x0, "gpio_in"),
  49. SUNXI_FUNCTION(0x1, "gpio_out"),
  50. SUNXI_FUNCTION(0x2, "gmac"), /* TXD4 */
  51. SUNXI_FUNCTION(0x3, "lcd1"), /* D4 */
  52. SUNXI_FUNCTION(0x4, "uart1"), /* TX */
  53. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */
  54. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
  55. SUNXI_FUNCTION(0x0, "gpio_in"),
  56. SUNXI_FUNCTION(0x1, "gpio_out"),
  57. SUNXI_FUNCTION(0x2, "gmac"), /* TXD5 */
  58. SUNXI_FUNCTION(0x3, "lcd1"), /* D5 */
  59. SUNXI_FUNCTION(0x4, "uart1"), /* RX */
  60. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 5)), /* PA_EINT5 */
  61. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
  62. SUNXI_FUNCTION(0x0, "gpio_in"),
  63. SUNXI_FUNCTION(0x1, "gpio_out"),
  64. SUNXI_FUNCTION(0x2, "gmac"), /* TXD6 */
  65. SUNXI_FUNCTION(0x3, "lcd1"), /* D6 */
  66. SUNXI_FUNCTION(0x4, "uart1"), /* RTS */
  67. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 6)), /* PA_EINT6 */
  68. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
  69. SUNXI_FUNCTION(0x0, "gpio_in"),
  70. SUNXI_FUNCTION(0x1, "gpio_out"),
  71. SUNXI_FUNCTION(0x2, "gmac"), /* TXD7 */
  72. SUNXI_FUNCTION(0x3, "lcd1"), /* D7 */
  73. SUNXI_FUNCTION(0x4, "uart1"), /* CTS */
  74. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 7)), /* PA_EINT7 */
  75. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
  76. SUNXI_FUNCTION(0x0, "gpio_in"),
  77. SUNXI_FUNCTION(0x1, "gpio_out"),
  78. SUNXI_FUNCTION(0x2, "gmac"), /* TXCLK */
  79. SUNXI_FUNCTION(0x3, "lcd1"), /* D8 */
  80. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 8)), /* PA_EINT8 */
  81. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
  82. SUNXI_FUNCTION(0x0, "gpio_in"),
  83. SUNXI_FUNCTION(0x1, "gpio_out"),
  84. SUNXI_FUNCTION(0x2, "gmac"), /* TXEN */
  85. SUNXI_FUNCTION(0x3, "lcd1"), /* D9 */
  86. SUNXI_FUNCTION(0x4, "mmc3"), /* CMD */
  87. SUNXI_FUNCTION(0x5, "mmc2"), /* CMD */
  88. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 9)), /* PA_EINT9 */
  89. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
  90. SUNXI_FUNCTION(0x0, "gpio_in"),
  91. SUNXI_FUNCTION(0x1, "gpio_out"),
  92. SUNXI_FUNCTION(0x2, "gmac"), /* GTXCLK */
  93. SUNXI_FUNCTION(0x3, "lcd1"), /* D10 */
  94. SUNXI_FUNCTION(0x4, "mmc3"), /* CLK */
  95. SUNXI_FUNCTION(0x5, "mmc2"), /* CLK */
  96. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 10)), /* PA_EINT10 */
  97. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
  98. SUNXI_FUNCTION(0x0, "gpio_in"),
  99. SUNXI_FUNCTION(0x1, "gpio_out"),
  100. SUNXI_FUNCTION(0x2, "gmac"), /* RXD0 */
  101. SUNXI_FUNCTION(0x3, "lcd1"), /* D11 */
  102. SUNXI_FUNCTION(0x4, "mmc3"), /* D0 */
  103. SUNXI_FUNCTION(0x5, "mmc2"), /* D0 */
  104. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 11)), /* PA_EINT11 */
  105. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
  106. SUNXI_FUNCTION(0x0, "gpio_in"),
  107. SUNXI_FUNCTION(0x1, "gpio_out"),
  108. SUNXI_FUNCTION(0x2, "gmac"), /* RXD1 */
  109. SUNXI_FUNCTION(0x3, "lcd1"), /* D12 */
  110. SUNXI_FUNCTION(0x4, "mmc3"), /* D1 */
  111. SUNXI_FUNCTION(0x5, "mmc2"), /* D1 */
  112. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 12)), /* PA_EINT12 */
  113. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
  114. SUNXI_FUNCTION(0x0, "gpio_in"),
  115. SUNXI_FUNCTION(0x1, "gpio_out"),
  116. SUNXI_FUNCTION(0x2, "gmac"), /* RXD2 */
  117. SUNXI_FUNCTION(0x3, "lcd1"), /* D13 */
  118. SUNXI_FUNCTION(0x4, "mmc3"), /* D2 */
  119. SUNXI_FUNCTION(0x5, "mmc2"), /* D2 */
  120. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 13)), /* PA_EINT13 */
  121. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
  122. SUNXI_FUNCTION(0x0, "gpio_in"),
  123. SUNXI_FUNCTION(0x1, "gpio_out"),
  124. SUNXI_FUNCTION(0x2, "gmac"), /* RXD3 */
  125. SUNXI_FUNCTION(0x3, "lcd1"), /* D14 */
  126. SUNXI_FUNCTION(0x4, "mmc3"), /* D3 */
  127. SUNXI_FUNCTION(0x5, "mmc2"), /* D3 */
  128. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PA_EINT14 */
  129. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
  130. SUNXI_FUNCTION(0x0, "gpio_in"),
  131. SUNXI_FUNCTION(0x1, "gpio_out"),
  132. SUNXI_FUNCTION(0x2, "gmac"), /* RXD4 */
  133. SUNXI_FUNCTION(0x3, "lcd1"), /* D15 */
  134. SUNXI_FUNCTION(0x4, "clk_out_a"),
  135. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */
  136. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
  137. SUNXI_FUNCTION(0x0, "gpio_in"),
  138. SUNXI_FUNCTION(0x1, "gpio_out"),
  139. SUNXI_FUNCTION(0x2, "gmac"), /* RXD5 */
  140. SUNXI_FUNCTION(0x3, "lcd1"), /* D16 */
  141. SUNXI_FUNCTION(0x4, "dmic"), /* CLK */
  142. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */
  143. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
  144. SUNXI_FUNCTION(0x0, "gpio_in"),
  145. SUNXI_FUNCTION(0x1, "gpio_out"),
  146. SUNXI_FUNCTION(0x2, "gmac"), /* RXD6 */
  147. SUNXI_FUNCTION(0x3, "lcd1"), /* D17 */
  148. SUNXI_FUNCTION(0x4, "dmic"), /* DIN */
  149. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */
  150. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
  151. SUNXI_FUNCTION(0x0, "gpio_in"),
  152. SUNXI_FUNCTION(0x1, "gpio_out"),
  153. SUNXI_FUNCTION(0x2, "gmac"), /* RXD7 */
  154. SUNXI_FUNCTION(0x3, "lcd1"), /* D18 */
  155. SUNXI_FUNCTION(0x4, "clk_out_b"),
  156. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */
  157. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
  158. SUNXI_FUNCTION(0x0, "gpio_in"),
  159. SUNXI_FUNCTION(0x1, "gpio_out"),
  160. SUNXI_FUNCTION(0x2, "gmac"), /* RXDV */
  161. SUNXI_FUNCTION(0x3, "lcd1"), /* D19 */
  162. SUNXI_FUNCTION(0x4, "pwm3"), /* Positive */
  163. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 19)), /* PA_EINT19 */
  164. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 20),
  165. SUNXI_FUNCTION(0x0, "gpio_in"),
  166. SUNXI_FUNCTION(0x1, "gpio_out"),
  167. SUNXI_FUNCTION(0x2, "gmac"), /* RXCLK */
  168. SUNXI_FUNCTION(0x3, "lcd1"), /* D20 */
  169. SUNXI_FUNCTION(0x4, "pwm3"), /* Negative */
  170. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 20)), /* PA_EINT20 */
  171. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 21),
  172. SUNXI_FUNCTION(0x0, "gpio_in"),
  173. SUNXI_FUNCTION(0x1, "gpio_out"),
  174. SUNXI_FUNCTION(0x2, "gmac"), /* TXERR */
  175. SUNXI_FUNCTION(0x3, "lcd1"), /* D21 */
  176. SUNXI_FUNCTION(0x4, "spi3"), /* CS0 */
  177. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 21)), /* PA_EINT21 */
  178. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 22),
  179. SUNXI_FUNCTION(0x0, "gpio_in"),
  180. SUNXI_FUNCTION(0x1, "gpio_out"),
  181. SUNXI_FUNCTION(0x2, "gmac"), /* RXERR */
  182. SUNXI_FUNCTION(0x3, "lcd1"), /* D22 */
  183. SUNXI_FUNCTION(0x4, "spi3"), /* CLK */
  184. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 22)), /* PA_EINT22 */
  185. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 23),
  186. SUNXI_FUNCTION(0x0, "gpio_in"),
  187. SUNXI_FUNCTION(0x1, "gpio_out"),
  188. SUNXI_FUNCTION(0x2, "gmac"), /* COL */
  189. SUNXI_FUNCTION(0x3, "lcd1"), /* D23 */
  190. SUNXI_FUNCTION(0x4, "spi3"), /* MOSI */
  191. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 23)), /* PA_EINT23 */
  192. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 24),
  193. SUNXI_FUNCTION(0x0, "gpio_in"),
  194. SUNXI_FUNCTION(0x1, "gpio_out"),
  195. SUNXI_FUNCTION(0x2, "gmac"), /* CRS */
  196. SUNXI_FUNCTION(0x3, "lcd1"), /* CLK */
  197. SUNXI_FUNCTION(0x4, "spi3"), /* MISO */
  198. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 24)), /* PA_EINT24 */
  199. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 25),
  200. SUNXI_FUNCTION(0x0, "gpio_in"),
  201. SUNXI_FUNCTION(0x1, "gpio_out"),
  202. SUNXI_FUNCTION(0x2, "gmac"), /* CLKIN */
  203. SUNXI_FUNCTION(0x3, "lcd1"), /* DE */
  204. SUNXI_FUNCTION(0x4, "spi3"), /* CS1 */
  205. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 25)), /* PA_EINT25 */
  206. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 26),
  207. SUNXI_FUNCTION(0x0, "gpio_in"),
  208. SUNXI_FUNCTION(0x1, "gpio_out"),
  209. SUNXI_FUNCTION(0x2, "gmac"), /* MDC */
  210. SUNXI_FUNCTION(0x3, "lcd1"), /* HSYNC */
  211. SUNXI_FUNCTION(0x4, "clk_out_c"),
  212. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */
  213. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27),
  214. SUNXI_FUNCTION(0x0, "gpio_in"),
  215. SUNXI_FUNCTION(0x1, "gpio_out"),
  216. SUNXI_FUNCTION(0x2, "gmac"), /* MDIO */
  217. SUNXI_FUNCTION(0x3, "lcd1"), /* VSYNC */
  218. SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 27)), /* PA_EINT27 */
  219. /* Hole */
  220. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
  221. SUNXI_FUNCTION(0x0, "gpio_in"),
  222. SUNXI_FUNCTION(0x1, "gpio_out"),
  223. SUNXI_FUNCTION(0x2, "i2s0"), /* MCLK */
  224. SUNXI_FUNCTION(0x3, "uart3"), /* CTS */
  225. SUNXI_FUNCTION(0x4, "csi"), /* MCLK1 */
  226. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 0)), /* PB_EINT0 */
  227. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
  228. SUNXI_FUNCTION(0x0, "gpio_in"),
  229. SUNXI_FUNCTION(0x1, "gpio_out"),
  230. SUNXI_FUNCTION(0x2, "i2s0"), /* BCLK */
  231. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 1)), /* PB_EINT1 */
  232. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
  233. SUNXI_FUNCTION(0x0, "gpio_in"),
  234. SUNXI_FUNCTION(0x1, "gpio_out"),
  235. SUNXI_FUNCTION(0x2, "i2s0"), /* LRCK */
  236. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 2)), /* PB_EINT2 */
  237. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
  238. SUNXI_FUNCTION(0x0, "gpio_in"),
  239. SUNXI_FUNCTION(0x1, "gpio_out"),
  240. SUNXI_FUNCTION(0x2, "i2s0"), /* DO0 */
  241. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 3)), /* PB_EINT3 */
  242. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
  243. SUNXI_FUNCTION(0x0, "gpio_in"),
  244. SUNXI_FUNCTION(0x1, "gpio_out"),
  245. SUNXI_FUNCTION(0x2, "i2s0"), /* DO1 */
  246. SUNXI_FUNCTION(0x3, "uart3"), /* RTS */
  247. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)), /* PB_EINT4 */
  248. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
  249. SUNXI_FUNCTION(0x0, "gpio_in"),
  250. SUNXI_FUNCTION(0x1, "gpio_out"),
  251. SUNXI_FUNCTION(0x2, "i2s0"), /* DO2 */
  252. SUNXI_FUNCTION(0x3, "uart3"), /* TX */
  253. SUNXI_FUNCTION(0x4, "i2c3"), /* SCK */
  254. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)), /* PB_EINT5 */
  255. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
  256. SUNXI_FUNCTION(0x0, "gpio_in"),
  257. SUNXI_FUNCTION(0x1, "gpio_out"),
  258. SUNXI_FUNCTION(0x2, "i2s0"), /* DO3 */
  259. SUNXI_FUNCTION(0x3, "uart3"), /* RX */
  260. SUNXI_FUNCTION(0x4, "i2c3"), /* SDA */
  261. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 6)), /* PB_EINT6 */
  262. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
  263. SUNXI_FUNCTION(0x0, "gpio_in"),
  264. SUNXI_FUNCTION(0x1, "gpio_out"),
  265. SUNXI_FUNCTION(0x3, "i2s0"), /* DI */
  266. SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 7)), /* PB_EINT7 */
  267. /* Hole */
  268. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
  269. SUNXI_FUNCTION(0x0, "gpio_in"),
  270. SUNXI_FUNCTION(0x1, "gpio_out"),
  271. SUNXI_FUNCTION(0x2, "nand0"), /* WE */
  272. SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
  273. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
  274. SUNXI_FUNCTION(0x0, "gpio_in"),
  275. SUNXI_FUNCTION(0x1, "gpio_out"),
  276. SUNXI_FUNCTION(0x2, "nand0"), /* ALE */
  277. SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
  278. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
  279. SUNXI_FUNCTION(0x0, "gpio_in"),
  280. SUNXI_FUNCTION(0x1, "gpio_out"),
  281. SUNXI_FUNCTION(0x2, "nand0"), /* CLE */
  282. SUNXI_FUNCTION(0x3, "spi0")), /* CLK */
  283. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
  284. SUNXI_FUNCTION(0x0, "gpio_in"),
  285. SUNXI_FUNCTION(0x1, "gpio_out"),
  286. SUNXI_FUNCTION(0x2, "nand0")), /* CE1 */
  287. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
  288. SUNXI_FUNCTION(0x0, "gpio_in"),
  289. SUNXI_FUNCTION(0x1, "gpio_out"),
  290. SUNXI_FUNCTION(0x2, "nand0")), /* CE0 */
  291. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
  292. SUNXI_FUNCTION(0x0, "gpio_in"),
  293. SUNXI_FUNCTION(0x1, "gpio_out"),
  294. SUNXI_FUNCTION(0x2, "nand0")), /* RE */
  295. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
  296. SUNXI_FUNCTION(0x0, "gpio_in"),
  297. SUNXI_FUNCTION(0x1, "gpio_out"),
  298. SUNXI_FUNCTION(0x2, "nand0"), /* RB0 */
  299. SUNXI_FUNCTION(0x3, "mmc2"), /* CMD */
  300. SUNXI_FUNCTION(0x4, "mmc3")), /* CMD */
  301. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
  302. SUNXI_FUNCTION(0x0, "gpio_in"),
  303. SUNXI_FUNCTION(0x1, "gpio_out"),
  304. SUNXI_FUNCTION(0x2, "nand0"), /* RB1 */
  305. SUNXI_FUNCTION(0x3, "mmc2"), /* CLK */
  306. SUNXI_FUNCTION(0x4, "mmc3")), /* CLK */
  307. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
  308. SUNXI_FUNCTION(0x0, "gpio_in"),
  309. SUNXI_FUNCTION(0x1, "gpio_out"),
  310. SUNXI_FUNCTION(0x2, "nand0"), /* DQ0 */
  311. SUNXI_FUNCTION(0x3, "mmc2"), /* D0 */
  312. SUNXI_FUNCTION(0x4, "mmc3")), /* D0 */
  313. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
  314. SUNXI_FUNCTION(0x0, "gpio_in"),
  315. SUNXI_FUNCTION(0x1, "gpio_out"),
  316. SUNXI_FUNCTION(0x2, "nand0"), /* DQ1 */
  317. SUNXI_FUNCTION(0x3, "mmc2"), /* D1 */
  318. SUNXI_FUNCTION(0x4, "mmc3")), /* D1 */
  319. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
  320. SUNXI_FUNCTION(0x0, "gpio_in"),
  321. SUNXI_FUNCTION(0x1, "gpio_out"),
  322. SUNXI_FUNCTION(0x2, "nand0"), /* DQ2 */
  323. SUNXI_FUNCTION(0x3, "mmc2"), /* D2 */
  324. SUNXI_FUNCTION(0x4, "mmc3")), /* D2 */
  325. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
  326. SUNXI_FUNCTION(0x0, "gpio_in"),
  327. SUNXI_FUNCTION(0x1, "gpio_out"),
  328. SUNXI_FUNCTION(0x2, "nand0"), /* DQ3 */
  329. SUNXI_FUNCTION(0x3, "mmc2"), /* D3 */
  330. SUNXI_FUNCTION(0x4, "mmc3")), /* D3 */
  331. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
  332. SUNXI_FUNCTION(0x0, "gpio_in"),
  333. SUNXI_FUNCTION(0x1, "gpio_out"),
  334. SUNXI_FUNCTION(0x2, "nand0"), /* DQ4 */
  335. SUNXI_FUNCTION(0x3, "mmc2"), /* D4 */
  336. SUNXI_FUNCTION(0x4, "mmc3")), /* D4 */
  337. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
  338. SUNXI_FUNCTION(0x0, "gpio_in"),
  339. SUNXI_FUNCTION(0x1, "gpio_out"),
  340. SUNXI_FUNCTION(0x2, "nand0"), /* DQ5 */
  341. SUNXI_FUNCTION(0x3, "mmc2"), /* D5 */
  342. SUNXI_FUNCTION(0x4, "mmc3")), /* D5 */
  343. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
  344. SUNXI_FUNCTION(0x0, "gpio_in"),
  345. SUNXI_FUNCTION(0x1, "gpio_out"),
  346. SUNXI_FUNCTION(0x2, "nand0"), /* DQ6 */
  347. SUNXI_FUNCTION(0x3, "mmc2"), /* D6 */
  348. SUNXI_FUNCTION(0x4, "mmc3")), /* D6 */
  349. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
  350. SUNXI_FUNCTION(0x0, "gpio_in"),
  351. SUNXI_FUNCTION(0x1, "gpio_out"),
  352. SUNXI_FUNCTION(0x2, "nand0"), /* DQ7 */
  353. SUNXI_FUNCTION(0x3, "mmc2"), /* D7 */
  354. SUNXI_FUNCTION(0x4, "mmc3")), /* D7 */
  355. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
  356. SUNXI_FUNCTION(0x0, "gpio_in"),
  357. SUNXI_FUNCTION(0x1, "gpio_out"),
  358. SUNXI_FUNCTION(0x2, "nand0"), /* DQ8 */
  359. SUNXI_FUNCTION(0x3, "nand1")), /* DQ0 */
  360. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
  361. SUNXI_FUNCTION(0x0, "gpio_in"),
  362. SUNXI_FUNCTION(0x1, "gpio_out"),
  363. SUNXI_FUNCTION(0x2, "nand0"), /* DQ9 */
  364. SUNXI_FUNCTION(0x3, "nand1")), /* DQ1 */
  365. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
  366. SUNXI_FUNCTION(0x0, "gpio_in"),
  367. SUNXI_FUNCTION(0x1, "gpio_out"),
  368. SUNXI_FUNCTION(0x2, "nand0"), /* DQ10 */
  369. SUNXI_FUNCTION(0x3, "nand1")), /* DQ2 */
  370. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
  371. SUNXI_FUNCTION(0x0, "gpio_in"),
  372. SUNXI_FUNCTION(0x1, "gpio_out"),
  373. SUNXI_FUNCTION(0x2, "nand0"), /* DQ11 */
  374. SUNXI_FUNCTION(0x3, "nand1")), /* DQ3 */
  375. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 20),
  376. SUNXI_FUNCTION(0x0, "gpio_in"),
  377. SUNXI_FUNCTION(0x1, "gpio_out"),
  378. SUNXI_FUNCTION(0x2, "nand0"), /* DQ12 */
  379. SUNXI_FUNCTION(0x3, "nand1")), /* DQ4 */
  380. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 21),
  381. SUNXI_FUNCTION(0x0, "gpio_in"),
  382. SUNXI_FUNCTION(0x1, "gpio_out"),
  383. SUNXI_FUNCTION(0x2, "nand0"), /* DQ13 */
  384. SUNXI_FUNCTION(0x3, "nand1")), /* DQ5 */
  385. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 22),
  386. SUNXI_FUNCTION(0x0, "gpio_in"),
  387. SUNXI_FUNCTION(0x1, "gpio_out"),
  388. SUNXI_FUNCTION(0x2, "nand0"), /* DQ14 */
  389. SUNXI_FUNCTION(0x3, "nand1")), /* DQ6 */
  390. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 23),
  391. SUNXI_FUNCTION(0x0, "gpio_in"),
  392. SUNXI_FUNCTION(0x1, "gpio_out"),
  393. SUNXI_FUNCTION(0x2, "nand0"), /* DQ15 */
  394. SUNXI_FUNCTION(0x3, "nand1")), /* DQ7 */
  395. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 24),
  396. SUNXI_FUNCTION(0x0, "gpio_in"),
  397. SUNXI_FUNCTION(0x1, "gpio_out"),
  398. SUNXI_FUNCTION(0x2, "nand0"), /* DQS */
  399. SUNXI_FUNCTION(0x3, "mmc2"), /* RST */
  400. SUNXI_FUNCTION(0x4, "mmc3")), /* RST */
  401. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 25),
  402. SUNXI_FUNCTION(0x0, "gpio_in"),
  403. SUNXI_FUNCTION(0x1, "gpio_out"),
  404. SUNXI_FUNCTION(0x2, "nand0")), /* CE2 */
  405. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 26),
  406. SUNXI_FUNCTION(0x0, "gpio_in"),
  407. SUNXI_FUNCTION(0x1, "gpio_out"),
  408. SUNXI_FUNCTION(0x2, "nand0")), /* CE3 */
  409. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 27),
  410. SUNXI_FUNCTION(0x0, "gpio_in"),
  411. SUNXI_FUNCTION(0x1, "gpio_out"),
  412. SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
  413. /* Hole */
  414. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
  415. SUNXI_FUNCTION(0x0, "gpio_in"),
  416. SUNXI_FUNCTION(0x1, "gpio_out"),
  417. SUNXI_FUNCTION(0x2, "lcd0"), /* D0 */
  418. SUNXI_FUNCTION(0x3, "lvds0")), /* VP0 */
  419. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
  420. SUNXI_FUNCTION(0x0, "gpio_in"),
  421. SUNXI_FUNCTION(0x1, "gpio_out"),
  422. SUNXI_FUNCTION(0x2, "lcd0"), /* D1 */
  423. SUNXI_FUNCTION(0x3, "lvds0")), /* VN0 */
  424. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
  425. SUNXI_FUNCTION(0x0, "gpio_in"),
  426. SUNXI_FUNCTION(0x1, "gpio_out"),
  427. SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */
  428. SUNXI_FUNCTION(0x3, "lvds0")), /* VP1 */
  429. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
  430. SUNXI_FUNCTION(0x0, "gpio_in"),
  431. SUNXI_FUNCTION(0x1, "gpio_out"),
  432. SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */
  433. SUNXI_FUNCTION(0x3, "lvds0")), /* VN1 */
  434. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
  435. SUNXI_FUNCTION(0x0, "gpio_in"),
  436. SUNXI_FUNCTION(0x1, "gpio_out"),
  437. SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */
  438. SUNXI_FUNCTION(0x3, "lvds0")), /* VP2 */
  439. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
  440. SUNXI_FUNCTION(0x0, "gpio_in"),
  441. SUNXI_FUNCTION(0x1, "gpio_out"),
  442. SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */
  443. SUNXI_FUNCTION(0x3, "lvds0")), /* VN2 */
  444. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
  445. SUNXI_FUNCTION(0x0, "gpio_in"),
  446. SUNXI_FUNCTION(0x1, "gpio_out"),
  447. SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */
  448. SUNXI_FUNCTION(0x3, "lvds0")), /* VPC */
  449. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
  450. SUNXI_FUNCTION(0x0, "gpio_in"),
  451. SUNXI_FUNCTION(0x1, "gpio_out"),
  452. SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */
  453. SUNXI_FUNCTION(0x3, "lvds0")), /* VNC */
  454. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
  455. SUNXI_FUNCTION(0x0, "gpio_in"),
  456. SUNXI_FUNCTION(0x1, "gpio_out"),
  457. SUNXI_FUNCTION(0x2, "lcd0"), /* D8 */
  458. SUNXI_FUNCTION(0x3, "lvds0")), /* VP3 */
  459. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
  460. SUNXI_FUNCTION(0x0, "gpio_in"),
  461. SUNXI_FUNCTION(0x1, "gpio_out"),
  462. SUNXI_FUNCTION(0x2, "lcd0"), /* D9 */
  463. SUNXI_FUNCTION(0x3, "lvds0")), /* VN3 */
  464. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
  465. SUNXI_FUNCTION(0x0, "gpio_in"),
  466. SUNXI_FUNCTION(0x1, "gpio_out"),
  467. SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */
  468. SUNXI_FUNCTION(0x3, "lvds1")), /* VP0 */
  469. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
  470. SUNXI_FUNCTION(0x0, "gpio_in"),
  471. SUNXI_FUNCTION(0x1, "gpio_out"),
  472. SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */
  473. SUNXI_FUNCTION(0x3, "lvds1")), /* VN0 */
  474. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
  475. SUNXI_FUNCTION(0x0, "gpio_in"),
  476. SUNXI_FUNCTION(0x1, "gpio_out"),
  477. SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */
  478. SUNXI_FUNCTION(0x3, "lvds1")), /* VP1 */
  479. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
  480. SUNXI_FUNCTION(0x0, "gpio_in"),
  481. SUNXI_FUNCTION(0x1, "gpio_out"),
  482. SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */
  483. SUNXI_FUNCTION(0x3, "lvds1")), /* VN1 */
  484. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
  485. SUNXI_FUNCTION(0x0, "gpio_in"),
  486. SUNXI_FUNCTION(0x1, "gpio_out"),
  487. SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */
  488. SUNXI_FUNCTION(0x3, "lvds1")), /* VP2 */
  489. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
  490. SUNXI_FUNCTION(0x0, "gpio_in"),
  491. SUNXI_FUNCTION(0x1, "gpio_out"),
  492. SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */
  493. SUNXI_FUNCTION(0x3, "lvds1")), /* VN2 */
  494. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
  495. SUNXI_FUNCTION(0x0, "gpio_in"),
  496. SUNXI_FUNCTION(0x1, "gpio_out"),
  497. SUNXI_FUNCTION(0x2, "lcd0"), /* D16 */
  498. SUNXI_FUNCTION(0x3, "lvds1")), /* VPC */
  499. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
  500. SUNXI_FUNCTION(0x0, "gpio_in"),
  501. SUNXI_FUNCTION(0x1, "gpio_out"),
  502. SUNXI_FUNCTION(0x2, "lcd0"), /* D17 */
  503. SUNXI_FUNCTION(0x3, "lvds1")), /* VNC */
  504. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
  505. SUNXI_FUNCTION(0x0, "gpio_in"),
  506. SUNXI_FUNCTION(0x1, "gpio_out"),
  507. SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */
  508. SUNXI_FUNCTION(0x3, "lvds1")), /* VP3 */
  509. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
  510. SUNXI_FUNCTION(0x0, "gpio_in"),
  511. SUNXI_FUNCTION(0x1, "gpio_out"),
  512. SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */
  513. SUNXI_FUNCTION(0x3, "lvds1")), /* VN3 */
  514. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
  515. SUNXI_FUNCTION(0x0, "gpio_in"),
  516. SUNXI_FUNCTION(0x1, "gpio_out"),
  517. SUNXI_FUNCTION(0x2, "lcd0")), /* D20 */
  518. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
  519. SUNXI_FUNCTION(0x0, "gpio_in"),
  520. SUNXI_FUNCTION(0x1, "gpio_out"),
  521. SUNXI_FUNCTION(0x2, "lcd0")), /* D21 */
  522. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
  523. SUNXI_FUNCTION(0x0, "gpio_in"),
  524. SUNXI_FUNCTION(0x1, "gpio_out"),
  525. SUNXI_FUNCTION(0x2, "lcd0")), /* D22 */
  526. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
  527. SUNXI_FUNCTION(0x0, "gpio_in"),
  528. SUNXI_FUNCTION(0x1, "gpio_out"),
  529. SUNXI_FUNCTION(0x2, "lcd0")), /* D23 */
  530. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
  531. SUNXI_FUNCTION(0x0, "gpio_in"),
  532. SUNXI_FUNCTION(0x1, "gpio_out"),
  533. SUNXI_FUNCTION(0x2, "lcd0")), /* CLK */
  534. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
  535. SUNXI_FUNCTION(0x0, "gpio_in"),
  536. SUNXI_FUNCTION(0x1, "gpio_out"),
  537. SUNXI_FUNCTION(0x2, "lcd0")), /* DE */
  538. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
  539. SUNXI_FUNCTION(0x0, "gpio_in"),
  540. SUNXI_FUNCTION(0x1, "gpio_out"),
  541. SUNXI_FUNCTION(0x2, "lcd0")), /* HSYNC */
  542. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
  543. SUNXI_FUNCTION(0x0, "gpio_in"),
  544. SUNXI_FUNCTION(0x1, "gpio_out"),
  545. SUNXI_FUNCTION(0x2, "lcd0")), /* VSYNC */
  546. /* Hole */
  547. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
  548. SUNXI_FUNCTION(0x0, "gpio_in"),
  549. SUNXI_FUNCTION(0x1, "gpio_out"),
  550. SUNXI_FUNCTION(0x2, "csi"), /* PCLK */
  551. SUNXI_FUNCTION(0x3, "ts"), /* CLK */
  552. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 0)), /* PE_EINT0 */
  553. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
  554. SUNXI_FUNCTION(0x0, "gpio_in"),
  555. SUNXI_FUNCTION(0x1, "gpio_out"),
  556. SUNXI_FUNCTION(0x2, "csi"), /* MCLK */
  557. SUNXI_FUNCTION(0x3, "ts"), /* ERR */
  558. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 1)), /* PE_EINT1 */
  559. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
  560. SUNXI_FUNCTION(0x0, "gpio_in"),
  561. SUNXI_FUNCTION(0x1, "gpio_out"),
  562. SUNXI_FUNCTION(0x2, "csi"), /* HSYNC */
  563. SUNXI_FUNCTION(0x3, "ts"), /* SYNC */
  564. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 2)), /* PE_EINT2 */
  565. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
  566. SUNXI_FUNCTION(0x0, "gpio_in"),
  567. SUNXI_FUNCTION(0x1, "gpio_out"),
  568. SUNXI_FUNCTION(0x2, "csi"), /* VSYNC */
  569. SUNXI_FUNCTION(0x3, "ts"), /* DVLD */
  570. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 3)), /* PE_EINT3 */
  571. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
  572. SUNXI_FUNCTION(0x0, "gpio_in"),
  573. SUNXI_FUNCTION(0x1, "gpio_out"),
  574. SUNXI_FUNCTION(0x2, "csi"), /* D0 */
  575. SUNXI_FUNCTION(0x3, "uart5"), /* TX */
  576. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 4)), /* PE_EINT4 */
  577. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
  578. SUNXI_FUNCTION(0x0, "gpio_in"),
  579. SUNXI_FUNCTION(0x1, "gpio_out"),
  580. SUNXI_FUNCTION(0x2, "csi"), /* D1 */
  581. SUNXI_FUNCTION(0x3, "uart5"), /* RX */
  582. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 5)), /* PE_EINT5 */
  583. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
  584. SUNXI_FUNCTION(0x0, "gpio_in"),
  585. SUNXI_FUNCTION(0x1, "gpio_out"),
  586. SUNXI_FUNCTION(0x2, "csi"), /* D2 */
  587. SUNXI_FUNCTION(0x3, "uart5"), /* RTS */
  588. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 6)), /* PE_EINT6 */
  589. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
  590. SUNXI_FUNCTION(0x0, "gpio_in"),
  591. SUNXI_FUNCTION(0x1, "gpio_out"),
  592. SUNXI_FUNCTION(0x2, "csi"), /* D3 */
  593. SUNXI_FUNCTION(0x3, "uart5"), /* CTS */
  594. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 7)), /* PE_EINT7 */
  595. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
  596. SUNXI_FUNCTION(0x0, "gpio_in"),
  597. SUNXI_FUNCTION(0x1, "gpio_out"),
  598. SUNXI_FUNCTION(0x2, "csi"), /* D4 */
  599. SUNXI_FUNCTION(0x3, "ts"), /* D0 */
  600. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 8)), /* PE_EINT8 */
  601. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
  602. SUNXI_FUNCTION(0x0, "gpio_in"),
  603. SUNXI_FUNCTION(0x1, "gpio_out"),
  604. SUNXI_FUNCTION(0x2, "csi"), /* D5 */
  605. SUNXI_FUNCTION(0x3, "ts"), /* D1 */
  606. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 9)), /* PE_EINT9 */
  607. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
  608. SUNXI_FUNCTION(0x0, "gpio_in"),
  609. SUNXI_FUNCTION(0x1, "gpio_out"),
  610. SUNXI_FUNCTION(0x2, "csi"), /* D6 */
  611. SUNXI_FUNCTION(0x3, "ts"), /* D2 */
  612. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 10)), /* PE_EINT10 */
  613. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
  614. SUNXI_FUNCTION(0x0, "gpio_in"),
  615. SUNXI_FUNCTION(0x1, "gpio_out"),
  616. SUNXI_FUNCTION(0x2, "csi"), /* D7 */
  617. SUNXI_FUNCTION(0x3, "ts"), /* D3 */
  618. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 11)), /* PE_EINT11 */
  619. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 12),
  620. SUNXI_FUNCTION(0x0, "gpio_in"),
  621. SUNXI_FUNCTION(0x1, "gpio_out"),
  622. SUNXI_FUNCTION(0x2, "csi"), /* D8 */
  623. SUNXI_FUNCTION(0x3, "ts"), /* D4 */
  624. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 12)), /* PE_EINT12 */
  625. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 13),
  626. SUNXI_FUNCTION(0x0, "gpio_in"),
  627. SUNXI_FUNCTION(0x1, "gpio_out"),
  628. SUNXI_FUNCTION(0x2, "csi"), /* D9 */
  629. SUNXI_FUNCTION(0x3, "ts"), /* D5 */
  630. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 13)), /* PE_EINT13 */
  631. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 14),
  632. SUNXI_FUNCTION(0x0, "gpio_in"),
  633. SUNXI_FUNCTION(0x1, "gpio_out"),
  634. SUNXI_FUNCTION(0x2, "csi"), /* D10 */
  635. SUNXI_FUNCTION(0x3, "ts"), /* D6 */
  636. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 14)), /* PE_EINT14 */
  637. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 15),
  638. SUNXI_FUNCTION(0x0, "gpio_in"),
  639. SUNXI_FUNCTION(0x1, "gpio_out"),
  640. SUNXI_FUNCTION(0x2, "csi"), /* D11 */
  641. SUNXI_FUNCTION(0x3, "ts"), /* D7 */
  642. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 15)), /* PE_EINT15 */
  643. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 16),
  644. SUNXI_FUNCTION(0x0, "gpio_in"),
  645. SUNXI_FUNCTION(0x1, "gpio_out"),
  646. SUNXI_FUNCTION(0x2, "csi"), /* MIPI CSI MCLK */
  647. SUNXI_FUNCTION_IRQ_BANK(0x6, 2, 16)), /* PE_EINT16 */
  648. /* Hole */
  649. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
  650. SUNXI_FUNCTION(0x0, "gpio_in"),
  651. SUNXI_FUNCTION(0x1, "gpio_out"),
  652. SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
  653. SUNXI_FUNCTION(0x4, "jtag")), /* MS1 */
  654. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
  655. SUNXI_FUNCTION(0x0, "gpio_in"),
  656. SUNXI_FUNCTION(0x1, "gpio_out"),
  657. SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
  658. SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */
  659. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
  660. SUNXI_FUNCTION(0x0, "gpio_in"),
  661. SUNXI_FUNCTION(0x1, "gpio_out"),
  662. SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
  663. SUNXI_FUNCTION(0x4, "uart0")), /* TX */
  664. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
  665. SUNXI_FUNCTION(0x0, "gpio_in"),
  666. SUNXI_FUNCTION(0x1, "gpio_out"),
  667. SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
  668. SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */
  669. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
  670. SUNXI_FUNCTION(0x0, "gpio_in"),
  671. SUNXI_FUNCTION(0x1, "gpio_out"),
  672. SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
  673. SUNXI_FUNCTION(0x4, "uart0")), /* RX */
  674. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
  675. SUNXI_FUNCTION(0x0, "gpio_in"),
  676. SUNXI_FUNCTION(0x1, "gpio_out"),
  677. SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
  678. SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */
  679. /* Hole */
  680. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
  681. SUNXI_FUNCTION(0x0, "gpio_in"),
  682. SUNXI_FUNCTION(0x1, "gpio_out"),
  683. SUNXI_FUNCTION(0x2, "mmc1"), /* CLK */
  684. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 0)), /* PG_EINT0 */
  685. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
  686. SUNXI_FUNCTION(0x0, "gpio_in"),
  687. SUNXI_FUNCTION(0x1, "gpio_out"),
  688. SUNXI_FUNCTION(0x2, "mmc1"), /* CMD */
  689. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 1)), /* PG_EINT1 */
  690. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
  691. SUNXI_FUNCTION(0x0, "gpio_in"),
  692. SUNXI_FUNCTION(0x1, "gpio_out"),
  693. SUNXI_FUNCTION(0x2, "mmc1"), /* D0 */
  694. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 2)), /* PG_EINT2 */
  695. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
  696. SUNXI_FUNCTION(0x0, "gpio_in"),
  697. SUNXI_FUNCTION(0x1, "gpio_out"),
  698. SUNXI_FUNCTION(0x2, "mmc1"), /* D1 */
  699. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 3)), /* PG_EINT3 */
  700. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
  701. SUNXI_FUNCTION(0x0, "gpio_in"),
  702. SUNXI_FUNCTION(0x1, "gpio_out"),
  703. SUNXI_FUNCTION(0x2, "mmc1"), /* D2 */
  704. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 4)), /* PG_EINT4 */
  705. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
  706. SUNXI_FUNCTION(0x0, "gpio_in"),
  707. SUNXI_FUNCTION(0x1, "gpio_out"),
  708. SUNXI_FUNCTION(0x2, "mmc1"), /* D3 */
  709. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 5)), /* PG_EINT5 */
  710. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
  711. SUNXI_FUNCTION(0x0, "gpio_in"),
  712. SUNXI_FUNCTION(0x1, "gpio_out"),
  713. SUNXI_FUNCTION(0x2, "uart2"), /* TX */
  714. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 6)), /* PG_EINT6 */
  715. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
  716. SUNXI_FUNCTION(0x0, "gpio_in"),
  717. SUNXI_FUNCTION(0x1, "gpio_out"),
  718. SUNXI_FUNCTION(0x2, "uart2"), /* RX */
  719. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 7)), /* PG_EINT7 */
  720. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
  721. SUNXI_FUNCTION(0x0, "gpio_in"),
  722. SUNXI_FUNCTION(0x1, "gpio_out"),
  723. SUNXI_FUNCTION(0x2, "uart2"), /* RTS */
  724. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 8)), /* PG_EINT8 */
  725. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
  726. SUNXI_FUNCTION(0x0, "gpio_in"),
  727. SUNXI_FUNCTION(0x1, "gpio_out"),
  728. SUNXI_FUNCTION(0x2, "uart2"), /* CTS */
  729. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 9)), /* PG_EINT9 */
  730. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
  731. SUNXI_FUNCTION(0x0, "gpio_in"),
  732. SUNXI_FUNCTION(0x1, "gpio_out"),
  733. SUNXI_FUNCTION(0x2, "i2c3"), /* SCK */
  734. SUNXI_FUNCTION(0x3, "usb"), /* DP3 */
  735. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 10)), /* PG_EINT10 */
  736. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
  737. SUNXI_FUNCTION(0x0, "gpio_in"),
  738. SUNXI_FUNCTION(0x1, "gpio_out"),
  739. SUNXI_FUNCTION(0x2, "i2c3"), /* SDA */
  740. SUNXI_FUNCTION(0x3, "usb"), /* DM3 */
  741. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 11)), /* PG_EINT11 */
  742. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 12),
  743. SUNXI_FUNCTION(0x0, "gpio_in"),
  744. SUNXI_FUNCTION(0x1, "gpio_out"),
  745. SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */
  746. SUNXI_FUNCTION(0x3, "i2s1"), /* MCLK */
  747. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 12)), /* PG_EINT12 */
  748. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 13),
  749. SUNXI_FUNCTION(0x0, "gpio_in"),
  750. SUNXI_FUNCTION(0x1, "gpio_out"),
  751. SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */
  752. SUNXI_FUNCTION(0x3, "i2s1"), /* BCLK */
  753. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 13)), /* PG_EINT13 */
  754. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 14),
  755. SUNXI_FUNCTION(0x0, "gpio_in"),
  756. SUNXI_FUNCTION(0x1, "gpio_out"),
  757. SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
  758. SUNXI_FUNCTION(0x3, "i2s1"), /* LRCK */
  759. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 14)), /* PG_EINT14 */
  760. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 15),
  761. SUNXI_FUNCTION(0x0, "gpio_in"),
  762. SUNXI_FUNCTION(0x1, "gpio_out"),
  763. SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
  764. SUNXI_FUNCTION(0x3, "i2s1"), /* DIN */
  765. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 15)), /* PG_EINT15 */
  766. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 16),
  767. SUNXI_FUNCTION(0x0, "gpio_in"),
  768. SUNXI_FUNCTION(0x1, "gpio_out"),
  769. SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
  770. SUNXI_FUNCTION(0x3, "i2s1"), /* DOUT */
  771. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 16)), /* PG_EINT16 */
  772. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 17),
  773. SUNXI_FUNCTION(0x0, "gpio_in"),
  774. SUNXI_FUNCTION(0x1, "gpio_out"),
  775. SUNXI_FUNCTION(0x2, "uart4"), /* TX */
  776. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 17)), /* PG_EINT17 */
  777. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 18),
  778. SUNXI_FUNCTION(0x0, "gpio_in"),
  779. SUNXI_FUNCTION(0x1, "gpio_out"),
  780. SUNXI_FUNCTION(0x2, "uart4"), /* RX */
  781. SUNXI_FUNCTION_IRQ_BANK(0x6, 3, 18)), /* PG_EINT18 */
  782. /* Hole */
  783. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
  784. SUNXI_FUNCTION(0x0, "gpio_in"),
  785. SUNXI_FUNCTION(0x1, "gpio_out"),
  786. SUNXI_FUNCTION(0x2, "nand1")), /* WE */
  787. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
  788. SUNXI_FUNCTION(0x0, "gpio_in"),
  789. SUNXI_FUNCTION(0x1, "gpio_out"),
  790. SUNXI_FUNCTION(0x2, "nand1")), /* ALE */
  791. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
  792. SUNXI_FUNCTION(0x0, "gpio_in"),
  793. SUNXI_FUNCTION(0x1, "gpio_out"),
  794. SUNXI_FUNCTION(0x2, "nand1")), /* CLE */
  795. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
  796. SUNXI_FUNCTION(0x0, "gpio_in"),
  797. SUNXI_FUNCTION(0x1, "gpio_out"),
  798. SUNXI_FUNCTION(0x2, "nand1")), /* CE1 */
  799. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
  800. SUNXI_FUNCTION(0x0, "gpio_in"),
  801. SUNXI_FUNCTION(0x1, "gpio_out"),
  802. SUNXI_FUNCTION(0x2, "nand1")), /* CE0 */
  803. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
  804. SUNXI_FUNCTION(0x0, "gpio_in"),
  805. SUNXI_FUNCTION(0x1, "gpio_out"),
  806. SUNXI_FUNCTION(0x2, "nand1")), /* RE */
  807. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
  808. SUNXI_FUNCTION(0x0, "gpio_in"),
  809. SUNXI_FUNCTION(0x1, "gpio_out"),
  810. SUNXI_FUNCTION(0x2, "nand1")), /* RB0 */
  811. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
  812. SUNXI_FUNCTION(0x0, "gpio_in"),
  813. SUNXI_FUNCTION(0x1, "gpio_out"),
  814. SUNXI_FUNCTION(0x2, "nand1")), /* RB1 */
  815. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
  816. SUNXI_FUNCTION(0x0, "gpio_in"),
  817. SUNXI_FUNCTION(0x1, "gpio_out"),
  818. SUNXI_FUNCTION(0x2, "nand1")), /* DQS */
  819. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
  820. SUNXI_FUNCTION(0x0, "gpio_in"),
  821. SUNXI_FUNCTION(0x1, "gpio_out"),
  822. SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */
  823. SUNXI_FUNCTION(0x3, "jtag"), /* MS0 */
  824. SUNXI_FUNCTION(0x4, "pwm1")), /* Positive */
  825. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
  826. SUNXI_FUNCTION(0x0, "gpio_in"),
  827. SUNXI_FUNCTION(0x1, "gpio_out"),
  828. SUNXI_FUNCTION(0x2, "spi2"), /* CLK */
  829. SUNXI_FUNCTION(0x3, "jtag"), /* CK0 */
  830. SUNXI_FUNCTION(0x4, "pwm1")), /* Negative */
  831. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
  832. SUNXI_FUNCTION(0x0, "gpio_in"),
  833. SUNXI_FUNCTION(0x1, "gpio_out"),
  834. SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */
  835. SUNXI_FUNCTION(0x3, "jtag"), /* DO0 */
  836. SUNXI_FUNCTION(0x4, "pwm2")), /* Positive */
  837. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12),
  838. SUNXI_FUNCTION(0x0, "gpio_in"),
  839. SUNXI_FUNCTION(0x1, "gpio_out"),
  840. SUNXI_FUNCTION(0x2, "spi2"), /* MISO */
  841. SUNXI_FUNCTION(0x3, "jtag"), /* DI0 */
  842. SUNXI_FUNCTION(0x4, "pwm2")), /* Negative */
  843. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13),
  844. SUNXI_FUNCTION(0x0, "gpio_in"),
  845. SUNXI_FUNCTION(0x1, "gpio_out"),
  846. SUNXI_FUNCTION(0x2, "pwm0")),
  847. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14),
  848. SUNXI_FUNCTION(0x0, "gpio_in"),
  849. SUNXI_FUNCTION(0x1, "gpio_out"),
  850. SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
  851. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15),
  852. SUNXI_FUNCTION(0x0, "gpio_in"),
  853. SUNXI_FUNCTION(0x1, "gpio_out"),
  854. SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
  855. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16),
  856. SUNXI_FUNCTION(0x0, "gpio_in"),
  857. SUNXI_FUNCTION(0x1, "gpio_out"),
  858. SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
  859. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
  860. SUNXI_FUNCTION(0x0, "gpio_in"),
  861. SUNXI_FUNCTION(0x1, "gpio_out"),
  862. SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
  863. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18),
  864. SUNXI_FUNCTION(0x0, "gpio_in"),
  865. SUNXI_FUNCTION(0x1, "gpio_out"),
  866. SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
  867. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19),
  868. SUNXI_FUNCTION(0x0, "gpio_in"),
  869. SUNXI_FUNCTION(0x1, "gpio_out"),
  870. SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
  871. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20),
  872. SUNXI_FUNCTION(0x0, "gpio_in"),
  873. SUNXI_FUNCTION(0x1, "gpio_out"),
  874. SUNXI_FUNCTION(0x2, "uart0")), /* TX */
  875. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21),
  876. SUNXI_FUNCTION(0x0, "gpio_in"),
  877. SUNXI_FUNCTION(0x1, "gpio_out"),
  878. SUNXI_FUNCTION(0x2, "uart0")), /* RX */
  879. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 22),
  880. SUNXI_FUNCTION(0x0, "gpio_in"),
  881. SUNXI_FUNCTION(0x1, "gpio_out")),
  882. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 23),
  883. SUNXI_FUNCTION(0x0, "gpio_in"),
  884. SUNXI_FUNCTION(0x1, "gpio_out")),
  885. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 24),
  886. SUNXI_FUNCTION(0x0, "gpio_in"),
  887. SUNXI_FUNCTION(0x1, "gpio_out")),
  888. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 25),
  889. SUNXI_FUNCTION(0x0, "gpio_in"),
  890. SUNXI_FUNCTION(0x1, "gpio_out")),
  891. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 26),
  892. SUNXI_FUNCTION(0x0, "gpio_in"),
  893. SUNXI_FUNCTION(0x1, "gpio_out")),
  894. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27),
  895. SUNXI_FUNCTION(0x0, "gpio_in"),
  896. SUNXI_FUNCTION(0x1, "gpio_out"),
  897. /*
  898. * The SPDIF block is not referenced at all in the A31 user
  899. * manual. However it is described in the code leaked and the
  900. * configuration files supplied by vendors.
  901. */
  902. SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF IN */
  903. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 28),
  904. SUNXI_FUNCTION(0x0, "gpio_in"),
  905. SUNXI_FUNCTION(0x1, "gpio_out"),
  906. /* Undocumented mux function - see above */
  907. SUNXI_FUNCTION(0x3, "spdif")), /* SPDIF OUT */
  908. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 29),
  909. SUNXI_FUNCTION(0x0, "gpio_in"),
  910. SUNXI_FUNCTION(0x1, "gpio_out"),
  911. SUNXI_FUNCTION(0x2, "nand1")), /* CE2 */
  912. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 30),
  913. SUNXI_FUNCTION(0x0, "gpio_in"),
  914. SUNXI_FUNCTION(0x1, "gpio_out"),
  915. SUNXI_FUNCTION(0x2, "nand1")), /* CE3 */
  916. };
  917. static const struct sunxi_pinctrl_desc sun6i_a31_pinctrl_data = {
  918. .pins = sun6i_a31_pins,
  919. .npins = ARRAY_SIZE(sun6i_a31_pins),
  920. .irq_banks = 4,
  921. };
  922. static int sun6i_a31_pinctrl_probe(struct platform_device *pdev)
  923. {
  924. return sunxi_pinctrl_init(pdev,
  925. &sun6i_a31_pinctrl_data);
  926. }
  927. static const struct of_device_id sun6i_a31_pinctrl_match[] = {
  928. { .compatible = "allwinner,sun6i-a31-pinctrl", },
  929. {}
  930. };
  931. MODULE_DEVICE_TABLE(of, sun6i_a31_pinctrl_match);
  932. static struct platform_driver sun6i_a31_pinctrl_driver = {
  933. .probe = sun6i_a31_pinctrl_probe,
  934. .driver = {
  935. .name = "sun6i-a31-pinctrl",
  936. .of_match_table = sun6i_a31_pinctrl_match,
  937. },
  938. };
  939. module_platform_driver(sun6i_a31_pinctrl_driver);
  940. MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
  941. MODULE_DESCRIPTION("Allwinner A31 pinctrl driver");
  942. MODULE_LICENSE("GPL");