pinctrl-imx53.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. /*
  2. * imx53 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/module.h>
  18. #include <linux/of.h>
  19. #include <linux/of_device.h>
  20. #include <linux/pinctrl/pinctrl.h>
  21. #include "pinctrl-imx.h"
  22. enum imx53_pads {
  23. MX53_PAD_RESERVE0 = 0,
  24. MX53_PAD_RESERVE1 = 1,
  25. MX53_PAD_RESERVE2 = 2,
  26. MX53_PAD_RESERVE3 = 3,
  27. MX53_PAD_RESERVE4 = 4,
  28. MX53_PAD_RESERVE5 = 5,
  29. MX53_PAD_RESERVE6 = 6,
  30. MX53_PAD_RESERVE7 = 7,
  31. MX53_PAD_GPIO_19 = 8,
  32. MX53_PAD_KEY_COL0 = 9,
  33. MX53_PAD_KEY_ROW0 = 10,
  34. MX53_PAD_KEY_COL1 = 11,
  35. MX53_PAD_KEY_ROW1 = 12,
  36. MX53_PAD_KEY_COL2 = 13,
  37. MX53_PAD_KEY_ROW2 = 14,
  38. MX53_PAD_KEY_COL3 = 15,
  39. MX53_PAD_KEY_ROW3 = 16,
  40. MX53_PAD_KEY_COL4 = 17,
  41. MX53_PAD_KEY_ROW4 = 18,
  42. MX53_PAD_DI0_DISP_CLK = 19,
  43. MX53_PAD_DI0_PIN15 = 20,
  44. MX53_PAD_DI0_PIN2 = 21,
  45. MX53_PAD_DI0_PIN3 = 22,
  46. MX53_PAD_DI0_PIN4 = 23,
  47. MX53_PAD_DISP0_DAT0 = 24,
  48. MX53_PAD_DISP0_DAT1 = 25,
  49. MX53_PAD_DISP0_DAT2 = 26,
  50. MX53_PAD_DISP0_DAT3 = 27,
  51. MX53_PAD_DISP0_DAT4 = 28,
  52. MX53_PAD_DISP0_DAT5 = 29,
  53. MX53_PAD_DISP0_DAT6 = 30,
  54. MX53_PAD_DISP0_DAT7 = 31,
  55. MX53_PAD_DISP0_DAT8 = 32,
  56. MX53_PAD_DISP0_DAT9 = 33,
  57. MX53_PAD_DISP0_DAT10 = 34,
  58. MX53_PAD_DISP0_DAT11 = 35,
  59. MX53_PAD_DISP0_DAT12 = 36,
  60. MX53_PAD_DISP0_DAT13 = 37,
  61. MX53_PAD_DISP0_DAT14 = 38,
  62. MX53_PAD_DISP0_DAT15 = 39,
  63. MX53_PAD_DISP0_DAT16 = 40,
  64. MX53_PAD_DISP0_DAT17 = 41,
  65. MX53_PAD_DISP0_DAT18 = 42,
  66. MX53_PAD_DISP0_DAT19 = 43,
  67. MX53_PAD_DISP0_DAT20 = 44,
  68. MX53_PAD_DISP0_DAT21 = 45,
  69. MX53_PAD_DISP0_DAT22 = 46,
  70. MX53_PAD_DISP0_DAT23 = 47,
  71. MX53_PAD_CSI0_PIXCLK = 48,
  72. MX53_PAD_CSI0_MCLK = 49,
  73. MX53_PAD_CSI0_DATA_EN = 50,
  74. MX53_PAD_CSI0_VSYNC = 51,
  75. MX53_PAD_CSI0_DAT4 = 52,
  76. MX53_PAD_CSI0_DAT5 = 53,
  77. MX53_PAD_CSI0_DAT6 = 54,
  78. MX53_PAD_CSI0_DAT7 = 55,
  79. MX53_PAD_CSI0_DAT8 = 56,
  80. MX53_PAD_CSI0_DAT9 = 57,
  81. MX53_PAD_CSI0_DAT10 = 58,
  82. MX53_PAD_CSI0_DAT11 = 59,
  83. MX53_PAD_CSI0_DAT12 = 60,
  84. MX53_PAD_CSI0_DAT13 = 61,
  85. MX53_PAD_CSI0_DAT14 = 62,
  86. MX53_PAD_CSI0_DAT15 = 63,
  87. MX53_PAD_CSI0_DAT16 = 64,
  88. MX53_PAD_CSI0_DAT17 = 65,
  89. MX53_PAD_CSI0_DAT18 = 66,
  90. MX53_PAD_CSI0_DAT19 = 67,
  91. MX53_PAD_EIM_A25 = 68,
  92. MX53_PAD_EIM_EB2 = 69,
  93. MX53_PAD_EIM_D16 = 70,
  94. MX53_PAD_EIM_D17 = 71,
  95. MX53_PAD_EIM_D18 = 72,
  96. MX53_PAD_EIM_D19 = 73,
  97. MX53_PAD_EIM_D20 = 74,
  98. MX53_PAD_EIM_D21 = 75,
  99. MX53_PAD_EIM_D22 = 76,
  100. MX53_PAD_EIM_D23 = 77,
  101. MX53_PAD_EIM_EB3 = 78,
  102. MX53_PAD_EIM_D24 = 79,
  103. MX53_PAD_EIM_D25 = 80,
  104. MX53_PAD_EIM_D26 = 81,
  105. MX53_PAD_EIM_D27 = 82,
  106. MX53_PAD_EIM_D28 = 83,
  107. MX53_PAD_EIM_D29 = 84,
  108. MX53_PAD_EIM_D30 = 85,
  109. MX53_PAD_EIM_D31 = 86,
  110. MX53_PAD_EIM_A24 = 87,
  111. MX53_PAD_EIM_A23 = 88,
  112. MX53_PAD_EIM_A22 = 89,
  113. MX53_PAD_EIM_A21 = 90,
  114. MX53_PAD_EIM_A20 = 91,
  115. MX53_PAD_EIM_A19 = 92,
  116. MX53_PAD_EIM_A18 = 93,
  117. MX53_PAD_EIM_A17 = 94,
  118. MX53_PAD_EIM_A16 = 95,
  119. MX53_PAD_EIM_CS0 = 96,
  120. MX53_PAD_EIM_CS1 = 97,
  121. MX53_PAD_EIM_OE = 98,
  122. MX53_PAD_EIM_RW = 99,
  123. MX53_PAD_EIM_LBA = 100,
  124. MX53_PAD_EIM_EB0 = 101,
  125. MX53_PAD_EIM_EB1 = 102,
  126. MX53_PAD_EIM_DA0 = 103,
  127. MX53_PAD_EIM_DA1 = 104,
  128. MX53_PAD_EIM_DA2 = 105,
  129. MX53_PAD_EIM_DA3 = 106,
  130. MX53_PAD_EIM_DA4 = 107,
  131. MX53_PAD_EIM_DA5 = 108,
  132. MX53_PAD_EIM_DA6 = 109,
  133. MX53_PAD_EIM_DA7 = 110,
  134. MX53_PAD_EIM_DA8 = 111,
  135. MX53_PAD_EIM_DA9 = 112,
  136. MX53_PAD_EIM_DA10 = 113,
  137. MX53_PAD_EIM_DA11 = 114,
  138. MX53_PAD_EIM_DA12 = 115,
  139. MX53_PAD_EIM_DA13 = 116,
  140. MX53_PAD_EIM_DA14 = 117,
  141. MX53_PAD_EIM_DA15 = 118,
  142. MX53_PAD_NANDF_WE_B = 119,
  143. MX53_PAD_NANDF_RE_B = 120,
  144. MX53_PAD_EIM_WAIT = 121,
  145. MX53_PAD_RESERVE8 = 122,
  146. MX53_PAD_LVDS1_TX3_P = 123,
  147. MX53_PAD_LVDS1_TX2_P = 124,
  148. MX53_PAD_LVDS1_CLK_P = 125,
  149. MX53_PAD_LVDS1_TX1_P = 126,
  150. MX53_PAD_LVDS1_TX0_P = 127,
  151. MX53_PAD_LVDS0_TX3_P = 128,
  152. MX53_PAD_LVDS0_CLK_P = 129,
  153. MX53_PAD_LVDS0_TX2_P = 130,
  154. MX53_PAD_LVDS0_TX1_P = 131,
  155. MX53_PAD_LVDS0_TX0_P = 132,
  156. MX53_PAD_GPIO_10 = 133,
  157. MX53_PAD_GPIO_11 = 134,
  158. MX53_PAD_GPIO_12 = 135,
  159. MX53_PAD_GPIO_13 = 136,
  160. MX53_PAD_GPIO_14 = 137,
  161. MX53_PAD_NANDF_CLE = 138,
  162. MX53_PAD_NANDF_ALE = 139,
  163. MX53_PAD_NANDF_WP_B = 140,
  164. MX53_PAD_NANDF_RB0 = 141,
  165. MX53_PAD_NANDF_CS0 = 142,
  166. MX53_PAD_NANDF_CS1 = 143,
  167. MX53_PAD_NANDF_CS2 = 144,
  168. MX53_PAD_NANDF_CS3 = 145,
  169. MX53_PAD_FEC_MDIO = 146,
  170. MX53_PAD_FEC_REF_CLK = 147,
  171. MX53_PAD_FEC_RX_ER = 148,
  172. MX53_PAD_FEC_CRS_DV = 149,
  173. MX53_PAD_FEC_RXD1 = 150,
  174. MX53_PAD_FEC_RXD0 = 151,
  175. MX53_PAD_FEC_TX_EN = 152,
  176. MX53_PAD_FEC_TXD1 = 153,
  177. MX53_PAD_FEC_TXD0 = 154,
  178. MX53_PAD_FEC_MDC = 155,
  179. MX53_PAD_PATA_DIOW = 156,
  180. MX53_PAD_PATA_DMACK = 157,
  181. MX53_PAD_PATA_DMARQ = 158,
  182. MX53_PAD_PATA_BUFFER_EN = 159,
  183. MX53_PAD_PATA_INTRQ = 160,
  184. MX53_PAD_PATA_DIOR = 161,
  185. MX53_PAD_PATA_RESET_B = 162,
  186. MX53_PAD_PATA_IORDY = 163,
  187. MX53_PAD_PATA_DA_0 = 164,
  188. MX53_PAD_PATA_DA_1 = 165,
  189. MX53_PAD_PATA_DA_2 = 166,
  190. MX53_PAD_PATA_CS_0 = 167,
  191. MX53_PAD_PATA_CS_1 = 168,
  192. MX53_PAD_PATA_DATA0 = 169,
  193. MX53_PAD_PATA_DATA1 = 170,
  194. MX53_PAD_PATA_DATA2 = 171,
  195. MX53_PAD_PATA_DATA3 = 172,
  196. MX53_PAD_PATA_DATA4 = 173,
  197. MX53_PAD_PATA_DATA5 = 174,
  198. MX53_PAD_PATA_DATA6 = 175,
  199. MX53_PAD_PATA_DATA7 = 176,
  200. MX53_PAD_PATA_DATA8 = 177,
  201. MX53_PAD_PATA_DATA9 = 178,
  202. MX53_PAD_PATA_DATA10 = 179,
  203. MX53_PAD_PATA_DATA11 = 180,
  204. MX53_PAD_PATA_DATA12 = 181,
  205. MX53_PAD_PATA_DATA13 = 182,
  206. MX53_PAD_PATA_DATA14 = 183,
  207. MX53_PAD_PATA_DATA15 = 184,
  208. MX53_PAD_SD1_DATA0 = 185,
  209. MX53_PAD_SD1_DATA1 = 186,
  210. MX53_PAD_SD1_CMD = 187,
  211. MX53_PAD_SD1_DATA2 = 188,
  212. MX53_PAD_SD1_CLK = 189,
  213. MX53_PAD_SD1_DATA3 = 190,
  214. MX53_PAD_SD2_CLK = 191,
  215. MX53_PAD_SD2_CMD = 192,
  216. MX53_PAD_SD2_DATA3 = 193,
  217. MX53_PAD_SD2_DATA2 = 194,
  218. MX53_PAD_SD2_DATA1 = 195,
  219. MX53_PAD_SD2_DATA0 = 196,
  220. MX53_PAD_GPIO_0 = 197,
  221. MX53_PAD_GPIO_1 = 198,
  222. MX53_PAD_GPIO_9 = 199,
  223. MX53_PAD_GPIO_3 = 200,
  224. MX53_PAD_GPIO_6 = 201,
  225. MX53_PAD_GPIO_2 = 202,
  226. MX53_PAD_GPIO_4 = 203,
  227. MX53_PAD_GPIO_5 = 204,
  228. MX53_PAD_GPIO_7 = 205,
  229. MX53_PAD_GPIO_8 = 206,
  230. MX53_PAD_GPIO_16 = 207,
  231. MX53_PAD_GPIO_17 = 208,
  232. MX53_PAD_GPIO_18 = 209,
  233. };
  234. /* Pad names for the pinmux subsystem */
  235. static const struct pinctrl_pin_desc imx53_pinctrl_pads[] = {
  236. IMX_PINCTRL_PIN(MX53_PAD_RESERVE0),
  237. IMX_PINCTRL_PIN(MX53_PAD_RESERVE1),
  238. IMX_PINCTRL_PIN(MX53_PAD_RESERVE2),
  239. IMX_PINCTRL_PIN(MX53_PAD_RESERVE3),
  240. IMX_PINCTRL_PIN(MX53_PAD_RESERVE4),
  241. IMX_PINCTRL_PIN(MX53_PAD_RESERVE5),
  242. IMX_PINCTRL_PIN(MX53_PAD_RESERVE6),
  243. IMX_PINCTRL_PIN(MX53_PAD_RESERVE7),
  244. IMX_PINCTRL_PIN(MX53_PAD_GPIO_19),
  245. IMX_PINCTRL_PIN(MX53_PAD_KEY_COL0),
  246. IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW0),
  247. IMX_PINCTRL_PIN(MX53_PAD_KEY_COL1),
  248. IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW1),
  249. IMX_PINCTRL_PIN(MX53_PAD_KEY_COL2),
  250. IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW2),
  251. IMX_PINCTRL_PIN(MX53_PAD_KEY_COL3),
  252. IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW3),
  253. IMX_PINCTRL_PIN(MX53_PAD_KEY_COL4),
  254. IMX_PINCTRL_PIN(MX53_PAD_KEY_ROW4),
  255. IMX_PINCTRL_PIN(MX53_PAD_DI0_DISP_CLK),
  256. IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN15),
  257. IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN2),
  258. IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN3),
  259. IMX_PINCTRL_PIN(MX53_PAD_DI0_PIN4),
  260. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT0),
  261. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT1),
  262. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT2),
  263. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT3),
  264. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT4),
  265. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT5),
  266. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT6),
  267. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT7),
  268. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT8),
  269. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT9),
  270. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT10),
  271. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT11),
  272. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT12),
  273. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT13),
  274. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT14),
  275. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT15),
  276. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT16),
  277. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT17),
  278. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT18),
  279. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT19),
  280. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT20),
  281. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT21),
  282. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT22),
  283. IMX_PINCTRL_PIN(MX53_PAD_DISP0_DAT23),
  284. IMX_PINCTRL_PIN(MX53_PAD_CSI0_PIXCLK),
  285. IMX_PINCTRL_PIN(MX53_PAD_CSI0_MCLK),
  286. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DATA_EN),
  287. IMX_PINCTRL_PIN(MX53_PAD_CSI0_VSYNC),
  288. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT4),
  289. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT5),
  290. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT6),
  291. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT7),
  292. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT8),
  293. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT9),
  294. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT10),
  295. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT11),
  296. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT12),
  297. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT13),
  298. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT14),
  299. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT15),
  300. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT16),
  301. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT17),
  302. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT18),
  303. IMX_PINCTRL_PIN(MX53_PAD_CSI0_DAT19),
  304. IMX_PINCTRL_PIN(MX53_PAD_EIM_A25),
  305. IMX_PINCTRL_PIN(MX53_PAD_EIM_EB2),
  306. IMX_PINCTRL_PIN(MX53_PAD_EIM_D16),
  307. IMX_PINCTRL_PIN(MX53_PAD_EIM_D17),
  308. IMX_PINCTRL_PIN(MX53_PAD_EIM_D18),
  309. IMX_PINCTRL_PIN(MX53_PAD_EIM_D19),
  310. IMX_PINCTRL_PIN(MX53_PAD_EIM_D20),
  311. IMX_PINCTRL_PIN(MX53_PAD_EIM_D21),
  312. IMX_PINCTRL_PIN(MX53_PAD_EIM_D22),
  313. IMX_PINCTRL_PIN(MX53_PAD_EIM_D23),
  314. IMX_PINCTRL_PIN(MX53_PAD_EIM_EB3),
  315. IMX_PINCTRL_PIN(MX53_PAD_EIM_D24),
  316. IMX_PINCTRL_PIN(MX53_PAD_EIM_D25),
  317. IMX_PINCTRL_PIN(MX53_PAD_EIM_D26),
  318. IMX_PINCTRL_PIN(MX53_PAD_EIM_D27),
  319. IMX_PINCTRL_PIN(MX53_PAD_EIM_D28),
  320. IMX_PINCTRL_PIN(MX53_PAD_EIM_D29),
  321. IMX_PINCTRL_PIN(MX53_PAD_EIM_D30),
  322. IMX_PINCTRL_PIN(MX53_PAD_EIM_D31),
  323. IMX_PINCTRL_PIN(MX53_PAD_EIM_A24),
  324. IMX_PINCTRL_PIN(MX53_PAD_EIM_A23),
  325. IMX_PINCTRL_PIN(MX53_PAD_EIM_A22),
  326. IMX_PINCTRL_PIN(MX53_PAD_EIM_A21),
  327. IMX_PINCTRL_PIN(MX53_PAD_EIM_A20),
  328. IMX_PINCTRL_PIN(MX53_PAD_EIM_A19),
  329. IMX_PINCTRL_PIN(MX53_PAD_EIM_A18),
  330. IMX_PINCTRL_PIN(MX53_PAD_EIM_A17),
  331. IMX_PINCTRL_PIN(MX53_PAD_EIM_A16),
  332. IMX_PINCTRL_PIN(MX53_PAD_EIM_CS0),
  333. IMX_PINCTRL_PIN(MX53_PAD_EIM_CS1),
  334. IMX_PINCTRL_PIN(MX53_PAD_EIM_OE),
  335. IMX_PINCTRL_PIN(MX53_PAD_EIM_RW),
  336. IMX_PINCTRL_PIN(MX53_PAD_EIM_LBA),
  337. IMX_PINCTRL_PIN(MX53_PAD_EIM_EB0),
  338. IMX_PINCTRL_PIN(MX53_PAD_EIM_EB1),
  339. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA0),
  340. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA1),
  341. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA2),
  342. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA3),
  343. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA4),
  344. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA5),
  345. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA6),
  346. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA7),
  347. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA8),
  348. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA9),
  349. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA10),
  350. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA11),
  351. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA12),
  352. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA13),
  353. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA14),
  354. IMX_PINCTRL_PIN(MX53_PAD_EIM_DA15),
  355. IMX_PINCTRL_PIN(MX53_PAD_NANDF_WE_B),
  356. IMX_PINCTRL_PIN(MX53_PAD_NANDF_RE_B),
  357. IMX_PINCTRL_PIN(MX53_PAD_EIM_WAIT),
  358. IMX_PINCTRL_PIN(MX53_PAD_RESERVE8),
  359. IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX3_P),
  360. IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX2_P),
  361. IMX_PINCTRL_PIN(MX53_PAD_LVDS1_CLK_P),
  362. IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX1_P),
  363. IMX_PINCTRL_PIN(MX53_PAD_LVDS1_TX0_P),
  364. IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX3_P),
  365. IMX_PINCTRL_PIN(MX53_PAD_LVDS0_CLK_P),
  366. IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX2_P),
  367. IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX1_P),
  368. IMX_PINCTRL_PIN(MX53_PAD_LVDS0_TX0_P),
  369. IMX_PINCTRL_PIN(MX53_PAD_GPIO_10),
  370. IMX_PINCTRL_PIN(MX53_PAD_GPIO_11),
  371. IMX_PINCTRL_PIN(MX53_PAD_GPIO_12),
  372. IMX_PINCTRL_PIN(MX53_PAD_GPIO_13),
  373. IMX_PINCTRL_PIN(MX53_PAD_GPIO_14),
  374. IMX_PINCTRL_PIN(MX53_PAD_NANDF_CLE),
  375. IMX_PINCTRL_PIN(MX53_PAD_NANDF_ALE),
  376. IMX_PINCTRL_PIN(MX53_PAD_NANDF_WP_B),
  377. IMX_PINCTRL_PIN(MX53_PAD_NANDF_RB0),
  378. IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS0),
  379. IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS1),
  380. IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS2),
  381. IMX_PINCTRL_PIN(MX53_PAD_NANDF_CS3),
  382. IMX_PINCTRL_PIN(MX53_PAD_FEC_MDIO),
  383. IMX_PINCTRL_PIN(MX53_PAD_FEC_REF_CLK),
  384. IMX_PINCTRL_PIN(MX53_PAD_FEC_RX_ER),
  385. IMX_PINCTRL_PIN(MX53_PAD_FEC_CRS_DV),
  386. IMX_PINCTRL_PIN(MX53_PAD_FEC_RXD1),
  387. IMX_PINCTRL_PIN(MX53_PAD_FEC_RXD0),
  388. IMX_PINCTRL_PIN(MX53_PAD_FEC_TX_EN),
  389. IMX_PINCTRL_PIN(MX53_PAD_FEC_TXD1),
  390. IMX_PINCTRL_PIN(MX53_PAD_FEC_TXD0),
  391. IMX_PINCTRL_PIN(MX53_PAD_FEC_MDC),
  392. IMX_PINCTRL_PIN(MX53_PAD_PATA_DIOW),
  393. IMX_PINCTRL_PIN(MX53_PAD_PATA_DMACK),
  394. IMX_PINCTRL_PIN(MX53_PAD_PATA_DMARQ),
  395. IMX_PINCTRL_PIN(MX53_PAD_PATA_BUFFER_EN),
  396. IMX_PINCTRL_PIN(MX53_PAD_PATA_INTRQ),
  397. IMX_PINCTRL_PIN(MX53_PAD_PATA_DIOR),
  398. IMX_PINCTRL_PIN(MX53_PAD_PATA_RESET_B),
  399. IMX_PINCTRL_PIN(MX53_PAD_PATA_IORDY),
  400. IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_0),
  401. IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_1),
  402. IMX_PINCTRL_PIN(MX53_PAD_PATA_DA_2),
  403. IMX_PINCTRL_PIN(MX53_PAD_PATA_CS_0),
  404. IMX_PINCTRL_PIN(MX53_PAD_PATA_CS_1),
  405. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA0),
  406. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA1),
  407. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA2),
  408. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA3),
  409. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA4),
  410. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA5),
  411. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA6),
  412. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA7),
  413. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA8),
  414. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA9),
  415. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA10),
  416. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA11),
  417. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA12),
  418. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA13),
  419. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA14),
  420. IMX_PINCTRL_PIN(MX53_PAD_PATA_DATA15),
  421. IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA0),
  422. IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA1),
  423. IMX_PINCTRL_PIN(MX53_PAD_SD1_CMD),
  424. IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA2),
  425. IMX_PINCTRL_PIN(MX53_PAD_SD1_CLK),
  426. IMX_PINCTRL_PIN(MX53_PAD_SD1_DATA3),
  427. IMX_PINCTRL_PIN(MX53_PAD_SD2_CLK),
  428. IMX_PINCTRL_PIN(MX53_PAD_SD2_CMD),
  429. IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA3),
  430. IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA2),
  431. IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA1),
  432. IMX_PINCTRL_PIN(MX53_PAD_SD2_DATA0),
  433. IMX_PINCTRL_PIN(MX53_PAD_GPIO_0),
  434. IMX_PINCTRL_PIN(MX53_PAD_GPIO_1),
  435. IMX_PINCTRL_PIN(MX53_PAD_GPIO_9),
  436. IMX_PINCTRL_PIN(MX53_PAD_GPIO_3),
  437. IMX_PINCTRL_PIN(MX53_PAD_GPIO_6),
  438. IMX_PINCTRL_PIN(MX53_PAD_GPIO_2),
  439. IMX_PINCTRL_PIN(MX53_PAD_GPIO_4),
  440. IMX_PINCTRL_PIN(MX53_PAD_GPIO_5),
  441. IMX_PINCTRL_PIN(MX53_PAD_GPIO_7),
  442. IMX_PINCTRL_PIN(MX53_PAD_GPIO_8),
  443. IMX_PINCTRL_PIN(MX53_PAD_GPIO_16),
  444. IMX_PINCTRL_PIN(MX53_PAD_GPIO_17),
  445. IMX_PINCTRL_PIN(MX53_PAD_GPIO_18),
  446. };
  447. static struct imx_pinctrl_soc_info imx53_pinctrl_info = {
  448. .pins = imx53_pinctrl_pads,
  449. .npins = ARRAY_SIZE(imx53_pinctrl_pads),
  450. };
  451. static const struct of_device_id imx53_pinctrl_of_match[] = {
  452. { .compatible = "fsl,imx53-iomuxc", },
  453. { /* sentinel */ }
  454. };
  455. static int imx53_pinctrl_probe(struct platform_device *pdev)
  456. {
  457. return imx_pinctrl_probe(pdev, &imx53_pinctrl_info);
  458. }
  459. static struct platform_driver imx53_pinctrl_driver = {
  460. .driver = {
  461. .name = "imx53-pinctrl",
  462. .of_match_table = imx53_pinctrl_of_match,
  463. },
  464. .probe = imx53_pinctrl_probe,
  465. .remove = imx_pinctrl_remove,
  466. };
  467. static int __init imx53_pinctrl_init(void)
  468. {
  469. return platform_driver_register(&imx53_pinctrl_driver);
  470. }
  471. arch_initcall(imx53_pinctrl_init);
  472. static void __exit imx53_pinctrl_exit(void)
  473. {
  474. platform_driver_unregister(&imx53_pinctrl_driver);
  475. }
  476. module_exit(imx53_pinctrl_exit);
  477. MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
  478. MODULE_DESCRIPTION("Freescale IMX53 pinctrl driver");
  479. MODULE_LICENSE("GPL v2");