pinctrl-imx6dl.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. /*
  2. * Copyright (C) 2013 Freescale Semiconductor, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/err.h>
  9. #include <linux/init.h>
  10. #include <linux/io.h>
  11. #include <linux/module.h>
  12. #include <linux/of.h>
  13. #include <linux/of_device.h>
  14. #include <linux/pinctrl/pinctrl.h>
  15. #include "pinctrl-imx.h"
  16. enum imx6dl_pads {
  17. MX6DL_PAD_RESERVE0 = 0,
  18. MX6DL_PAD_RESERVE1 = 1,
  19. MX6DL_PAD_RESERVE2 = 2,
  20. MX6DL_PAD_RESERVE3 = 3,
  21. MX6DL_PAD_RESERVE4 = 4,
  22. MX6DL_PAD_RESERVE5 = 5,
  23. MX6DL_PAD_RESERVE6 = 6,
  24. MX6DL_PAD_RESERVE7 = 7,
  25. MX6DL_PAD_RESERVE8 = 8,
  26. MX6DL_PAD_RESERVE9 = 9,
  27. MX6DL_PAD_RESERVE10 = 10,
  28. MX6DL_PAD_RESERVE11 = 11,
  29. MX6DL_PAD_RESERVE12 = 12,
  30. MX6DL_PAD_RESERVE13 = 13,
  31. MX6DL_PAD_RESERVE14 = 14,
  32. MX6DL_PAD_RESERVE15 = 15,
  33. MX6DL_PAD_RESERVE16 = 16,
  34. MX6DL_PAD_RESERVE17 = 17,
  35. MX6DL_PAD_RESERVE18 = 18,
  36. MX6DL_PAD_CSI0_DAT10 = 19,
  37. MX6DL_PAD_CSI0_DAT11 = 20,
  38. MX6DL_PAD_CSI0_DAT12 = 21,
  39. MX6DL_PAD_CSI0_DAT13 = 22,
  40. MX6DL_PAD_CSI0_DAT14 = 23,
  41. MX6DL_PAD_CSI0_DAT15 = 24,
  42. MX6DL_PAD_CSI0_DAT16 = 25,
  43. MX6DL_PAD_CSI0_DAT17 = 26,
  44. MX6DL_PAD_CSI0_DAT18 = 27,
  45. MX6DL_PAD_CSI0_DAT19 = 28,
  46. MX6DL_PAD_CSI0_DAT4 = 29,
  47. MX6DL_PAD_CSI0_DAT5 = 30,
  48. MX6DL_PAD_CSI0_DAT6 = 31,
  49. MX6DL_PAD_CSI0_DAT7 = 32,
  50. MX6DL_PAD_CSI0_DAT8 = 33,
  51. MX6DL_PAD_CSI0_DAT9 = 34,
  52. MX6DL_PAD_CSI0_DATA_EN = 35,
  53. MX6DL_PAD_CSI0_MCLK = 36,
  54. MX6DL_PAD_CSI0_PIXCLK = 37,
  55. MX6DL_PAD_CSI0_VSYNC = 38,
  56. MX6DL_PAD_DI0_DISP_CLK = 39,
  57. MX6DL_PAD_DI0_PIN15 = 40,
  58. MX6DL_PAD_DI0_PIN2 = 41,
  59. MX6DL_PAD_DI0_PIN3 = 42,
  60. MX6DL_PAD_DI0_PIN4 = 43,
  61. MX6DL_PAD_DISP0_DAT0 = 44,
  62. MX6DL_PAD_DISP0_DAT1 = 45,
  63. MX6DL_PAD_DISP0_DAT10 = 46,
  64. MX6DL_PAD_DISP0_DAT11 = 47,
  65. MX6DL_PAD_DISP0_DAT12 = 48,
  66. MX6DL_PAD_DISP0_DAT13 = 49,
  67. MX6DL_PAD_DISP0_DAT14 = 50,
  68. MX6DL_PAD_DISP0_DAT15 = 51,
  69. MX6DL_PAD_DISP0_DAT16 = 52,
  70. MX6DL_PAD_DISP0_DAT17 = 53,
  71. MX6DL_PAD_DISP0_DAT18 = 54,
  72. MX6DL_PAD_DISP0_DAT19 = 55,
  73. MX6DL_PAD_DISP0_DAT2 = 56,
  74. MX6DL_PAD_DISP0_DAT20 = 57,
  75. MX6DL_PAD_DISP0_DAT21 = 58,
  76. MX6DL_PAD_DISP0_DAT22 = 59,
  77. MX6DL_PAD_DISP0_DAT23 = 60,
  78. MX6DL_PAD_DISP0_DAT3 = 61,
  79. MX6DL_PAD_DISP0_DAT4 = 62,
  80. MX6DL_PAD_DISP0_DAT5 = 63,
  81. MX6DL_PAD_DISP0_DAT6 = 64,
  82. MX6DL_PAD_DISP0_DAT7 = 65,
  83. MX6DL_PAD_DISP0_DAT8 = 66,
  84. MX6DL_PAD_DISP0_DAT9 = 67,
  85. MX6DL_PAD_EIM_A16 = 68,
  86. MX6DL_PAD_EIM_A17 = 69,
  87. MX6DL_PAD_EIM_A18 = 70,
  88. MX6DL_PAD_EIM_A19 = 71,
  89. MX6DL_PAD_EIM_A20 = 72,
  90. MX6DL_PAD_EIM_A21 = 73,
  91. MX6DL_PAD_EIM_A22 = 74,
  92. MX6DL_PAD_EIM_A23 = 75,
  93. MX6DL_PAD_EIM_A24 = 76,
  94. MX6DL_PAD_EIM_A25 = 77,
  95. MX6DL_PAD_EIM_BCLK = 78,
  96. MX6DL_PAD_EIM_CS0 = 79,
  97. MX6DL_PAD_EIM_CS1 = 80,
  98. MX6DL_PAD_EIM_D16 = 81,
  99. MX6DL_PAD_EIM_D17 = 82,
  100. MX6DL_PAD_EIM_D18 = 83,
  101. MX6DL_PAD_EIM_D19 = 84,
  102. MX6DL_PAD_EIM_D20 = 85,
  103. MX6DL_PAD_EIM_D21 = 86,
  104. MX6DL_PAD_EIM_D22 = 87,
  105. MX6DL_PAD_EIM_D23 = 88,
  106. MX6DL_PAD_EIM_D24 = 89,
  107. MX6DL_PAD_EIM_D25 = 90,
  108. MX6DL_PAD_EIM_D26 = 91,
  109. MX6DL_PAD_EIM_D27 = 92,
  110. MX6DL_PAD_EIM_D28 = 93,
  111. MX6DL_PAD_EIM_D29 = 94,
  112. MX6DL_PAD_EIM_D30 = 95,
  113. MX6DL_PAD_EIM_D31 = 96,
  114. MX6DL_PAD_EIM_DA0 = 97,
  115. MX6DL_PAD_EIM_DA1 = 98,
  116. MX6DL_PAD_EIM_DA10 = 99,
  117. MX6DL_PAD_EIM_DA11 = 100,
  118. MX6DL_PAD_EIM_DA12 = 101,
  119. MX6DL_PAD_EIM_DA13 = 102,
  120. MX6DL_PAD_EIM_DA14 = 103,
  121. MX6DL_PAD_EIM_DA15 = 104,
  122. MX6DL_PAD_EIM_DA2 = 105,
  123. MX6DL_PAD_EIM_DA3 = 106,
  124. MX6DL_PAD_EIM_DA4 = 107,
  125. MX6DL_PAD_EIM_DA5 = 108,
  126. MX6DL_PAD_EIM_DA6 = 109,
  127. MX6DL_PAD_EIM_DA7 = 110,
  128. MX6DL_PAD_EIM_DA8 = 111,
  129. MX6DL_PAD_EIM_DA9 = 112,
  130. MX6DL_PAD_EIM_EB0 = 113,
  131. MX6DL_PAD_EIM_EB1 = 114,
  132. MX6DL_PAD_EIM_EB2 = 115,
  133. MX6DL_PAD_EIM_EB3 = 116,
  134. MX6DL_PAD_EIM_LBA = 117,
  135. MX6DL_PAD_EIM_OE = 118,
  136. MX6DL_PAD_EIM_RW = 119,
  137. MX6DL_PAD_EIM_WAIT = 120,
  138. MX6DL_PAD_ENET_CRS_DV = 121,
  139. MX6DL_PAD_ENET_MDC = 122,
  140. MX6DL_PAD_ENET_MDIO = 123,
  141. MX6DL_PAD_ENET_REF_CLK = 124,
  142. MX6DL_PAD_ENET_RX_ER = 125,
  143. MX6DL_PAD_ENET_RXD0 = 126,
  144. MX6DL_PAD_ENET_RXD1 = 127,
  145. MX6DL_PAD_ENET_TX_EN = 128,
  146. MX6DL_PAD_ENET_TXD0 = 129,
  147. MX6DL_PAD_ENET_TXD1 = 130,
  148. MX6DL_PAD_GPIO_0 = 131,
  149. MX6DL_PAD_GPIO_1 = 132,
  150. MX6DL_PAD_GPIO_16 = 133,
  151. MX6DL_PAD_GPIO_17 = 134,
  152. MX6DL_PAD_GPIO_18 = 135,
  153. MX6DL_PAD_GPIO_19 = 136,
  154. MX6DL_PAD_GPIO_2 = 137,
  155. MX6DL_PAD_GPIO_3 = 138,
  156. MX6DL_PAD_GPIO_4 = 139,
  157. MX6DL_PAD_GPIO_5 = 140,
  158. MX6DL_PAD_GPIO_6 = 141,
  159. MX6DL_PAD_GPIO_7 = 142,
  160. MX6DL_PAD_GPIO_8 = 143,
  161. MX6DL_PAD_GPIO_9 = 144,
  162. MX6DL_PAD_KEY_COL0 = 145,
  163. MX6DL_PAD_KEY_COL1 = 146,
  164. MX6DL_PAD_KEY_COL2 = 147,
  165. MX6DL_PAD_KEY_COL3 = 148,
  166. MX6DL_PAD_KEY_COL4 = 149,
  167. MX6DL_PAD_KEY_ROW0 = 150,
  168. MX6DL_PAD_KEY_ROW1 = 151,
  169. MX6DL_PAD_KEY_ROW2 = 152,
  170. MX6DL_PAD_KEY_ROW3 = 153,
  171. MX6DL_PAD_KEY_ROW4 = 154,
  172. MX6DL_PAD_NANDF_ALE = 155,
  173. MX6DL_PAD_NANDF_CLE = 156,
  174. MX6DL_PAD_NANDF_CS0 = 157,
  175. MX6DL_PAD_NANDF_CS1 = 158,
  176. MX6DL_PAD_NANDF_CS2 = 159,
  177. MX6DL_PAD_NANDF_CS3 = 160,
  178. MX6DL_PAD_NANDF_D0 = 161,
  179. MX6DL_PAD_NANDF_D1 = 162,
  180. MX6DL_PAD_NANDF_D2 = 163,
  181. MX6DL_PAD_NANDF_D3 = 164,
  182. MX6DL_PAD_NANDF_D4 = 165,
  183. MX6DL_PAD_NANDF_D5 = 166,
  184. MX6DL_PAD_NANDF_D6 = 167,
  185. MX6DL_PAD_NANDF_D7 = 168,
  186. MX6DL_PAD_NANDF_RB0 = 169,
  187. MX6DL_PAD_NANDF_WP_B = 170,
  188. MX6DL_PAD_RGMII_RD0 = 171,
  189. MX6DL_PAD_RGMII_RD1 = 172,
  190. MX6DL_PAD_RGMII_RD2 = 173,
  191. MX6DL_PAD_RGMII_RD3 = 174,
  192. MX6DL_PAD_RGMII_RX_CTL = 175,
  193. MX6DL_PAD_RGMII_RXC = 176,
  194. MX6DL_PAD_RGMII_TD0 = 177,
  195. MX6DL_PAD_RGMII_TD1 = 178,
  196. MX6DL_PAD_RGMII_TD2 = 179,
  197. MX6DL_PAD_RGMII_TD3 = 180,
  198. MX6DL_PAD_RGMII_TX_CTL = 181,
  199. MX6DL_PAD_RGMII_TXC = 182,
  200. MX6DL_PAD_SD1_CLK = 183,
  201. MX6DL_PAD_SD1_CMD = 184,
  202. MX6DL_PAD_SD1_DAT0 = 185,
  203. MX6DL_PAD_SD1_DAT1 = 186,
  204. MX6DL_PAD_SD1_DAT2 = 187,
  205. MX6DL_PAD_SD1_DAT3 = 188,
  206. MX6DL_PAD_SD2_CLK = 189,
  207. MX6DL_PAD_SD2_CMD = 190,
  208. MX6DL_PAD_SD2_DAT0 = 191,
  209. MX6DL_PAD_SD2_DAT1 = 192,
  210. MX6DL_PAD_SD2_DAT2 = 193,
  211. MX6DL_PAD_SD2_DAT3 = 194,
  212. MX6DL_PAD_SD3_CLK = 195,
  213. MX6DL_PAD_SD3_CMD = 196,
  214. MX6DL_PAD_SD3_DAT0 = 197,
  215. MX6DL_PAD_SD3_DAT1 = 198,
  216. MX6DL_PAD_SD3_DAT2 = 199,
  217. MX6DL_PAD_SD3_DAT3 = 200,
  218. MX6DL_PAD_SD3_DAT4 = 201,
  219. MX6DL_PAD_SD3_DAT5 = 202,
  220. MX6DL_PAD_SD3_DAT6 = 203,
  221. MX6DL_PAD_SD3_DAT7 = 204,
  222. MX6DL_PAD_SD3_RST = 205,
  223. MX6DL_PAD_SD4_CLK = 206,
  224. MX6DL_PAD_SD4_CMD = 207,
  225. MX6DL_PAD_SD4_DAT0 = 208,
  226. MX6DL_PAD_SD4_DAT1 = 209,
  227. MX6DL_PAD_SD4_DAT2 = 210,
  228. MX6DL_PAD_SD4_DAT3 = 211,
  229. MX6DL_PAD_SD4_DAT4 = 212,
  230. MX6DL_PAD_SD4_DAT5 = 213,
  231. MX6DL_PAD_SD4_DAT6 = 214,
  232. MX6DL_PAD_SD4_DAT7 = 215,
  233. };
  234. /* Pad names for the pinmux subsystem */
  235. static const struct pinctrl_pin_desc imx6dl_pinctrl_pads[] = {
  236. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE0),
  237. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE1),
  238. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE2),
  239. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE3),
  240. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE4),
  241. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE5),
  242. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE6),
  243. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE7),
  244. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE8),
  245. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE9),
  246. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE10),
  247. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE11),
  248. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE12),
  249. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE13),
  250. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE14),
  251. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE15),
  252. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE16),
  253. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE17),
  254. IMX_PINCTRL_PIN(MX6DL_PAD_RESERVE18),
  255. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT10),
  256. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT11),
  257. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT12),
  258. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT13),
  259. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT14),
  260. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT15),
  261. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT16),
  262. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT17),
  263. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT18),
  264. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT19),
  265. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT4),
  266. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT5),
  267. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT6),
  268. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT7),
  269. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT8),
  270. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DAT9),
  271. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_DATA_EN),
  272. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_MCLK),
  273. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_PIXCLK),
  274. IMX_PINCTRL_PIN(MX6DL_PAD_CSI0_VSYNC),
  275. IMX_PINCTRL_PIN(MX6DL_PAD_DI0_DISP_CLK),
  276. IMX_PINCTRL_PIN(MX6DL_PAD_DI0_PIN15),
  277. IMX_PINCTRL_PIN(MX6DL_PAD_DI0_PIN2),
  278. IMX_PINCTRL_PIN(MX6DL_PAD_DI0_PIN3),
  279. IMX_PINCTRL_PIN(MX6DL_PAD_DI0_PIN4),
  280. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT0),
  281. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT1),
  282. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT10),
  283. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT11),
  284. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT12),
  285. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT13),
  286. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT14),
  287. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT15),
  288. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT16),
  289. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT17),
  290. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT18),
  291. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT19),
  292. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT2),
  293. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT20),
  294. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT21),
  295. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT22),
  296. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT23),
  297. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT3),
  298. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT4),
  299. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT5),
  300. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT6),
  301. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT7),
  302. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT8),
  303. IMX_PINCTRL_PIN(MX6DL_PAD_DISP0_DAT9),
  304. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A16),
  305. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A17),
  306. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A18),
  307. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A19),
  308. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A20),
  309. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A21),
  310. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A22),
  311. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A23),
  312. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A24),
  313. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_A25),
  314. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_BCLK),
  315. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_CS0),
  316. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_CS1),
  317. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D16),
  318. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D17),
  319. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D18),
  320. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D19),
  321. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D20),
  322. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D21),
  323. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D22),
  324. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D23),
  325. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D24),
  326. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D25),
  327. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D26),
  328. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D27),
  329. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D28),
  330. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D29),
  331. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D30),
  332. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_D31),
  333. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA0),
  334. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA1),
  335. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA10),
  336. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA11),
  337. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA12),
  338. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA13),
  339. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA14),
  340. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA15),
  341. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA2),
  342. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA3),
  343. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA4),
  344. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA5),
  345. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA6),
  346. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA7),
  347. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA8),
  348. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_DA9),
  349. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_EB0),
  350. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_EB1),
  351. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_EB2),
  352. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_EB3),
  353. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_LBA),
  354. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_OE),
  355. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_RW),
  356. IMX_PINCTRL_PIN(MX6DL_PAD_EIM_WAIT),
  357. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_CRS_DV),
  358. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_MDC),
  359. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_MDIO),
  360. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_REF_CLK),
  361. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_RX_ER),
  362. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_RXD0),
  363. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_RXD1),
  364. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_TX_EN),
  365. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_TXD0),
  366. IMX_PINCTRL_PIN(MX6DL_PAD_ENET_TXD1),
  367. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_0),
  368. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_1),
  369. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_16),
  370. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_17),
  371. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_18),
  372. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_19),
  373. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_2),
  374. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_3),
  375. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_4),
  376. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_5),
  377. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_6),
  378. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_7),
  379. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_8),
  380. IMX_PINCTRL_PIN(MX6DL_PAD_GPIO_9),
  381. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_COL0),
  382. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_COL1),
  383. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_COL2),
  384. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_COL3),
  385. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_COL4),
  386. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_ROW0),
  387. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_ROW1),
  388. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_ROW2),
  389. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_ROW3),
  390. IMX_PINCTRL_PIN(MX6DL_PAD_KEY_ROW4),
  391. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_ALE),
  392. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_CLE),
  393. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_CS0),
  394. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_CS1),
  395. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_CS2),
  396. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_CS3),
  397. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D0),
  398. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D1),
  399. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D2),
  400. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D3),
  401. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D4),
  402. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D5),
  403. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D6),
  404. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_D7),
  405. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_RB0),
  406. IMX_PINCTRL_PIN(MX6DL_PAD_NANDF_WP_B),
  407. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RD0),
  408. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RD1),
  409. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RD2),
  410. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RD3),
  411. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RX_CTL),
  412. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_RXC),
  413. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TD0),
  414. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TD1),
  415. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TD2),
  416. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TD3),
  417. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TX_CTL),
  418. IMX_PINCTRL_PIN(MX6DL_PAD_RGMII_TXC),
  419. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_CLK),
  420. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_CMD),
  421. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_DAT0),
  422. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_DAT1),
  423. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_DAT2),
  424. IMX_PINCTRL_PIN(MX6DL_PAD_SD1_DAT3),
  425. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_CLK),
  426. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_CMD),
  427. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_DAT0),
  428. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_DAT1),
  429. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_DAT2),
  430. IMX_PINCTRL_PIN(MX6DL_PAD_SD2_DAT3),
  431. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_CLK),
  432. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_CMD),
  433. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT0),
  434. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT1),
  435. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT2),
  436. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT3),
  437. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT4),
  438. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT5),
  439. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT6),
  440. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_DAT7),
  441. IMX_PINCTRL_PIN(MX6DL_PAD_SD3_RST),
  442. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_CLK),
  443. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_CMD),
  444. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT0),
  445. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT1),
  446. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT2),
  447. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT3),
  448. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT4),
  449. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT5),
  450. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT6),
  451. IMX_PINCTRL_PIN(MX6DL_PAD_SD4_DAT7),
  452. };
  453. static struct imx_pinctrl_soc_info imx6dl_pinctrl_info = {
  454. .pins = imx6dl_pinctrl_pads,
  455. .npins = ARRAY_SIZE(imx6dl_pinctrl_pads),
  456. };
  457. static const struct of_device_id imx6dl_pinctrl_of_match[] = {
  458. { .compatible = "fsl,imx6dl-iomuxc", },
  459. { /* sentinel */ }
  460. };
  461. static int imx6dl_pinctrl_probe(struct platform_device *pdev)
  462. {
  463. return imx_pinctrl_probe(pdev, &imx6dl_pinctrl_info);
  464. }
  465. static struct platform_driver imx6dl_pinctrl_driver = {
  466. .driver = {
  467. .name = "imx6dl-pinctrl",
  468. .of_match_table = imx6dl_pinctrl_of_match,
  469. },
  470. .probe = imx6dl_pinctrl_probe,
  471. .remove = imx_pinctrl_remove,
  472. };
  473. static int __init imx6dl_pinctrl_init(void)
  474. {
  475. return platform_driver_register(&imx6dl_pinctrl_driver);
  476. }
  477. arch_initcall(imx6dl_pinctrl_init);
  478. static void __exit imx6dl_pinctrl_exit(void)
  479. {
  480. platform_driver_unregister(&imx6dl_pinctrl_driver);
  481. }
  482. module_exit(imx6dl_pinctrl_exit);
  483. MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
  484. MODULE_DESCRIPTION("Freescale imx6dl pinctrl driver");
  485. MODULE_LICENSE("GPL v2");