pinctrl-sun4i-a10.c 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  1. /*
  2. * Allwinner A10 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 sun4i_a10_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, "emac"), /* ERXD3 */
  23. SUNXI_FUNCTION(0x3, "spi1"), /* CS0 */
  24. SUNXI_FUNCTION(0x4, "uart2")), /* RTS */
  25. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
  26. SUNXI_FUNCTION(0x0, "gpio_in"),
  27. SUNXI_FUNCTION(0x1, "gpio_out"),
  28. SUNXI_FUNCTION(0x2, "emac"), /* ERXD2 */
  29. SUNXI_FUNCTION(0x3, "spi1"), /* CLK */
  30. SUNXI_FUNCTION(0x4, "uart2")), /* CTS */
  31. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
  32. SUNXI_FUNCTION(0x0, "gpio_in"),
  33. SUNXI_FUNCTION(0x1, "gpio_out"),
  34. SUNXI_FUNCTION(0x2, "emac"), /* ERXD1 */
  35. SUNXI_FUNCTION(0x3, "spi1"), /* MOSI */
  36. SUNXI_FUNCTION(0x4, "uart2")), /* TX */
  37. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
  38. SUNXI_FUNCTION(0x0, "gpio_in"),
  39. SUNXI_FUNCTION(0x1, "gpio_out"),
  40. SUNXI_FUNCTION(0x2, "emac"), /* ERXD0 */
  41. SUNXI_FUNCTION(0x3, "spi1"), /* MISO */
  42. SUNXI_FUNCTION(0x4, "uart2")), /* RX */
  43. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
  44. SUNXI_FUNCTION(0x0, "gpio_in"),
  45. SUNXI_FUNCTION(0x1, "gpio_out"),
  46. SUNXI_FUNCTION(0x2, "emac"), /* ETXD3 */
  47. SUNXI_FUNCTION(0x3, "spi1")), /* CS1 */
  48. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5),
  49. SUNXI_FUNCTION(0x0, "gpio_in"),
  50. SUNXI_FUNCTION(0x1, "gpio_out"),
  51. SUNXI_FUNCTION(0x2, "emac"), /* ETXD2 */
  52. SUNXI_FUNCTION(0x3, "spi3")), /* CS0 */
  53. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 6),
  54. SUNXI_FUNCTION(0x0, "gpio_in"),
  55. SUNXI_FUNCTION(0x1, "gpio_out"),
  56. SUNXI_FUNCTION(0x2, "emac"), /* ETXD1 */
  57. SUNXI_FUNCTION(0x3, "spi3")), /* CLK */
  58. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 7),
  59. SUNXI_FUNCTION(0x0, "gpio_in"),
  60. SUNXI_FUNCTION(0x1, "gpio_out"),
  61. SUNXI_FUNCTION(0x2, "emac"), /* ETXD0 */
  62. SUNXI_FUNCTION(0x3, "spi3")), /* MOSI */
  63. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 8),
  64. SUNXI_FUNCTION(0x0, "gpio_in"),
  65. SUNXI_FUNCTION(0x1, "gpio_out"),
  66. SUNXI_FUNCTION(0x2, "emac"), /* ERXCK */
  67. SUNXI_FUNCTION(0x3, "spi3")), /* MISO */
  68. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 9),
  69. SUNXI_FUNCTION(0x0, "gpio_in"),
  70. SUNXI_FUNCTION(0x1, "gpio_out"),
  71. SUNXI_FUNCTION(0x2, "emac"), /* ERXERR */
  72. SUNXI_FUNCTION(0x3, "spi3")), /* CS1 */
  73. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 10),
  74. SUNXI_FUNCTION(0x0, "gpio_in"),
  75. SUNXI_FUNCTION(0x1, "gpio_out"),
  76. SUNXI_FUNCTION(0x2, "emac"), /* ERXDV */
  77. SUNXI_FUNCTION(0x4, "uart1")), /* TX */
  78. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 11),
  79. SUNXI_FUNCTION(0x0, "gpio_in"),
  80. SUNXI_FUNCTION(0x1, "gpio_out"),
  81. SUNXI_FUNCTION(0x2, "emac"), /* EMDC */
  82. SUNXI_FUNCTION(0x4, "uart1")), /* RX */
  83. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 12),
  84. SUNXI_FUNCTION(0x0, "gpio_in"),
  85. SUNXI_FUNCTION(0x1, "gpio_out"),
  86. SUNXI_FUNCTION(0x2, "emac"), /* EMDIO */
  87. SUNXI_FUNCTION(0x3, "uart6"), /* TX */
  88. SUNXI_FUNCTION(0x4, "uart1")), /* RTS */
  89. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 13),
  90. SUNXI_FUNCTION(0x0, "gpio_in"),
  91. SUNXI_FUNCTION(0x1, "gpio_out"),
  92. SUNXI_FUNCTION(0x2, "emac"), /* ETXEN */
  93. SUNXI_FUNCTION(0x3, "uart6"), /* RX */
  94. SUNXI_FUNCTION(0x4, "uart1")), /* CTS */
  95. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 14),
  96. SUNXI_FUNCTION(0x0, "gpio_in"),
  97. SUNXI_FUNCTION(0x1, "gpio_out"),
  98. SUNXI_FUNCTION(0x2, "emac"), /* ETXCK */
  99. SUNXI_FUNCTION(0x3, "uart7"), /* TX */
  100. SUNXI_FUNCTION(0x4, "uart1")), /* DTR */
  101. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 15),
  102. SUNXI_FUNCTION(0x0, "gpio_in"),
  103. SUNXI_FUNCTION(0x1, "gpio_out"),
  104. SUNXI_FUNCTION(0x2, "emac"), /* ECRS */
  105. SUNXI_FUNCTION(0x3, "uart7"), /* RX */
  106. SUNXI_FUNCTION(0x4, "uart1")), /* DSR */
  107. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
  108. SUNXI_FUNCTION(0x0, "gpio_in"),
  109. SUNXI_FUNCTION(0x1, "gpio_out"),
  110. SUNXI_FUNCTION(0x2, "emac"), /* ECOL */
  111. SUNXI_FUNCTION(0x3, "can"), /* TX */
  112. SUNXI_FUNCTION(0x4, "uart1")), /* DCD */
  113. SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
  114. SUNXI_FUNCTION(0x0, "gpio_in"),
  115. SUNXI_FUNCTION(0x1, "gpio_out"),
  116. SUNXI_FUNCTION(0x2, "emac"), /* ETXERR */
  117. SUNXI_FUNCTION(0x3, "can"), /* RX */
  118. SUNXI_FUNCTION(0x4, "uart1")), /* RING */
  119. /* Hole */
  120. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 0),
  121. SUNXI_FUNCTION(0x0, "gpio_in"),
  122. SUNXI_FUNCTION(0x1, "gpio_out"),
  123. SUNXI_FUNCTION(0x2, "i2c0")), /* SCK */
  124. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 1),
  125. SUNXI_FUNCTION(0x0, "gpio_in"),
  126. SUNXI_FUNCTION(0x1, "gpio_out"),
  127. SUNXI_FUNCTION(0x2, "i2c0")), /* SDA */
  128. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 2),
  129. SUNXI_FUNCTION(0x0, "gpio_in"),
  130. SUNXI_FUNCTION(0x1, "gpio_out"),
  131. SUNXI_FUNCTION(0x2, "pwm")), /* PWM0 */
  132. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 3),
  133. SUNXI_FUNCTION(0x0, "gpio_in"),
  134. SUNXI_FUNCTION(0x1, "gpio_out"),
  135. SUNXI_FUNCTION(0x2, "ir0"), /* TX */
  136. /*
  137. * The SPDIF block is not referenced at all in the A10 user
  138. * manual. However it is described in the code leaked and the
  139. * pin descriptions are declared in the A20 user manual which
  140. * is pin compatible with this device.
  141. */
  142. SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF MCLK */
  143. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 4),
  144. SUNXI_FUNCTION(0x0, "gpio_in"),
  145. SUNXI_FUNCTION(0x1, "gpio_out"),
  146. SUNXI_FUNCTION(0x2, "ir0")), /* RX */
  147. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
  148. SUNXI_FUNCTION(0x0, "gpio_in"),
  149. SUNXI_FUNCTION(0x1, "gpio_out"),
  150. SUNXI_FUNCTION(0x2, "i2s"), /* MCLK */
  151. SUNXI_FUNCTION(0x3, "ac97")), /* MCLK */
  152. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
  153. SUNXI_FUNCTION(0x0, "gpio_in"),
  154. SUNXI_FUNCTION(0x1, "gpio_out"),
  155. SUNXI_FUNCTION(0x2, "i2s"), /* BCLK */
  156. SUNXI_FUNCTION(0x3, "ac97")), /* BCLK */
  157. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 7),
  158. SUNXI_FUNCTION(0x0, "gpio_in"),
  159. SUNXI_FUNCTION(0x1, "gpio_out"),
  160. SUNXI_FUNCTION(0x2, "i2s"), /* LRCK */
  161. SUNXI_FUNCTION(0x3, "ac97")), /* SYNC */
  162. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 8),
  163. SUNXI_FUNCTION(0x0, "gpio_in"),
  164. SUNXI_FUNCTION(0x1, "gpio_out"),
  165. SUNXI_FUNCTION(0x2, "i2s"), /* DO0 */
  166. SUNXI_FUNCTION(0x3, "ac97")), /* DO */
  167. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 9),
  168. SUNXI_FUNCTION(0x0, "gpio_in"),
  169. SUNXI_FUNCTION(0x1, "gpio_out"),
  170. SUNXI_FUNCTION(0x2, "i2s")), /* DO1 */
  171. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 10),
  172. SUNXI_FUNCTION(0x0, "gpio_in"),
  173. SUNXI_FUNCTION(0x1, "gpio_out"),
  174. SUNXI_FUNCTION(0x2, "i2s")), /* DO2 */
  175. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 11),
  176. SUNXI_FUNCTION(0x0, "gpio_in"),
  177. SUNXI_FUNCTION(0x1, "gpio_out"),
  178. SUNXI_FUNCTION(0x2, "i2s")), /* DO3 */
  179. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 12),
  180. SUNXI_FUNCTION(0x0, "gpio_in"),
  181. SUNXI_FUNCTION(0x1, "gpio_out"),
  182. SUNXI_FUNCTION(0x2, "i2s"), /* DI */
  183. SUNXI_FUNCTION(0x3, "ac97"), /* DI */
  184. /* Undocumented mux function - See SPDIF MCLK above */
  185. SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF IN */
  186. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 13),
  187. SUNXI_FUNCTION(0x0, "gpio_in"),
  188. SUNXI_FUNCTION(0x1, "gpio_out"),
  189. SUNXI_FUNCTION(0x2, "spi2"), /* CS1 */
  190. /* Undocumented mux function - See SPDIF MCLK above */
  191. SUNXI_FUNCTION(0x4, "spdif")), /* SPDIF OUT */
  192. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 14),
  193. SUNXI_FUNCTION(0x0, "gpio_in"),
  194. SUNXI_FUNCTION(0x1, "gpio_out"),
  195. SUNXI_FUNCTION(0x2, "spi2"), /* CS0 */
  196. SUNXI_FUNCTION(0x3, "jtag")), /* MS0 */
  197. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15),
  198. SUNXI_FUNCTION(0x0, "gpio_in"),
  199. SUNXI_FUNCTION(0x1, "gpio_out"),
  200. SUNXI_FUNCTION(0x2, "spi2"), /* CLK */
  201. SUNXI_FUNCTION(0x3, "jtag")), /* CK0 */
  202. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16),
  203. SUNXI_FUNCTION(0x0, "gpio_in"),
  204. SUNXI_FUNCTION(0x1, "gpio_out"),
  205. SUNXI_FUNCTION(0x2, "spi2"), /* MOSI */
  206. SUNXI_FUNCTION(0x3, "jtag")), /* DO0 */
  207. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 17),
  208. SUNXI_FUNCTION(0x0, "gpio_in"),
  209. SUNXI_FUNCTION(0x1, "gpio_out"),
  210. SUNXI_FUNCTION(0x2, "spi2"), /* MISO */
  211. SUNXI_FUNCTION(0x3, "jtag")), /* DI0 */
  212. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 18),
  213. SUNXI_FUNCTION(0x0, "gpio_in"),
  214. SUNXI_FUNCTION(0x1, "gpio_out"),
  215. SUNXI_FUNCTION(0x2, "i2c1")), /* SCK */
  216. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 19),
  217. SUNXI_FUNCTION(0x0, "gpio_in"),
  218. SUNXI_FUNCTION(0x1, "gpio_out"),
  219. SUNXI_FUNCTION(0x2, "i2c1")), /* SDA */
  220. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 20),
  221. SUNXI_FUNCTION(0x0, "gpio_in"),
  222. SUNXI_FUNCTION(0x1, "gpio_out"),
  223. SUNXI_FUNCTION(0x2, "i2c2")), /* SCK */
  224. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 21),
  225. SUNXI_FUNCTION(0x0, "gpio_in"),
  226. SUNXI_FUNCTION(0x1, "gpio_out"),
  227. SUNXI_FUNCTION(0x2, "i2c2")), /* SDA */
  228. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 22),
  229. SUNXI_FUNCTION(0x0, "gpio_in"),
  230. SUNXI_FUNCTION(0x1, "gpio_out"),
  231. SUNXI_FUNCTION(0x2, "uart0"), /* TX */
  232. SUNXI_FUNCTION(0x3, "ir1")), /* TX */
  233. SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 23),
  234. SUNXI_FUNCTION(0x0, "gpio_in"),
  235. SUNXI_FUNCTION(0x1, "gpio_out"),
  236. SUNXI_FUNCTION(0x2, "uart0"), /* RX */
  237. SUNXI_FUNCTION(0x3, "ir1")), /* RX */
  238. /* Hole */
  239. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0),
  240. SUNXI_FUNCTION(0x0, "gpio_in"),
  241. SUNXI_FUNCTION(0x1, "gpio_out"),
  242. SUNXI_FUNCTION(0x2, "nand0"), /* NWE */
  243. SUNXI_FUNCTION(0x3, "spi0")), /* MOSI */
  244. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 1),
  245. SUNXI_FUNCTION(0x0, "gpio_in"),
  246. SUNXI_FUNCTION(0x1, "gpio_out"),
  247. SUNXI_FUNCTION(0x2, "nand0"), /* NALE */
  248. SUNXI_FUNCTION(0x3, "spi0")), /* MISO */
  249. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 2),
  250. SUNXI_FUNCTION(0x0, "gpio_in"),
  251. SUNXI_FUNCTION(0x1, "gpio_out"),
  252. SUNXI_FUNCTION(0x2, "nand0"), /* NCLE */
  253. SUNXI_FUNCTION(0x3, "spi0")), /* SCK */
  254. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 3),
  255. SUNXI_FUNCTION(0x0, "gpio_in"),
  256. SUNXI_FUNCTION(0x1, "gpio_out"),
  257. SUNXI_FUNCTION(0x2, "nand0")), /* NCE1 */
  258. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 4),
  259. SUNXI_FUNCTION(0x0, "gpio_in"),
  260. SUNXI_FUNCTION(0x1, "gpio_out"),
  261. SUNXI_FUNCTION(0x2, "nand0")), /* NCE0 */
  262. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 5),
  263. SUNXI_FUNCTION(0x0, "gpio_in"),
  264. SUNXI_FUNCTION(0x1, "gpio_out"),
  265. SUNXI_FUNCTION(0x2, "nand0")), /* NRE# */
  266. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 6),
  267. SUNXI_FUNCTION(0x0, "gpio_in"),
  268. SUNXI_FUNCTION(0x1, "gpio_out"),
  269. SUNXI_FUNCTION(0x2, "nand0"), /* NRB0 */
  270. SUNXI_FUNCTION(0x3, "mmc2")), /* CMD */
  271. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 7),
  272. SUNXI_FUNCTION(0x0, "gpio_in"),
  273. SUNXI_FUNCTION(0x1, "gpio_out"),
  274. SUNXI_FUNCTION(0x2, "nand0"), /* NRB1 */
  275. SUNXI_FUNCTION(0x3, "mmc2")), /* CLK */
  276. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 8),
  277. SUNXI_FUNCTION(0x0, "gpio_in"),
  278. SUNXI_FUNCTION(0x1, "gpio_out"),
  279. SUNXI_FUNCTION(0x2, "nand0"), /* NDQ0 */
  280. SUNXI_FUNCTION(0x3, "mmc2")), /* D0 */
  281. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 9),
  282. SUNXI_FUNCTION(0x0, "gpio_in"),
  283. SUNXI_FUNCTION(0x1, "gpio_out"),
  284. SUNXI_FUNCTION(0x2, "nand0"), /* NDQ1 */
  285. SUNXI_FUNCTION(0x3, "mmc2")), /* D1 */
  286. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 10),
  287. SUNXI_FUNCTION(0x0, "gpio_in"),
  288. SUNXI_FUNCTION(0x1, "gpio_out"),
  289. SUNXI_FUNCTION(0x2, "nand0"), /* NDQ2 */
  290. SUNXI_FUNCTION(0x3, "mmc2")), /* D2 */
  291. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 11),
  292. SUNXI_FUNCTION(0x0, "gpio_in"),
  293. SUNXI_FUNCTION(0x1, "gpio_out"),
  294. SUNXI_FUNCTION(0x2, "nand0"), /* NDQ3 */
  295. SUNXI_FUNCTION(0x3, "mmc2")), /* D3 */
  296. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 12),
  297. SUNXI_FUNCTION(0x0, "gpio_in"),
  298. SUNXI_FUNCTION(0x1, "gpio_out"),
  299. SUNXI_FUNCTION(0x2, "nand0")), /* NDQ4 */
  300. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 13),
  301. SUNXI_FUNCTION(0x0, "gpio_in"),
  302. SUNXI_FUNCTION(0x1, "gpio_out"),
  303. SUNXI_FUNCTION(0x2, "nand0")), /* NDQ5 */
  304. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 14),
  305. SUNXI_FUNCTION(0x0, "gpio_in"),
  306. SUNXI_FUNCTION(0x1, "gpio_out"),
  307. SUNXI_FUNCTION(0x2, "nand0")), /* NDQ6 */
  308. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15),
  309. SUNXI_FUNCTION(0x0, "gpio_in"),
  310. SUNXI_FUNCTION(0x1, "gpio_out"),
  311. SUNXI_FUNCTION(0x2, "nand0")), /* NDQ7 */
  312. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 16),
  313. SUNXI_FUNCTION(0x0, "gpio_in"),
  314. SUNXI_FUNCTION(0x1, "gpio_out"),
  315. SUNXI_FUNCTION(0x2, "nand0")), /* NWP */
  316. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 17),
  317. SUNXI_FUNCTION(0x0, "gpio_in"),
  318. SUNXI_FUNCTION(0x1, "gpio_out"),
  319. SUNXI_FUNCTION(0x2, "nand0")), /* NCE2 */
  320. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 18),
  321. SUNXI_FUNCTION(0x0, "gpio_in"),
  322. SUNXI_FUNCTION(0x1, "gpio_out"),
  323. SUNXI_FUNCTION(0x2, "nand0")), /* NCE3 */
  324. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 19),
  325. SUNXI_FUNCTION(0x0, "gpio_in"),
  326. SUNXI_FUNCTION(0x1, "gpio_out"),
  327. SUNXI_FUNCTION(0x2, "nand0"), /* NCE4 */
  328. SUNXI_FUNCTION(0x3, "spi2")), /* CS0 */
  329. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 20),
  330. SUNXI_FUNCTION(0x0, "gpio_in"),
  331. SUNXI_FUNCTION(0x1, "gpio_out"),
  332. SUNXI_FUNCTION(0x2, "nand0"), /* NCE5 */
  333. SUNXI_FUNCTION(0x3, "spi2")), /* CLK */
  334. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 21),
  335. SUNXI_FUNCTION(0x0, "gpio_in"),
  336. SUNXI_FUNCTION(0x1, "gpio_out"),
  337. SUNXI_FUNCTION(0x2, "nand0"), /* NCE6 */
  338. SUNXI_FUNCTION(0x3, "spi2")), /* MOSI */
  339. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 22),
  340. SUNXI_FUNCTION(0x0, "gpio_in"),
  341. SUNXI_FUNCTION(0x1, "gpio_out"),
  342. SUNXI_FUNCTION(0x2, "nand0"), /* NCE7 */
  343. SUNXI_FUNCTION(0x3, "spi2")), /* MISO */
  344. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 23),
  345. SUNXI_FUNCTION(0x0, "gpio_in"),
  346. SUNXI_FUNCTION(0x1, "gpio_out"),
  347. SUNXI_FUNCTION(0x3, "spi0")), /* CS0 */
  348. SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 24),
  349. SUNXI_FUNCTION(0x0, "gpio_in"),
  350. SUNXI_FUNCTION(0x1, "gpio_out"),
  351. SUNXI_FUNCTION(0x2, "nand0")), /* NDQS */
  352. /* Hole */
  353. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 0),
  354. SUNXI_FUNCTION(0x0, "gpio_in"),
  355. SUNXI_FUNCTION(0x1, "gpio_out"),
  356. SUNXI_FUNCTION(0x2, "lcd0"), /* D0 */
  357. SUNXI_FUNCTION(0x3, "lvds0")), /* VP0 */
  358. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 1),
  359. SUNXI_FUNCTION(0x0, "gpio_in"),
  360. SUNXI_FUNCTION(0x1, "gpio_out"),
  361. SUNXI_FUNCTION(0x2, "lcd0"), /* D1 */
  362. SUNXI_FUNCTION(0x3, "lvds0")), /* VN0 */
  363. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 2),
  364. SUNXI_FUNCTION(0x0, "gpio_in"),
  365. SUNXI_FUNCTION(0x1, "gpio_out"),
  366. SUNXI_FUNCTION(0x2, "lcd0"), /* D2 */
  367. SUNXI_FUNCTION(0x3, "lvds0")), /* VP1 */
  368. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 3),
  369. SUNXI_FUNCTION(0x0, "gpio_in"),
  370. SUNXI_FUNCTION(0x1, "gpio_out"),
  371. SUNXI_FUNCTION(0x2, "lcd0"), /* D3 */
  372. SUNXI_FUNCTION(0x3, "lvds0")), /* VN1 */
  373. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 4),
  374. SUNXI_FUNCTION(0x0, "gpio_in"),
  375. SUNXI_FUNCTION(0x1, "gpio_out"),
  376. SUNXI_FUNCTION(0x2, "lcd0"), /* D4 */
  377. SUNXI_FUNCTION(0x3, "lvds0")), /* VP2 */
  378. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 5),
  379. SUNXI_FUNCTION(0x0, "gpio_in"),
  380. SUNXI_FUNCTION(0x1, "gpio_out"),
  381. SUNXI_FUNCTION(0x2, "lcd0"), /* D5 */
  382. SUNXI_FUNCTION(0x3, "lvds0")), /* VN2 */
  383. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 6),
  384. SUNXI_FUNCTION(0x0, "gpio_in"),
  385. SUNXI_FUNCTION(0x1, "gpio_out"),
  386. SUNXI_FUNCTION(0x2, "lcd0"), /* D6 */
  387. SUNXI_FUNCTION(0x3, "lvds0")), /* VPC */
  388. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 7),
  389. SUNXI_FUNCTION(0x0, "gpio_in"),
  390. SUNXI_FUNCTION(0x1, "gpio_out"),
  391. SUNXI_FUNCTION(0x2, "lcd0"), /* D7 */
  392. SUNXI_FUNCTION(0x3, "lvds0")), /* VNC */
  393. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 8),
  394. SUNXI_FUNCTION(0x0, "gpio_in"),
  395. SUNXI_FUNCTION(0x1, "gpio_out"),
  396. SUNXI_FUNCTION(0x2, "lcd0"), /* D8 */
  397. SUNXI_FUNCTION(0x3, "lvds0")), /* VP3 */
  398. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 9),
  399. SUNXI_FUNCTION(0x0, "gpio_in"),
  400. SUNXI_FUNCTION(0x1, "gpio_out"),
  401. SUNXI_FUNCTION(0x2, "lcd0"), /* D9 */
  402. SUNXI_FUNCTION(0x3, "lvds0")), /* VM3 */
  403. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 10),
  404. SUNXI_FUNCTION(0x0, "gpio_in"),
  405. SUNXI_FUNCTION(0x1, "gpio_out"),
  406. SUNXI_FUNCTION(0x2, "lcd0"), /* D10 */
  407. SUNXI_FUNCTION(0x3, "lvds1")), /* VP0 */
  408. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 11),
  409. SUNXI_FUNCTION(0x0, "gpio_in"),
  410. SUNXI_FUNCTION(0x1, "gpio_out"),
  411. SUNXI_FUNCTION(0x2, "lcd0"), /* D11 */
  412. SUNXI_FUNCTION(0x3, "lvds1")), /* VN0 */
  413. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 12),
  414. SUNXI_FUNCTION(0x0, "gpio_in"),
  415. SUNXI_FUNCTION(0x1, "gpio_out"),
  416. SUNXI_FUNCTION(0x2, "lcd0"), /* D12 */
  417. SUNXI_FUNCTION(0x3, "lvds1")), /* VP1 */
  418. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 13),
  419. SUNXI_FUNCTION(0x0, "gpio_in"),
  420. SUNXI_FUNCTION(0x1, "gpio_out"),
  421. SUNXI_FUNCTION(0x2, "lcd0"), /* D13 */
  422. SUNXI_FUNCTION(0x3, "lvds1")), /* VN1 */
  423. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 14),
  424. SUNXI_FUNCTION(0x0, "gpio_in"),
  425. SUNXI_FUNCTION(0x1, "gpio_out"),
  426. SUNXI_FUNCTION(0x2, "lcd0"), /* D14 */
  427. SUNXI_FUNCTION(0x3, "lvds1")), /* VP2 */
  428. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 15),
  429. SUNXI_FUNCTION(0x0, "gpio_in"),
  430. SUNXI_FUNCTION(0x1, "gpio_out"),
  431. SUNXI_FUNCTION(0x2, "lcd0"), /* D15 */
  432. SUNXI_FUNCTION(0x3, "lvds1")), /* VN2 */
  433. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 16),
  434. SUNXI_FUNCTION(0x0, "gpio_in"),
  435. SUNXI_FUNCTION(0x1, "gpio_out"),
  436. SUNXI_FUNCTION(0x2, "lcd0"), /* D16 */
  437. SUNXI_FUNCTION(0x3, "lvds1")), /* VPC */
  438. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 17),
  439. SUNXI_FUNCTION(0x0, "gpio_in"),
  440. SUNXI_FUNCTION(0x1, "gpio_out"),
  441. SUNXI_FUNCTION(0x2, "lcd0"), /* D17 */
  442. SUNXI_FUNCTION(0x3, "lvds1")), /* VNC */
  443. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 18),
  444. SUNXI_FUNCTION(0x0, "gpio_in"),
  445. SUNXI_FUNCTION(0x1, "gpio_out"),
  446. SUNXI_FUNCTION(0x2, "lcd0"), /* D18 */
  447. SUNXI_FUNCTION(0x3, "lvds1")), /* VP3 */
  448. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 19),
  449. SUNXI_FUNCTION(0x0, "gpio_in"),
  450. SUNXI_FUNCTION(0x1, "gpio_out"),
  451. SUNXI_FUNCTION(0x2, "lcd0"), /* D19 */
  452. SUNXI_FUNCTION(0x3, "lvds1")), /* VN3 */
  453. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 20),
  454. SUNXI_FUNCTION(0x0, "gpio_in"),
  455. SUNXI_FUNCTION(0x1, "gpio_out"),
  456. SUNXI_FUNCTION(0x2, "lcd0"), /* D20 */
  457. SUNXI_FUNCTION(0x3, "csi1")), /* MCLK */
  458. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 21),
  459. SUNXI_FUNCTION(0x0, "gpio_in"),
  460. SUNXI_FUNCTION(0x1, "gpio_out"),
  461. SUNXI_FUNCTION(0x2, "lcd0"), /* D21 */
  462. SUNXI_FUNCTION(0x3, "sim")), /* VPPEN */
  463. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 22),
  464. SUNXI_FUNCTION(0x0, "gpio_in"),
  465. SUNXI_FUNCTION(0x1, "gpio_out"),
  466. SUNXI_FUNCTION(0x2, "lcd0"), /* D22 */
  467. SUNXI_FUNCTION(0x3, "sim")), /* VPPPP */
  468. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 23),
  469. SUNXI_FUNCTION(0x0, "gpio_in"),
  470. SUNXI_FUNCTION(0x1, "gpio_out"),
  471. SUNXI_FUNCTION(0x2, "lcd0"), /* D23 */
  472. SUNXI_FUNCTION(0x3, "sim")), /* DET */
  473. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 24),
  474. SUNXI_FUNCTION(0x0, "gpio_in"),
  475. SUNXI_FUNCTION(0x1, "gpio_out"),
  476. SUNXI_FUNCTION(0x2, "lcd0"), /* CLK */
  477. SUNXI_FUNCTION(0x3, "sim")), /* VCCEN */
  478. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 25),
  479. SUNXI_FUNCTION(0x0, "gpio_in"),
  480. SUNXI_FUNCTION(0x1, "gpio_out"),
  481. SUNXI_FUNCTION(0x2, "lcd0"), /* DE */
  482. SUNXI_FUNCTION(0x3, "sim")), /* RST */
  483. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 26),
  484. SUNXI_FUNCTION(0x0, "gpio_in"),
  485. SUNXI_FUNCTION(0x1, "gpio_out"),
  486. SUNXI_FUNCTION(0x2, "lcd0"), /* HSYNC */
  487. SUNXI_FUNCTION(0x3, "sim")), /* SCK */
  488. SUNXI_PIN(SUNXI_PINCTRL_PIN(D, 27),
  489. SUNXI_FUNCTION(0x0, "gpio_in"),
  490. SUNXI_FUNCTION(0x1, "gpio_out"),
  491. SUNXI_FUNCTION(0x2, "lcd0"), /* VSYNC */
  492. SUNXI_FUNCTION(0x3, "sim")), /* SDA */
  493. /* Hole */
  494. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 0),
  495. SUNXI_FUNCTION(0x0, "gpio_in"),
  496. SUNXI_FUNCTION(0x1, "gpio_out"),
  497. SUNXI_FUNCTION(0x2, "ts0"), /* CLK */
  498. SUNXI_FUNCTION(0x3, "csi0")), /* PCK */
  499. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 1),
  500. SUNXI_FUNCTION(0x0, "gpio_in"),
  501. SUNXI_FUNCTION(0x1, "gpio_out"),
  502. SUNXI_FUNCTION(0x2, "ts0"), /* ERR */
  503. SUNXI_FUNCTION(0x3, "csi0")), /* CK */
  504. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 2),
  505. SUNXI_FUNCTION(0x0, "gpio_in"),
  506. SUNXI_FUNCTION(0x1, "gpio_out"),
  507. SUNXI_FUNCTION(0x2, "ts0"), /* SYNC */
  508. SUNXI_FUNCTION(0x3, "csi0")), /* HSYNC */
  509. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 3),
  510. SUNXI_FUNCTION(0x0, "gpio_in"),
  511. SUNXI_FUNCTION(0x1, "gpio_out"),
  512. SUNXI_FUNCTION(0x2, "ts0"), /* DVLD */
  513. SUNXI_FUNCTION(0x3, "csi0")), /* VSYNC */
  514. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 4),
  515. SUNXI_FUNCTION(0x0, "gpio_in"),
  516. SUNXI_FUNCTION(0x1, "gpio_out"),
  517. SUNXI_FUNCTION(0x2, "ts0"), /* D0 */
  518. SUNXI_FUNCTION(0x3, "csi0")), /* D0 */
  519. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 5),
  520. SUNXI_FUNCTION(0x0, "gpio_in"),
  521. SUNXI_FUNCTION(0x1, "gpio_out"),
  522. SUNXI_FUNCTION(0x2, "ts0"), /* D1 */
  523. SUNXI_FUNCTION(0x3, "csi0"), /* D1 */
  524. SUNXI_FUNCTION(0x4, "sim")), /* VPPEN */
  525. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 6),
  526. SUNXI_FUNCTION(0x0, "gpio_in"),
  527. SUNXI_FUNCTION(0x1, "gpio_out"),
  528. SUNXI_FUNCTION(0x2, "ts0"), /* D2 */
  529. SUNXI_FUNCTION(0x3, "csi0")), /* D2 */
  530. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 7),
  531. SUNXI_FUNCTION(0x0, "gpio_in"),
  532. SUNXI_FUNCTION(0x1, "gpio_out"),
  533. SUNXI_FUNCTION(0x2, "ts0"), /* D3 */
  534. SUNXI_FUNCTION(0x3, "csi0")), /* D3 */
  535. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 8),
  536. SUNXI_FUNCTION(0x0, "gpio_in"),
  537. SUNXI_FUNCTION(0x1, "gpio_out"),
  538. SUNXI_FUNCTION(0x2, "ts0"), /* D4 */
  539. SUNXI_FUNCTION(0x3, "csi0")), /* D4 */
  540. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 9),
  541. SUNXI_FUNCTION(0x0, "gpio_in"),
  542. SUNXI_FUNCTION(0x1, "gpio_out"),
  543. SUNXI_FUNCTION(0x2, "ts0"), /* D5 */
  544. SUNXI_FUNCTION(0x3, "csi0")), /* D5 */
  545. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 10),
  546. SUNXI_FUNCTION(0x0, "gpio_in"),
  547. SUNXI_FUNCTION(0x1, "gpio_out"),
  548. SUNXI_FUNCTION(0x2, "ts0"), /* D6 */
  549. SUNXI_FUNCTION(0x3, "csi0")), /* D6 */
  550. SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 11),
  551. SUNXI_FUNCTION(0x0, "gpio_in"),
  552. SUNXI_FUNCTION(0x1, "gpio_out"),
  553. SUNXI_FUNCTION(0x2, "ts0"), /* D7 */
  554. SUNXI_FUNCTION(0x3, "csi0")), /* D7 */
  555. /* Hole */
  556. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 0),
  557. SUNXI_FUNCTION(0x0, "gpio_in"),
  558. SUNXI_FUNCTION(0x1, "gpio_out"),
  559. SUNXI_FUNCTION(0x2, "mmc0"), /* D1 */
  560. SUNXI_FUNCTION(0x4, "jtag")), /* MSI */
  561. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 1),
  562. SUNXI_FUNCTION(0x0, "gpio_in"),
  563. SUNXI_FUNCTION(0x1, "gpio_out"),
  564. SUNXI_FUNCTION(0x2, "mmc0"), /* D0 */
  565. SUNXI_FUNCTION(0x4, "jtag")), /* DI1 */
  566. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 2),
  567. SUNXI_FUNCTION(0x0, "gpio_in"),
  568. SUNXI_FUNCTION(0x1, "gpio_out"),
  569. SUNXI_FUNCTION(0x2, "mmc0"), /* CLK */
  570. SUNXI_FUNCTION(0x4, "uart0")), /* TX */
  571. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 3),
  572. SUNXI_FUNCTION(0x0, "gpio_in"),
  573. SUNXI_FUNCTION(0x1, "gpio_out"),
  574. SUNXI_FUNCTION(0x2, "mmc0"), /* CMD */
  575. SUNXI_FUNCTION(0x4, "jtag")), /* DO1 */
  576. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 4),
  577. SUNXI_FUNCTION(0x0, "gpio_in"),
  578. SUNXI_FUNCTION(0x1, "gpio_out"),
  579. SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */
  580. SUNXI_FUNCTION(0x4, "uart0")), /* RX */
  581. SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5),
  582. SUNXI_FUNCTION(0x0, "gpio_in"),
  583. SUNXI_FUNCTION(0x1, "gpio_out"),
  584. SUNXI_FUNCTION(0x2, "mmc0"), /* D2 */
  585. SUNXI_FUNCTION(0x4, "jtag")), /* CK1 */
  586. /* Hole */
  587. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 0),
  588. SUNXI_FUNCTION(0x0, "gpio_in"),
  589. SUNXI_FUNCTION(0x1, "gpio_out"),
  590. SUNXI_FUNCTION(0x2, "ts1"), /* CLK */
  591. SUNXI_FUNCTION(0x3, "csi1"), /* PCK */
  592. SUNXI_FUNCTION(0x4, "mmc1")), /* CMD */
  593. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 1),
  594. SUNXI_FUNCTION(0x0, "gpio_in"),
  595. SUNXI_FUNCTION(0x1, "gpio_out"),
  596. SUNXI_FUNCTION(0x2, "ts1"), /* ERR */
  597. SUNXI_FUNCTION(0x3, "csi1"), /* CK */
  598. SUNXI_FUNCTION(0x4, "mmc1")), /* CLK */
  599. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 2),
  600. SUNXI_FUNCTION(0x0, "gpio_in"),
  601. SUNXI_FUNCTION(0x1, "gpio_out"),
  602. SUNXI_FUNCTION(0x2, "ts1"), /* SYNC */
  603. SUNXI_FUNCTION(0x3, "csi1"), /* HSYNC */
  604. SUNXI_FUNCTION(0x4, "mmc1")), /* D0 */
  605. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 3),
  606. SUNXI_FUNCTION(0x0, "gpio_in"),
  607. SUNXI_FUNCTION(0x1, "gpio_out"),
  608. SUNXI_FUNCTION(0x2, "ts1"), /* DVLD */
  609. SUNXI_FUNCTION(0x3, "csi1"), /* VSYNC */
  610. SUNXI_FUNCTION(0x4, "mmc1")), /* D1 */
  611. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 4),
  612. SUNXI_FUNCTION(0x0, "gpio_in"),
  613. SUNXI_FUNCTION(0x1, "gpio_out"),
  614. SUNXI_FUNCTION(0x2, "ts1"), /* D0 */
  615. SUNXI_FUNCTION(0x3, "csi1"), /* D0 */
  616. SUNXI_FUNCTION(0x4, "mmc1"), /* D2 */
  617. SUNXI_FUNCTION(0x5, "csi0")), /* D8 */
  618. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 5),
  619. SUNXI_FUNCTION(0x0, "gpio_in"),
  620. SUNXI_FUNCTION(0x1, "gpio_out"),
  621. SUNXI_FUNCTION(0x2, "ts1"), /* D1 */
  622. SUNXI_FUNCTION(0x3, "csi1"), /* D1 */
  623. SUNXI_FUNCTION(0x4, "mmc1"), /* D3 */
  624. SUNXI_FUNCTION(0x5, "csi0")), /* D9 */
  625. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 6),
  626. SUNXI_FUNCTION(0x0, "gpio_in"),
  627. SUNXI_FUNCTION(0x1, "gpio_out"),
  628. SUNXI_FUNCTION(0x2, "ts1"), /* D2 */
  629. SUNXI_FUNCTION(0x3, "csi1"), /* D2 */
  630. SUNXI_FUNCTION(0x4, "uart3"), /* TX */
  631. SUNXI_FUNCTION(0x5, "csi0")), /* D10 */
  632. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 7),
  633. SUNXI_FUNCTION(0x0, "gpio_in"),
  634. SUNXI_FUNCTION(0x1, "gpio_out"),
  635. SUNXI_FUNCTION(0x2, "ts1"), /* D3 */
  636. SUNXI_FUNCTION(0x3, "csi1"), /* D3 */
  637. SUNXI_FUNCTION(0x4, "uart3"), /* RX */
  638. SUNXI_FUNCTION(0x5, "csi0")), /* D11 */
  639. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 8),
  640. SUNXI_FUNCTION(0x0, "gpio_in"),
  641. SUNXI_FUNCTION(0x1, "gpio_out"),
  642. SUNXI_FUNCTION(0x2, "ts1"), /* D4 */
  643. SUNXI_FUNCTION(0x3, "csi1"), /* D4 */
  644. SUNXI_FUNCTION(0x4, "uart3"), /* RTS */
  645. SUNXI_FUNCTION(0x5, "csi0")), /* D12 */
  646. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 9),
  647. SUNXI_FUNCTION(0x0, "gpio_in"),
  648. SUNXI_FUNCTION(0x1, "gpio_out"),
  649. SUNXI_FUNCTION(0x2, "ts1"), /* D5 */
  650. SUNXI_FUNCTION(0x3, "csi1"), /* D5 */
  651. SUNXI_FUNCTION(0x4, "uart3"), /* CTS */
  652. SUNXI_FUNCTION(0x5, "csi0")), /* D13 */
  653. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 10),
  654. SUNXI_FUNCTION(0x0, "gpio_in"),
  655. SUNXI_FUNCTION(0x1, "gpio_out"),
  656. SUNXI_FUNCTION(0x2, "ts1"), /* D6 */
  657. SUNXI_FUNCTION(0x3, "csi1"), /* D6 */
  658. SUNXI_FUNCTION(0x4, "uart4"), /* TX */
  659. SUNXI_FUNCTION(0x5, "csi0")), /* D14 */
  660. SUNXI_PIN(SUNXI_PINCTRL_PIN(G, 11),
  661. SUNXI_FUNCTION(0x0, "gpio_in"),
  662. SUNXI_FUNCTION(0x1, "gpio_out"),
  663. SUNXI_FUNCTION(0x2, "ts1"), /* D7 */
  664. SUNXI_FUNCTION(0x3, "csi1"), /* D7 */
  665. SUNXI_FUNCTION(0x4, "uart4"), /* RX */
  666. SUNXI_FUNCTION(0x5, "csi0")), /* D15 */
  667. /* Hole */
  668. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 0),
  669. SUNXI_FUNCTION(0x0, "gpio_in"),
  670. SUNXI_FUNCTION(0x1, "gpio_out"),
  671. SUNXI_FUNCTION(0x2, "lcd1"), /* D0 */
  672. SUNXI_FUNCTION(0x3, "pata"), /* ATAA0 */
  673. SUNXI_FUNCTION(0x4, "uart3"), /* TX */
  674. SUNXI_FUNCTION_IRQ(0x6, 0), /* EINT0 */
  675. SUNXI_FUNCTION(0x7, "csi1")), /* D0 */
  676. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 1),
  677. SUNXI_FUNCTION(0x0, "gpio_in"),
  678. SUNXI_FUNCTION(0x1, "gpio_out"),
  679. SUNXI_FUNCTION(0x2, "lcd1"), /* D1 */
  680. SUNXI_FUNCTION(0x3, "pata"), /* ATAA1 */
  681. SUNXI_FUNCTION(0x4, "uart3"), /* RX */
  682. SUNXI_FUNCTION_IRQ(0x6, 1), /* EINT1 */
  683. SUNXI_FUNCTION(0x7, "csi1")), /* D1 */
  684. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 2),
  685. SUNXI_FUNCTION(0x0, "gpio_in"),
  686. SUNXI_FUNCTION(0x1, "gpio_out"),
  687. SUNXI_FUNCTION(0x2, "lcd1"), /* D2 */
  688. SUNXI_FUNCTION(0x3, "pata"), /* ATAA2 */
  689. SUNXI_FUNCTION(0x4, "uart3"), /* RTS */
  690. SUNXI_FUNCTION_IRQ(0x6, 2), /* EINT2 */
  691. SUNXI_FUNCTION(0x7, "csi1")), /* D2 */
  692. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 3),
  693. SUNXI_FUNCTION(0x0, "gpio_in"),
  694. SUNXI_FUNCTION(0x1, "gpio_out"),
  695. SUNXI_FUNCTION(0x2, "lcd1"), /* D3 */
  696. SUNXI_FUNCTION(0x3, "pata"), /* ATAIRQ */
  697. SUNXI_FUNCTION(0x4, "uart3"), /* CTS */
  698. SUNXI_FUNCTION_IRQ(0x6, 3), /* EINT3 */
  699. SUNXI_FUNCTION(0x7, "csi1")), /* D3 */
  700. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 4),
  701. SUNXI_FUNCTION(0x0, "gpio_in"),
  702. SUNXI_FUNCTION(0x1, "gpio_out"),
  703. SUNXI_FUNCTION(0x2, "lcd1"), /* D4 */
  704. SUNXI_FUNCTION(0x3, "pata"), /* ATAD0 */
  705. SUNXI_FUNCTION(0x4, "uart4"), /* TX */
  706. SUNXI_FUNCTION_IRQ(0x6, 4), /* EINT4 */
  707. SUNXI_FUNCTION(0x7, "csi1")), /* D4 */
  708. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 5),
  709. SUNXI_FUNCTION(0x0, "gpio_in"),
  710. SUNXI_FUNCTION(0x1, "gpio_out"),
  711. SUNXI_FUNCTION(0x2, "lcd1"), /* D5 */
  712. SUNXI_FUNCTION(0x3, "pata"), /* ATAD1 */
  713. SUNXI_FUNCTION(0x4, "uart4"), /* RX */
  714. SUNXI_FUNCTION_IRQ(0x6, 5), /* EINT5 */
  715. SUNXI_FUNCTION(0x7, "csi1")), /* D5 */
  716. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 6),
  717. SUNXI_FUNCTION(0x0, "gpio_in"),
  718. SUNXI_FUNCTION(0x1, "gpio_out"),
  719. SUNXI_FUNCTION(0x2, "lcd1"), /* D6 */
  720. SUNXI_FUNCTION(0x3, "pata"), /* ATAD2 */
  721. SUNXI_FUNCTION(0x4, "uart5"), /* TX */
  722. SUNXI_FUNCTION(0x5, "ms"), /* BS */
  723. SUNXI_FUNCTION_IRQ(0x6, 6), /* EINT6 */
  724. SUNXI_FUNCTION(0x7, "csi1")), /* D6 */
  725. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 7),
  726. SUNXI_FUNCTION(0x0, "gpio_in"),
  727. SUNXI_FUNCTION(0x1, "gpio_out"),
  728. SUNXI_FUNCTION(0x2, "lcd1"), /* D7 */
  729. SUNXI_FUNCTION(0x3, "pata"), /* ATAD3 */
  730. SUNXI_FUNCTION(0x4, "uart5"), /* RX */
  731. SUNXI_FUNCTION(0x5, "ms"), /* CLK */
  732. SUNXI_FUNCTION_IRQ(0x6, 7), /* EINT7 */
  733. SUNXI_FUNCTION(0x7, "csi1")), /* D7 */
  734. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 8),
  735. SUNXI_FUNCTION(0x0, "gpio_in"),
  736. SUNXI_FUNCTION(0x1, "gpio_out"),
  737. SUNXI_FUNCTION(0x2, "lcd1"), /* D8 */
  738. SUNXI_FUNCTION(0x3, "pata"), /* ATAD4 */
  739. SUNXI_FUNCTION(0x4, "keypad"), /* IN0 */
  740. SUNXI_FUNCTION(0x5, "ms"), /* D0 */
  741. SUNXI_FUNCTION_IRQ(0x6, 8), /* EINT8 */
  742. SUNXI_FUNCTION(0x7, "csi1")), /* D8 */
  743. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 9),
  744. SUNXI_FUNCTION(0x0, "gpio_in"),
  745. SUNXI_FUNCTION(0x1, "gpio_out"),
  746. SUNXI_FUNCTION(0x2, "lcd1"), /* D9 */
  747. SUNXI_FUNCTION(0x3, "pata"), /* ATAD5 */
  748. SUNXI_FUNCTION(0x4, "keypad"), /* IN1 */
  749. SUNXI_FUNCTION(0x5, "ms"), /* D1 */
  750. SUNXI_FUNCTION_IRQ(0x6, 9), /* EINT9 */
  751. SUNXI_FUNCTION(0x7, "csi1")), /* D9 */
  752. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 10),
  753. SUNXI_FUNCTION(0x0, "gpio_in"),
  754. SUNXI_FUNCTION(0x1, "gpio_out"),
  755. SUNXI_FUNCTION(0x2, "lcd1"), /* D10 */
  756. SUNXI_FUNCTION(0x3, "pata"), /* ATAD6 */
  757. SUNXI_FUNCTION(0x4, "keypad"), /* IN2 */
  758. SUNXI_FUNCTION(0x5, "ms"), /* D2 */
  759. SUNXI_FUNCTION_IRQ(0x6, 10), /* EINT10 */
  760. SUNXI_FUNCTION(0x7, "csi1")), /* D10 */
  761. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 11),
  762. SUNXI_FUNCTION(0x0, "gpio_in"),
  763. SUNXI_FUNCTION(0x1, "gpio_out"),
  764. SUNXI_FUNCTION(0x2, "lcd1"), /* D11 */
  765. SUNXI_FUNCTION(0x3, "pata"), /* ATAD7 */
  766. SUNXI_FUNCTION(0x4, "keypad"), /* IN3 */
  767. SUNXI_FUNCTION(0x5, "ms"), /* D3 */
  768. SUNXI_FUNCTION_IRQ(0x6, 11), /* EINT11 */
  769. SUNXI_FUNCTION(0x7, "csi1")), /* D11 */
  770. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 12),
  771. SUNXI_FUNCTION(0x0, "gpio_in"),
  772. SUNXI_FUNCTION(0x1, "gpio_out"),
  773. SUNXI_FUNCTION(0x2, "lcd1"), /* D12 */
  774. SUNXI_FUNCTION(0x3, "pata"), /* ATAD8 */
  775. SUNXI_FUNCTION(0x4, "ps2"), /* SCK1 */
  776. SUNXI_FUNCTION_IRQ(0x6, 12), /* EINT12 */
  777. SUNXI_FUNCTION(0x7, "csi1")), /* D12 */
  778. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 13),
  779. SUNXI_FUNCTION(0x0, "gpio_in"),
  780. SUNXI_FUNCTION(0x1, "gpio_out"),
  781. SUNXI_FUNCTION(0x2, "lcd1"), /* D13 */
  782. SUNXI_FUNCTION(0x3, "pata"), /* ATAD9 */
  783. SUNXI_FUNCTION(0x4, "ps2"), /* SDA1 */
  784. SUNXI_FUNCTION(0x5, "sim"), /* RST */
  785. SUNXI_FUNCTION_IRQ(0x6, 13), /* EINT13 */
  786. SUNXI_FUNCTION(0x7, "csi1")), /* D13 */
  787. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 14),
  788. SUNXI_FUNCTION(0x0, "gpio_in"),
  789. SUNXI_FUNCTION(0x1, "gpio_out"),
  790. SUNXI_FUNCTION(0x2, "lcd1"), /* D14 */
  791. SUNXI_FUNCTION(0x3, "pata"), /* ATAD10 */
  792. SUNXI_FUNCTION(0x4, "keypad"), /* IN4 */
  793. SUNXI_FUNCTION(0x5, "sim"), /* VPPEN */
  794. SUNXI_FUNCTION_IRQ(0x6, 14), /* EINT14 */
  795. SUNXI_FUNCTION(0x7, "csi1")), /* D14 */
  796. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 15),
  797. SUNXI_FUNCTION(0x0, "gpio_in"),
  798. SUNXI_FUNCTION(0x1, "gpio_out"),
  799. SUNXI_FUNCTION(0x2, "lcd1"), /* D15 */
  800. SUNXI_FUNCTION(0x3, "pata"), /* ATAD11 */
  801. SUNXI_FUNCTION(0x4, "keypad"), /* IN5 */
  802. SUNXI_FUNCTION(0x5, "sim"), /* VPPPP */
  803. SUNXI_FUNCTION_IRQ(0x6, 15), /* EINT15 */
  804. SUNXI_FUNCTION(0x7, "csi1")), /* D15 */
  805. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 16),
  806. SUNXI_FUNCTION(0x0, "gpio_in"),
  807. SUNXI_FUNCTION(0x1, "gpio_out"),
  808. SUNXI_FUNCTION(0x2, "lcd1"), /* D16 */
  809. SUNXI_FUNCTION(0x3, "pata"), /* ATAD12 */
  810. SUNXI_FUNCTION(0x4, "keypad"), /* IN6 */
  811. SUNXI_FUNCTION(0x5, "sim"), /* DET */
  812. SUNXI_FUNCTION_IRQ(0x6, 16), /* EINT16 */
  813. SUNXI_FUNCTION(0x7, "csi1")), /* D16 */
  814. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
  815. SUNXI_FUNCTION(0x0, "gpio_in"),
  816. SUNXI_FUNCTION(0x1, "gpio_out"),
  817. SUNXI_FUNCTION(0x2, "lcd1"), /* D17 */
  818. SUNXI_FUNCTION(0x3, "pata"), /* ATAD13 */
  819. SUNXI_FUNCTION(0x4, "keypad"), /* IN7 */
  820. SUNXI_FUNCTION(0x5, "sim"), /* VCCEN */
  821. SUNXI_FUNCTION_IRQ(0x6, 17), /* EINT17 */
  822. SUNXI_FUNCTION(0x7, "csi1")), /* D17 */
  823. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 18),
  824. SUNXI_FUNCTION(0x0, "gpio_in"),
  825. SUNXI_FUNCTION(0x1, "gpio_out"),
  826. SUNXI_FUNCTION(0x2, "lcd1"), /* D18 */
  827. SUNXI_FUNCTION(0x3, "pata"), /* ATAD14 */
  828. SUNXI_FUNCTION(0x4, "keypad"), /* OUT0 */
  829. SUNXI_FUNCTION(0x5, "sim"), /* SCK */
  830. SUNXI_FUNCTION_IRQ(0x6, 18), /* EINT18 */
  831. SUNXI_FUNCTION(0x7, "csi1")), /* D18 */
  832. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 19),
  833. SUNXI_FUNCTION(0x0, "gpio_in"),
  834. SUNXI_FUNCTION(0x1, "gpio_out"),
  835. SUNXI_FUNCTION(0x2, "lcd1"), /* D19 */
  836. SUNXI_FUNCTION(0x3, "pata"), /* ATAD15 */
  837. SUNXI_FUNCTION(0x4, "keypad"), /* OUT1 */
  838. SUNXI_FUNCTION(0x5, "sim"), /* SDA */
  839. SUNXI_FUNCTION_IRQ(0x6, 19), /* EINT19 */
  840. SUNXI_FUNCTION(0x7, "csi1")), /* D19 */
  841. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 20),
  842. SUNXI_FUNCTION(0x0, "gpio_in"),
  843. SUNXI_FUNCTION(0x1, "gpio_out"),
  844. SUNXI_FUNCTION(0x2, "lcd1"), /* D20 */
  845. SUNXI_FUNCTION(0x3, "pata"), /* ATAOE */
  846. SUNXI_FUNCTION(0x4, "can"), /* TX */
  847. SUNXI_FUNCTION_IRQ(0x6, 20), /* EINT20 */
  848. SUNXI_FUNCTION(0x7, "csi1")), /* D20 */
  849. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 21),
  850. SUNXI_FUNCTION(0x0, "gpio_in"),
  851. SUNXI_FUNCTION(0x1, "gpio_out"),
  852. SUNXI_FUNCTION(0x2, "lcd1"), /* D21 */
  853. SUNXI_FUNCTION(0x3, "pata"), /* ATADREQ */
  854. SUNXI_FUNCTION(0x4, "can"), /* RX */
  855. SUNXI_FUNCTION_IRQ(0x6, 21), /* EINT21 */
  856. SUNXI_FUNCTION(0x7, "csi1")), /* D21 */
  857. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 22),
  858. SUNXI_FUNCTION(0x0, "gpio_in"),
  859. SUNXI_FUNCTION(0x1, "gpio_out"),
  860. SUNXI_FUNCTION(0x2, "lcd1"), /* D22 */
  861. SUNXI_FUNCTION(0x3, "pata"), /* ATADACK */
  862. SUNXI_FUNCTION(0x4, "keypad"), /* OUT2 */
  863. SUNXI_FUNCTION(0x5, "mmc1"), /* CMD */
  864. SUNXI_FUNCTION(0x7, "csi1")), /* D22 */
  865. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 23),
  866. SUNXI_FUNCTION(0x0, "gpio_in"),
  867. SUNXI_FUNCTION(0x1, "gpio_out"),
  868. SUNXI_FUNCTION(0x2, "lcd1"), /* D23 */
  869. SUNXI_FUNCTION(0x3, "pata"), /* ATACS0 */
  870. SUNXI_FUNCTION(0x4, "keypad"), /* OUT3 */
  871. SUNXI_FUNCTION(0x5, "mmc1"), /* CLK */
  872. SUNXI_FUNCTION(0x7, "csi1")), /* D23 */
  873. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 24),
  874. SUNXI_FUNCTION(0x0, "gpio_in"),
  875. SUNXI_FUNCTION(0x1, "gpio_out"),
  876. SUNXI_FUNCTION(0x2, "lcd1"), /* CLK */
  877. SUNXI_FUNCTION(0x3, "pata"), /* ATACS1 */
  878. SUNXI_FUNCTION(0x4, "keypad"), /* OUT4 */
  879. SUNXI_FUNCTION(0x5, "mmc1"), /* D0 */
  880. SUNXI_FUNCTION(0x7, "csi1")), /* PCLK */
  881. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 25),
  882. SUNXI_FUNCTION(0x0, "gpio_in"),
  883. SUNXI_FUNCTION(0x1, "gpio_out"),
  884. SUNXI_FUNCTION(0x2, "lcd1"), /* DE */
  885. SUNXI_FUNCTION(0x3, "pata"), /* ATAIORDY */
  886. SUNXI_FUNCTION(0x4, "keypad"), /* OUT5 */
  887. SUNXI_FUNCTION(0x5, "mmc1"), /* D1 */
  888. SUNXI_FUNCTION(0x7, "csi1")), /* FIELD */
  889. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 26),
  890. SUNXI_FUNCTION(0x0, "gpio_in"),
  891. SUNXI_FUNCTION(0x1, "gpio_out"),
  892. SUNXI_FUNCTION(0x2, "lcd1"), /* HSYNC */
  893. SUNXI_FUNCTION(0x3, "pata"), /* ATAIOR */
  894. SUNXI_FUNCTION(0x4, "keypad"), /* OUT6 */
  895. SUNXI_FUNCTION(0x5, "mmc1"), /* D2 */
  896. SUNXI_FUNCTION(0x7, "csi1")), /* HSYNC */
  897. SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 27),
  898. SUNXI_FUNCTION(0x0, "gpio_in"),
  899. SUNXI_FUNCTION(0x1, "gpio_out"),
  900. SUNXI_FUNCTION(0x2, "lcd1"), /* VSYNC */
  901. SUNXI_FUNCTION(0x3, "pata"), /* ATAIOW */
  902. SUNXI_FUNCTION(0x4, "keypad"), /* OUT7 */
  903. SUNXI_FUNCTION(0x5, "mmc1"), /* D3 */
  904. SUNXI_FUNCTION(0x7, "csi1")), /* VSYNC */
  905. /* Hole */
  906. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 0),
  907. SUNXI_FUNCTION(0x0, "gpio_in"),
  908. SUNXI_FUNCTION(0x1, "gpio_out")),
  909. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 1),
  910. SUNXI_FUNCTION(0x0, "gpio_in"),
  911. SUNXI_FUNCTION(0x1, "gpio_out")),
  912. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 2),
  913. SUNXI_FUNCTION(0x0, "gpio_in"),
  914. SUNXI_FUNCTION(0x1, "gpio_out")),
  915. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 3),
  916. SUNXI_FUNCTION(0x0, "gpio_in"),
  917. SUNXI_FUNCTION(0x1, "gpio_out"),
  918. SUNXI_FUNCTION(0x2, "pwm")), /* PWM1 */
  919. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 4),
  920. SUNXI_FUNCTION(0x0, "gpio_in"),
  921. SUNXI_FUNCTION(0x1, "gpio_out"),
  922. SUNXI_FUNCTION(0x2, "mmc3")), /* CMD */
  923. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 5),
  924. SUNXI_FUNCTION(0x0, "gpio_in"),
  925. SUNXI_FUNCTION(0x1, "gpio_out"),
  926. SUNXI_FUNCTION(0x2, "mmc3")), /* CLK */
  927. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 6),
  928. SUNXI_FUNCTION(0x0, "gpio_in"),
  929. SUNXI_FUNCTION(0x1, "gpio_out"),
  930. SUNXI_FUNCTION(0x2, "mmc3")), /* D0 */
  931. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 7),
  932. SUNXI_FUNCTION(0x0, "gpio_in"),
  933. SUNXI_FUNCTION(0x1, "gpio_out"),
  934. SUNXI_FUNCTION(0x2, "mmc3")), /* D1 */
  935. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 8),
  936. SUNXI_FUNCTION(0x0, "gpio_in"),
  937. SUNXI_FUNCTION(0x1, "gpio_out"),
  938. SUNXI_FUNCTION(0x2, "mmc3")), /* D2 */
  939. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 9),
  940. SUNXI_FUNCTION(0x0, "gpio_in"),
  941. SUNXI_FUNCTION(0x1, "gpio_out"),
  942. SUNXI_FUNCTION(0x2, "mmc3")), /* D3 */
  943. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 10),
  944. SUNXI_FUNCTION(0x0, "gpio_in"),
  945. SUNXI_FUNCTION(0x1, "gpio_out"),
  946. SUNXI_FUNCTION(0x2, "spi0"), /* CS0 */
  947. SUNXI_FUNCTION(0x3, "uart5"), /* TX */
  948. SUNXI_FUNCTION_IRQ(0x6, 22)), /* EINT22 */
  949. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 11),
  950. SUNXI_FUNCTION(0x0, "gpio_in"),
  951. SUNXI_FUNCTION(0x1, "gpio_out"),
  952. SUNXI_FUNCTION(0x2, "spi0"), /* CLK */
  953. SUNXI_FUNCTION(0x3, "uart5"), /* RX */
  954. SUNXI_FUNCTION_IRQ(0x6, 23)), /* EINT23 */
  955. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 12),
  956. SUNXI_FUNCTION(0x0, "gpio_in"),
  957. SUNXI_FUNCTION(0x1, "gpio_out"),
  958. SUNXI_FUNCTION(0x2, "spi0"), /* MOSI */
  959. SUNXI_FUNCTION(0x3, "uart6"), /* TX */
  960. SUNXI_FUNCTION_IRQ(0x6, 24)), /* EINT24 */
  961. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 13),
  962. SUNXI_FUNCTION(0x0, "gpio_in"),
  963. SUNXI_FUNCTION(0x1, "gpio_out"),
  964. SUNXI_FUNCTION(0x2, "spi0"), /* MISO */
  965. SUNXI_FUNCTION(0x3, "uart6"), /* RX */
  966. SUNXI_FUNCTION_IRQ(0x6, 25)), /* EINT25 */
  967. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 14),
  968. SUNXI_FUNCTION(0x0, "gpio_in"),
  969. SUNXI_FUNCTION(0x1, "gpio_out"),
  970. SUNXI_FUNCTION(0x2, "spi0"), /* CS1 */
  971. SUNXI_FUNCTION(0x3, "ps2"), /* SCK1 */
  972. SUNXI_FUNCTION(0x4, "timer4"), /* TCLKIN0 */
  973. SUNXI_FUNCTION_IRQ(0x6, 26)), /* EINT26 */
  974. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 15),
  975. SUNXI_FUNCTION(0x0, "gpio_in"),
  976. SUNXI_FUNCTION(0x1, "gpio_out"),
  977. SUNXI_FUNCTION(0x2, "spi1"), /* CS1 */
  978. SUNXI_FUNCTION(0x3, "ps2"), /* SDA1 */
  979. SUNXI_FUNCTION(0x4, "timer5"), /* TCLKIN1 */
  980. SUNXI_FUNCTION_IRQ(0x6, 27)), /* EINT27 */
  981. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 16),
  982. SUNXI_FUNCTION(0x0, "gpio_in"),
  983. SUNXI_FUNCTION(0x1, "gpio_out"),
  984. SUNXI_FUNCTION(0x2, "spi1"), /* CS0 */
  985. SUNXI_FUNCTION(0x3, "uart2"), /* RTS */
  986. SUNXI_FUNCTION_IRQ(0x6, 28)), /* EINT28 */
  987. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 17),
  988. SUNXI_FUNCTION(0x0, "gpio_in"),
  989. SUNXI_FUNCTION(0x1, "gpio_out"),
  990. SUNXI_FUNCTION(0x2, "spi1"), /* CLK */
  991. SUNXI_FUNCTION(0x3, "uart2"), /* CTS */
  992. SUNXI_FUNCTION_IRQ(0x6, 29)), /* EINT29 */
  993. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 18),
  994. SUNXI_FUNCTION(0x0, "gpio_in"),
  995. SUNXI_FUNCTION(0x1, "gpio_out"),
  996. SUNXI_FUNCTION(0x2, "spi1"), /* MOSI */
  997. SUNXI_FUNCTION(0x3, "uart2"), /* TX */
  998. SUNXI_FUNCTION_IRQ(0x6, 30)), /* EINT30 */
  999. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 19),
  1000. SUNXI_FUNCTION(0x0, "gpio_in"),
  1001. SUNXI_FUNCTION(0x1, "gpio_out"),
  1002. SUNXI_FUNCTION(0x2, "spi1"), /* MISO */
  1003. SUNXI_FUNCTION(0x3, "uart2"), /* RX */
  1004. SUNXI_FUNCTION_IRQ(0x6, 31)), /* EINT31 */
  1005. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 20),
  1006. SUNXI_FUNCTION(0x0, "gpio_in"),
  1007. SUNXI_FUNCTION(0x1, "gpio_out"),
  1008. SUNXI_FUNCTION(0x2, "ps2"), /* SCK0 */
  1009. SUNXI_FUNCTION(0x3, "uart7"), /* TX */
  1010. SUNXI_FUNCTION(0x4, "hdmi")), /* HSCL */
  1011. SUNXI_PIN(SUNXI_PINCTRL_PIN(I, 21),
  1012. SUNXI_FUNCTION(0x0, "gpio_in"),
  1013. SUNXI_FUNCTION(0x1, "gpio_out"),
  1014. SUNXI_FUNCTION(0x2, "ps2"), /* SDA0 */
  1015. SUNXI_FUNCTION(0x3, "uart7"), /* RX */
  1016. SUNXI_FUNCTION(0x4, "hdmi")), /* HSDA */
  1017. };
  1018. static const struct sunxi_pinctrl_desc sun4i_a10_pinctrl_data = {
  1019. .pins = sun4i_a10_pins,
  1020. .npins = ARRAY_SIZE(sun4i_a10_pins),
  1021. .irq_banks = 1,
  1022. .irq_read_needs_mux = true,
  1023. };
  1024. static int sun4i_a10_pinctrl_probe(struct platform_device *pdev)
  1025. {
  1026. return sunxi_pinctrl_init(pdev,
  1027. &sun4i_a10_pinctrl_data);
  1028. }
  1029. static const struct of_device_id sun4i_a10_pinctrl_match[] = {
  1030. { .compatible = "allwinner,sun4i-a10-pinctrl", },
  1031. {}
  1032. };
  1033. MODULE_DEVICE_TABLE(of, sun4i_a10_pinctrl_match);
  1034. static struct platform_driver sun4i_a10_pinctrl_driver = {
  1035. .probe = sun4i_a10_pinctrl_probe,
  1036. .driver = {
  1037. .name = "sun4i-pinctrl",
  1038. .of_match_table = sun4i_a10_pinctrl_match,
  1039. },
  1040. };
  1041. module_platform_driver(sun4i_a10_pinctrl_driver);
  1042. MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com");
  1043. MODULE_DESCRIPTION("Allwinner A10 pinctrl driver");
  1044. MODULE_LICENSE("GPL");