pinctrl-imx6q.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. /*
  2. * imx6q pinctrl driver based on imx pinmux core
  3. *
  4. * Copyright (C) 2012 Freescale Semiconductor, Inc.
  5. * Copyright (C) 2012 Linaro, Inc.
  6. *
  7. * Author: Dong Aisheng <dong.aisheng@linaro.org>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. */
  14. #include <linux/err.h>
  15. #include <linux/init.h>
  16. #include <linux/io.h>
  17. #include <linux/of.h>
  18. #include <linux/of_device.h>
  19. #include <linux/pinctrl/pinctrl.h>
  20. #include "pinctrl-imx.h"
  21. enum imx6q_pads {
  22. MX6Q_PAD_RESERVE0 = 0,
  23. MX6Q_PAD_RESERVE1 = 1,
  24. MX6Q_PAD_RESERVE2 = 2,
  25. MX6Q_PAD_RESERVE3 = 3,
  26. MX6Q_PAD_RESERVE4 = 4,
  27. MX6Q_PAD_RESERVE5 = 5,
  28. MX6Q_PAD_RESERVE6 = 6,
  29. MX6Q_PAD_RESERVE7 = 7,
  30. MX6Q_PAD_RESERVE8 = 8,
  31. MX6Q_PAD_RESERVE9 = 9,
  32. MX6Q_PAD_RESERVE10 = 10,
  33. MX6Q_PAD_RESERVE11 = 11,
  34. MX6Q_PAD_RESERVE12 = 12,
  35. MX6Q_PAD_RESERVE13 = 13,
  36. MX6Q_PAD_RESERVE14 = 14,
  37. MX6Q_PAD_RESERVE15 = 15,
  38. MX6Q_PAD_RESERVE16 = 16,
  39. MX6Q_PAD_RESERVE17 = 17,
  40. MX6Q_PAD_RESERVE18 = 18,
  41. MX6Q_PAD_SD2_DAT1 = 19,
  42. MX6Q_PAD_SD2_DAT2 = 20,
  43. MX6Q_PAD_SD2_DAT0 = 21,
  44. MX6Q_PAD_RGMII_TXC = 22,
  45. MX6Q_PAD_RGMII_TD0 = 23,
  46. MX6Q_PAD_RGMII_TD1 = 24,
  47. MX6Q_PAD_RGMII_TD2 = 25,
  48. MX6Q_PAD_RGMII_TD3 = 26,
  49. MX6Q_PAD_RGMII_RX_CTL = 27,
  50. MX6Q_PAD_RGMII_RD0 = 28,
  51. MX6Q_PAD_RGMII_TX_CTL = 29,
  52. MX6Q_PAD_RGMII_RD1 = 30,
  53. MX6Q_PAD_RGMII_RD2 = 31,
  54. MX6Q_PAD_RGMII_RD3 = 32,
  55. MX6Q_PAD_RGMII_RXC = 33,
  56. MX6Q_PAD_EIM_A25 = 34,
  57. MX6Q_PAD_EIM_EB2 = 35,
  58. MX6Q_PAD_EIM_D16 = 36,
  59. MX6Q_PAD_EIM_D17 = 37,
  60. MX6Q_PAD_EIM_D18 = 38,
  61. MX6Q_PAD_EIM_D19 = 39,
  62. MX6Q_PAD_EIM_D20 = 40,
  63. MX6Q_PAD_EIM_D21 = 41,
  64. MX6Q_PAD_EIM_D22 = 42,
  65. MX6Q_PAD_EIM_D23 = 43,
  66. MX6Q_PAD_EIM_EB3 = 44,
  67. MX6Q_PAD_EIM_D24 = 45,
  68. MX6Q_PAD_EIM_D25 = 46,
  69. MX6Q_PAD_EIM_D26 = 47,
  70. MX6Q_PAD_EIM_D27 = 48,
  71. MX6Q_PAD_EIM_D28 = 49,
  72. MX6Q_PAD_EIM_D29 = 50,
  73. MX6Q_PAD_EIM_D30 = 51,
  74. MX6Q_PAD_EIM_D31 = 52,
  75. MX6Q_PAD_EIM_A24 = 53,
  76. MX6Q_PAD_EIM_A23 = 54,
  77. MX6Q_PAD_EIM_A22 = 55,
  78. MX6Q_PAD_EIM_A21 = 56,
  79. MX6Q_PAD_EIM_A20 = 57,
  80. MX6Q_PAD_EIM_A19 = 58,
  81. MX6Q_PAD_EIM_A18 = 59,
  82. MX6Q_PAD_EIM_A17 = 60,
  83. MX6Q_PAD_EIM_A16 = 61,
  84. MX6Q_PAD_EIM_CS0 = 62,
  85. MX6Q_PAD_EIM_CS1 = 63,
  86. MX6Q_PAD_EIM_OE = 64,
  87. MX6Q_PAD_EIM_RW = 65,
  88. MX6Q_PAD_EIM_LBA = 66,
  89. MX6Q_PAD_EIM_EB0 = 67,
  90. MX6Q_PAD_EIM_EB1 = 68,
  91. MX6Q_PAD_EIM_DA0 = 69,
  92. MX6Q_PAD_EIM_DA1 = 70,
  93. MX6Q_PAD_EIM_DA2 = 71,
  94. MX6Q_PAD_EIM_DA3 = 72,
  95. MX6Q_PAD_EIM_DA4 = 73,
  96. MX6Q_PAD_EIM_DA5 = 74,
  97. MX6Q_PAD_EIM_DA6 = 75,
  98. MX6Q_PAD_EIM_DA7 = 76,
  99. MX6Q_PAD_EIM_DA8 = 77,
  100. MX6Q_PAD_EIM_DA9 = 78,
  101. MX6Q_PAD_EIM_DA10 = 79,
  102. MX6Q_PAD_EIM_DA11 = 80,
  103. MX6Q_PAD_EIM_DA12 = 81,
  104. MX6Q_PAD_EIM_DA13 = 82,
  105. MX6Q_PAD_EIM_DA14 = 83,
  106. MX6Q_PAD_EIM_DA15 = 84,
  107. MX6Q_PAD_EIM_WAIT = 85,
  108. MX6Q_PAD_EIM_BCLK = 86,
  109. MX6Q_PAD_DI0_DISP_CLK = 87,
  110. MX6Q_PAD_DI0_PIN15 = 88,
  111. MX6Q_PAD_DI0_PIN2 = 89,
  112. MX6Q_PAD_DI0_PIN3 = 90,
  113. MX6Q_PAD_DI0_PIN4 = 91,
  114. MX6Q_PAD_DISP0_DAT0 = 92,
  115. MX6Q_PAD_DISP0_DAT1 = 93,
  116. MX6Q_PAD_DISP0_DAT2 = 94,
  117. MX6Q_PAD_DISP0_DAT3 = 95,
  118. MX6Q_PAD_DISP0_DAT4 = 96,
  119. MX6Q_PAD_DISP0_DAT5 = 97,
  120. MX6Q_PAD_DISP0_DAT6 = 98,
  121. MX6Q_PAD_DISP0_DAT7 = 99,
  122. MX6Q_PAD_DISP0_DAT8 = 100,
  123. MX6Q_PAD_DISP0_DAT9 = 101,
  124. MX6Q_PAD_DISP0_DAT10 = 102,
  125. MX6Q_PAD_DISP0_DAT11 = 103,
  126. MX6Q_PAD_DISP0_DAT12 = 104,
  127. MX6Q_PAD_DISP0_DAT13 = 105,
  128. MX6Q_PAD_DISP0_DAT14 = 106,
  129. MX6Q_PAD_DISP0_DAT15 = 107,
  130. MX6Q_PAD_DISP0_DAT16 = 108,
  131. MX6Q_PAD_DISP0_DAT17 = 109,
  132. MX6Q_PAD_DISP0_DAT18 = 110,
  133. MX6Q_PAD_DISP0_DAT19 = 111,
  134. MX6Q_PAD_DISP0_DAT20 = 112,
  135. MX6Q_PAD_DISP0_DAT21 = 113,
  136. MX6Q_PAD_DISP0_DAT22 = 114,
  137. MX6Q_PAD_DISP0_DAT23 = 115,
  138. MX6Q_PAD_ENET_MDIO = 116,
  139. MX6Q_PAD_ENET_REF_CLK = 117,
  140. MX6Q_PAD_ENET_RX_ER = 118,
  141. MX6Q_PAD_ENET_CRS_DV = 119,
  142. MX6Q_PAD_ENET_RXD1 = 120,
  143. MX6Q_PAD_ENET_RXD0 = 121,
  144. MX6Q_PAD_ENET_TX_EN = 122,
  145. MX6Q_PAD_ENET_TXD1 = 123,
  146. MX6Q_PAD_ENET_TXD0 = 124,
  147. MX6Q_PAD_ENET_MDC = 125,
  148. MX6Q_PAD_KEY_COL0 = 126,
  149. MX6Q_PAD_KEY_ROW0 = 127,
  150. MX6Q_PAD_KEY_COL1 = 128,
  151. MX6Q_PAD_KEY_ROW1 = 129,
  152. MX6Q_PAD_KEY_COL2 = 130,
  153. MX6Q_PAD_KEY_ROW2 = 131,
  154. MX6Q_PAD_KEY_COL3 = 132,
  155. MX6Q_PAD_KEY_ROW3 = 133,
  156. MX6Q_PAD_KEY_COL4 = 134,
  157. MX6Q_PAD_KEY_ROW4 = 135,
  158. MX6Q_PAD_GPIO_0 = 136,
  159. MX6Q_PAD_GPIO_1 = 137,
  160. MX6Q_PAD_GPIO_9 = 138,
  161. MX6Q_PAD_GPIO_3 = 139,
  162. MX6Q_PAD_GPIO_6 = 140,
  163. MX6Q_PAD_GPIO_2 = 141,
  164. MX6Q_PAD_GPIO_4 = 142,
  165. MX6Q_PAD_GPIO_5 = 143,
  166. MX6Q_PAD_GPIO_7 = 144,
  167. MX6Q_PAD_GPIO_8 = 145,
  168. MX6Q_PAD_GPIO_16 = 146,
  169. MX6Q_PAD_GPIO_17 = 147,
  170. MX6Q_PAD_GPIO_18 = 148,
  171. MX6Q_PAD_GPIO_19 = 149,
  172. MX6Q_PAD_CSI0_PIXCLK = 150,
  173. MX6Q_PAD_CSI0_MCLK = 151,
  174. MX6Q_PAD_CSI0_DATA_EN = 152,
  175. MX6Q_PAD_CSI0_VSYNC = 153,
  176. MX6Q_PAD_CSI0_DAT4 = 154,
  177. MX6Q_PAD_CSI0_DAT5 = 155,
  178. MX6Q_PAD_CSI0_DAT6 = 156,
  179. MX6Q_PAD_CSI0_DAT7 = 157,
  180. MX6Q_PAD_CSI0_DAT8 = 158,
  181. MX6Q_PAD_CSI0_DAT9 = 159,
  182. MX6Q_PAD_CSI0_DAT10 = 160,
  183. MX6Q_PAD_CSI0_DAT11 = 161,
  184. MX6Q_PAD_CSI0_DAT12 = 162,
  185. MX6Q_PAD_CSI0_DAT13 = 163,
  186. MX6Q_PAD_CSI0_DAT14 = 164,
  187. MX6Q_PAD_CSI0_DAT15 = 165,
  188. MX6Q_PAD_CSI0_DAT16 = 166,
  189. MX6Q_PAD_CSI0_DAT17 = 167,
  190. MX6Q_PAD_CSI0_DAT18 = 168,
  191. MX6Q_PAD_CSI0_DAT19 = 169,
  192. MX6Q_PAD_SD3_DAT7 = 170,
  193. MX6Q_PAD_SD3_DAT6 = 171,
  194. MX6Q_PAD_SD3_DAT5 = 172,
  195. MX6Q_PAD_SD3_DAT4 = 173,
  196. MX6Q_PAD_SD3_CMD = 174,
  197. MX6Q_PAD_SD3_CLK = 175,
  198. MX6Q_PAD_SD3_DAT0 = 176,
  199. MX6Q_PAD_SD3_DAT1 = 177,
  200. MX6Q_PAD_SD3_DAT2 = 178,
  201. MX6Q_PAD_SD3_DAT3 = 179,
  202. MX6Q_PAD_SD3_RST = 180,
  203. MX6Q_PAD_NANDF_CLE = 181,
  204. MX6Q_PAD_NANDF_ALE = 182,
  205. MX6Q_PAD_NANDF_WP_B = 183,
  206. MX6Q_PAD_NANDF_RB0 = 184,
  207. MX6Q_PAD_NANDF_CS0 = 185,
  208. MX6Q_PAD_NANDF_CS1 = 186,
  209. MX6Q_PAD_NANDF_CS2 = 187,
  210. MX6Q_PAD_NANDF_CS3 = 188,
  211. MX6Q_PAD_SD4_CMD = 189,
  212. MX6Q_PAD_SD4_CLK = 190,
  213. MX6Q_PAD_NANDF_D0 = 191,
  214. MX6Q_PAD_NANDF_D1 = 192,
  215. MX6Q_PAD_NANDF_D2 = 193,
  216. MX6Q_PAD_NANDF_D3 = 194,
  217. MX6Q_PAD_NANDF_D4 = 195,
  218. MX6Q_PAD_NANDF_D5 = 196,
  219. MX6Q_PAD_NANDF_D6 = 197,
  220. MX6Q_PAD_NANDF_D7 = 198,
  221. MX6Q_PAD_SD4_DAT0 = 199,
  222. MX6Q_PAD_SD4_DAT1 = 200,
  223. MX6Q_PAD_SD4_DAT2 = 201,
  224. MX6Q_PAD_SD4_DAT3 = 202,
  225. MX6Q_PAD_SD4_DAT4 = 203,
  226. MX6Q_PAD_SD4_DAT5 = 204,
  227. MX6Q_PAD_SD4_DAT6 = 205,
  228. MX6Q_PAD_SD4_DAT7 = 206,
  229. MX6Q_PAD_SD1_DAT1 = 207,
  230. MX6Q_PAD_SD1_DAT0 = 208,
  231. MX6Q_PAD_SD1_DAT3 = 209,
  232. MX6Q_PAD_SD1_CMD = 210,
  233. MX6Q_PAD_SD1_DAT2 = 211,
  234. MX6Q_PAD_SD1_CLK = 212,
  235. MX6Q_PAD_SD2_CLK = 213,
  236. MX6Q_PAD_SD2_CMD = 214,
  237. MX6Q_PAD_SD2_DAT3 = 215,
  238. };
  239. /* Pad names for the pinmux subsystem */
  240. static const struct pinctrl_pin_desc imx6q_pinctrl_pads[] = {
  241. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE0),
  242. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE1),
  243. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE2),
  244. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE3),
  245. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE4),
  246. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE5),
  247. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE6),
  248. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE7),
  249. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE8),
  250. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE9),
  251. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE10),
  252. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE11),
  253. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE12),
  254. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE13),
  255. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE14),
  256. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE15),
  257. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE16),
  258. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE17),
  259. IMX_PINCTRL_PIN(MX6Q_PAD_RESERVE18),
  260. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT1),
  261. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT2),
  262. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT0),
  263. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TXC),
  264. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TD0),
  265. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TD1),
  266. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TD2),
  267. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TD3),
  268. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RX_CTL),
  269. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RD0),
  270. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_TX_CTL),
  271. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RD1),
  272. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RD2),
  273. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RD3),
  274. IMX_PINCTRL_PIN(MX6Q_PAD_RGMII_RXC),
  275. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A25),
  276. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_EB2),
  277. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D16),
  278. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D17),
  279. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D18),
  280. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D19),
  281. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D20),
  282. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D21),
  283. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D22),
  284. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D23),
  285. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_EB3),
  286. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D24),
  287. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D25),
  288. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D26),
  289. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D27),
  290. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D28),
  291. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D29),
  292. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D30),
  293. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_D31),
  294. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A24),
  295. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A23),
  296. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A22),
  297. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A21),
  298. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A20),
  299. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A19),
  300. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A18),
  301. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A17),
  302. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_A16),
  303. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_CS0),
  304. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_CS1),
  305. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_OE),
  306. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_RW),
  307. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_LBA),
  308. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_EB0),
  309. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_EB1),
  310. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA0),
  311. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA1),
  312. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA2),
  313. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA3),
  314. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA4),
  315. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA5),
  316. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA6),
  317. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA7),
  318. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA8),
  319. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA9),
  320. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA10),
  321. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA11),
  322. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA12),
  323. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA13),
  324. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA14),
  325. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_DA15),
  326. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_WAIT),
  327. IMX_PINCTRL_PIN(MX6Q_PAD_EIM_BCLK),
  328. IMX_PINCTRL_PIN(MX6Q_PAD_DI0_DISP_CLK),
  329. IMX_PINCTRL_PIN(MX6Q_PAD_DI0_PIN15),
  330. IMX_PINCTRL_PIN(MX6Q_PAD_DI0_PIN2),
  331. IMX_PINCTRL_PIN(MX6Q_PAD_DI0_PIN3),
  332. IMX_PINCTRL_PIN(MX6Q_PAD_DI0_PIN4),
  333. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT0),
  334. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT1),
  335. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT2),
  336. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT3),
  337. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT4),
  338. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT5),
  339. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT6),
  340. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT7),
  341. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT8),
  342. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT9),
  343. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT10),
  344. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT11),
  345. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT12),
  346. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT13),
  347. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT14),
  348. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT15),
  349. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT16),
  350. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT17),
  351. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT18),
  352. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT19),
  353. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT20),
  354. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT21),
  355. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT22),
  356. IMX_PINCTRL_PIN(MX6Q_PAD_DISP0_DAT23),
  357. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_MDIO),
  358. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_REF_CLK),
  359. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_RX_ER),
  360. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_CRS_DV),
  361. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_RXD1),
  362. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_RXD0),
  363. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_TX_EN),
  364. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_TXD1),
  365. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_TXD0),
  366. IMX_PINCTRL_PIN(MX6Q_PAD_ENET_MDC),
  367. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_COL0),
  368. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_ROW0),
  369. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_COL1),
  370. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_ROW1),
  371. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_COL2),
  372. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_ROW2),
  373. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_COL3),
  374. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_ROW3),
  375. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_COL4),
  376. IMX_PINCTRL_PIN(MX6Q_PAD_KEY_ROW4),
  377. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_0),
  378. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_1),
  379. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_9),
  380. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_3),
  381. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_6),
  382. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_2),
  383. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_4),
  384. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_5),
  385. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_7),
  386. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_8),
  387. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_16),
  388. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_17),
  389. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_18),
  390. IMX_PINCTRL_PIN(MX6Q_PAD_GPIO_19),
  391. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_PIXCLK),
  392. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_MCLK),
  393. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DATA_EN),
  394. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_VSYNC),
  395. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT4),
  396. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT5),
  397. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT6),
  398. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT7),
  399. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT8),
  400. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT9),
  401. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT10),
  402. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT11),
  403. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT12),
  404. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT13),
  405. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT14),
  406. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT15),
  407. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT16),
  408. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT17),
  409. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT18),
  410. IMX_PINCTRL_PIN(MX6Q_PAD_CSI0_DAT19),
  411. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT7),
  412. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT6),
  413. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT5),
  414. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT4),
  415. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_CMD),
  416. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_CLK),
  417. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT0),
  418. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT1),
  419. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT2),
  420. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_DAT3),
  421. IMX_PINCTRL_PIN(MX6Q_PAD_SD3_RST),
  422. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_CLE),
  423. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_ALE),
  424. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_WP_B),
  425. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_RB0),
  426. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_CS0),
  427. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_CS1),
  428. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_CS2),
  429. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_CS3),
  430. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_CMD),
  431. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_CLK),
  432. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D0),
  433. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D1),
  434. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D2),
  435. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D3),
  436. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D4),
  437. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D5),
  438. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D6),
  439. IMX_PINCTRL_PIN(MX6Q_PAD_NANDF_D7),
  440. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT0),
  441. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT1),
  442. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT2),
  443. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT3),
  444. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT4),
  445. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT5),
  446. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT6),
  447. IMX_PINCTRL_PIN(MX6Q_PAD_SD4_DAT7),
  448. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_DAT1),
  449. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_DAT0),
  450. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_DAT3),
  451. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_CMD),
  452. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_DAT2),
  453. IMX_PINCTRL_PIN(MX6Q_PAD_SD1_CLK),
  454. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_CLK),
  455. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_CMD),
  456. IMX_PINCTRL_PIN(MX6Q_PAD_SD2_DAT3),
  457. };
  458. static struct imx_pinctrl_soc_info imx6q_pinctrl_info = {
  459. .pins = imx6q_pinctrl_pads,
  460. .npins = ARRAY_SIZE(imx6q_pinctrl_pads),
  461. .gpr_compatible = "fsl,imx6q-iomuxc-gpr",
  462. };
  463. static const struct of_device_id imx6q_pinctrl_of_match[] = {
  464. { .compatible = "fsl,imx6q-iomuxc", },
  465. { /* sentinel */ }
  466. };
  467. static int imx6q_pinctrl_probe(struct platform_device *pdev)
  468. {
  469. return imx_pinctrl_probe(pdev, &imx6q_pinctrl_info);
  470. }
  471. static struct platform_driver imx6q_pinctrl_driver = {
  472. .driver = {
  473. .name = "imx6q-pinctrl",
  474. .of_match_table = imx6q_pinctrl_of_match,
  475. },
  476. .probe = imx6q_pinctrl_probe,
  477. };
  478. static int __init imx6q_pinctrl_init(void)
  479. {
  480. return platform_driver_register(&imx6q_pinctrl_driver);
  481. }
  482. arch_initcall(imx6q_pinctrl_init);