pinctrl-imx50.c 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. /*
  2. * imx50 pinctrl driver based on imx pinmux core
  3. *
  4. * Copyright (C) 2013 Greg Ungerer <gerg@uclinux.org>
  5. * Copyright (C) 2012 Freescale Semiconductor, Inc.
  6. * Copyright (C) 2012 Linaro, Inc.
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #include <linux/err.h>
  14. #include <linux/init.h>
  15. #include <linux/io.h>
  16. #include <linux/of.h>
  17. #include <linux/of_device.h>
  18. #include <linux/pinctrl/pinctrl.h>
  19. #include "pinctrl-imx.h"
  20. enum imx50_pads {
  21. MX50_PAD_RESERVE0 = 0,
  22. MX50_PAD_RESERVE1 = 1,
  23. MX50_PAD_RESERVE2 = 2,
  24. MX50_PAD_RESERVE3 = 3,
  25. MX50_PAD_RESERVE4 = 4,
  26. MX50_PAD_RESERVE5 = 5,
  27. MX50_PAD_RESERVE6 = 6,
  28. MX50_PAD_RESERVE7 = 7,
  29. MX50_PAD_KEY_COL0 = 8,
  30. MX50_PAD_KEY_ROW0 = 9,
  31. MX50_PAD_KEY_COL1 = 10,
  32. MX50_PAD_KEY_ROW1 = 11,
  33. MX50_PAD_KEY_COL2 = 12,
  34. MX50_PAD_KEY_ROW2 = 13,
  35. MX50_PAD_KEY_COL3 = 14,
  36. MX50_PAD_KEY_ROW3 = 15,
  37. MX50_PAD_I2C1_SCL = 16,
  38. MX50_PAD_I2C1_SDA = 17,
  39. MX50_PAD_I2C2_SCL = 18,
  40. MX50_PAD_I2C2_SDA = 19,
  41. MX50_PAD_I2C3_SCL = 20,
  42. MX50_PAD_I2C3_SDA = 21,
  43. MX50_PAD_PWM1 = 22,
  44. MX50_PAD_PWM2 = 23,
  45. MX50_PAD_0WIRE = 24,
  46. MX50_PAD_EPITO = 25,
  47. MX50_PAD_WDOG = 26,
  48. MX50_PAD_SSI_TXFS = 27,
  49. MX50_PAD_SSI_TXC = 28,
  50. MX50_PAD_SSI_TXD = 29,
  51. MX50_PAD_SSI_RXD = 30,
  52. MX50_PAD_SSI_RXF = 31,
  53. MX50_PAD_SSI_RXC = 32,
  54. MX50_PAD_UART1_TXD = 33,
  55. MX50_PAD_UART1_RXD = 34,
  56. MX50_PAD_UART1_CTS = 35,
  57. MX50_PAD_UART1_RTS = 36,
  58. MX50_PAD_UART2_TXD = 37,
  59. MX50_PAD_UART2_RXD = 38,
  60. MX50_PAD_UART2_CTS = 39,
  61. MX50_PAD_UART2_RTS = 40,
  62. MX50_PAD_UART3_TXD = 41,
  63. MX50_PAD_UART3_RXD = 42,
  64. MX50_PAD_UART4_TXD = 43,
  65. MX50_PAD_UART4_RXD = 44,
  66. MX50_PAD_CSPI_CLK = 45,
  67. MX50_PAD_CSPI_MOSI = 46,
  68. MX50_PAD_CSPI_MISO = 47,
  69. MX50_PAD_CSPI_SS0 = 48,
  70. MX50_PAD_ECSPI1_CLK = 49,
  71. MX50_PAD_ECSPI1_MOSI = 50,
  72. MX50_PAD_ECSPI1_MISO = 51,
  73. MX50_PAD_ECSPI1_SS0 = 52,
  74. MX50_PAD_ECSPI2_CLK = 53,
  75. MX50_PAD_ECSPI2_MOSI = 54,
  76. MX50_PAD_ECSPI2_MISO = 55,
  77. MX50_PAD_ECSPI2_SS0 = 56,
  78. MX50_PAD_SD1_CLK = 57,
  79. MX50_PAD_SD1_CMD = 58,
  80. MX50_PAD_SD1_D0 = 59,
  81. MX50_PAD_SD1_D1 = 60,
  82. MX50_PAD_SD1_D2 = 61,
  83. MX50_PAD_SD1_D3 = 62,
  84. MX50_PAD_SD2_CLK = 63,
  85. MX50_PAD_SD2_CMD = 64,
  86. MX50_PAD_SD2_D0 = 65,
  87. MX50_PAD_SD2_D1 = 66,
  88. MX50_PAD_SD2_D2 = 67,
  89. MX50_PAD_SD2_D3 = 68,
  90. MX50_PAD_SD2_D4 = 69,
  91. MX50_PAD_SD2_D5 = 70,
  92. MX50_PAD_SD2_D6 = 71,
  93. MX50_PAD_SD2_D7 = 72,
  94. MX50_PAD_SD2_WP = 73,
  95. MX50_PAD_SD2_CD = 74,
  96. MX50_PAD_DISP_D0 = 75,
  97. MX50_PAD_DISP_D1 = 76,
  98. MX50_PAD_DISP_D2 = 77,
  99. MX50_PAD_DISP_D3 = 78,
  100. MX50_PAD_DISP_D4 = 79,
  101. MX50_PAD_DISP_D5 = 80,
  102. MX50_PAD_DISP_D6 = 81,
  103. MX50_PAD_DISP_D7 = 82,
  104. MX50_PAD_DISP_WR = 83,
  105. MX50_PAD_DISP_RD = 84,
  106. MX50_PAD_DISP_RS = 85,
  107. MX50_PAD_DISP_CS = 86,
  108. MX50_PAD_DISP_BUSY = 87,
  109. MX50_PAD_DISP_RESET = 88,
  110. MX50_PAD_SD3_CLK = 89,
  111. MX50_PAD_SD3_CMD = 90,
  112. MX50_PAD_SD3_D0 = 91,
  113. MX50_PAD_SD3_D1 = 92,
  114. MX50_PAD_SD3_D2 = 93,
  115. MX50_PAD_SD3_D3 = 94,
  116. MX50_PAD_SD3_D4 = 95,
  117. MX50_PAD_SD3_D5 = 96,
  118. MX50_PAD_SD3_D6 = 97,
  119. MX50_PAD_SD3_D7 = 98,
  120. MX50_PAD_SD3_WP = 99,
  121. MX50_PAD_DISP_D8 = 100,
  122. MX50_PAD_DISP_D9 = 101,
  123. MX50_PAD_DISP_D10 = 102,
  124. MX50_PAD_DISP_D11 = 103,
  125. MX50_PAD_DISP_D12 = 104,
  126. MX50_PAD_DISP_D13 = 105,
  127. MX50_PAD_DISP_D14 = 106,
  128. MX50_PAD_DISP_D15 = 107,
  129. MX50_PAD_EPDC_D0 = 108,
  130. MX50_PAD_EPDC_D1 = 109,
  131. MX50_PAD_EPDC_D2 = 110,
  132. MX50_PAD_EPDC_D3 = 111,
  133. MX50_PAD_EPDC_D4 = 112,
  134. MX50_PAD_EPDC_D5 = 113,
  135. MX50_PAD_EPDC_D6 = 114,
  136. MX50_PAD_EPDC_D7 = 115,
  137. MX50_PAD_EPDC_D8 = 116,
  138. MX50_PAD_EPDC_D9 = 117,
  139. MX50_PAD_EPDC_D10 = 118,
  140. MX50_PAD_EPDC_D11 = 119,
  141. MX50_PAD_EPDC_D12 = 120,
  142. MX50_PAD_EPDC_D13 = 121,
  143. MX50_PAD_EPDC_D14 = 122,
  144. MX50_PAD_EPDC_D15 = 123,
  145. MX50_PAD_EPDC_GDCLK = 124,
  146. MX50_PAD_EPDC_GDSP = 125,
  147. MX50_PAD_EPDC_GDOE = 126,
  148. MX50_PAD_EPDC_GDRL = 127,
  149. MX50_PAD_EPDC_SDCLK = 128,
  150. MX50_PAD_EPDC_SDOEZ = 129,
  151. MX50_PAD_EPDC_SDOED = 130,
  152. MX50_PAD_EPDC_SDOE = 131,
  153. MX50_PAD_EPDC_SDLE = 132,
  154. MX50_PAD_EPDC_SDCLKN = 133,
  155. MX50_PAD_EPDC_SDSHR = 134,
  156. MX50_PAD_EPDC_PWRCOM = 135,
  157. MX50_PAD_EPDC_PWRSTAT = 136,
  158. MX50_PAD_EPDC_PWRCTRL0 = 137,
  159. MX50_PAD_EPDC_PWRCTRL1 = 138,
  160. MX50_PAD_EPDC_PWRCTRL2 = 139,
  161. MX50_PAD_EPDC_PWRCTRL3 = 140,
  162. MX50_PAD_EPDC_VCOM0 = 141,
  163. MX50_PAD_EPDC_VCOM1 = 142,
  164. MX50_PAD_EPDC_BDR0 = 143,
  165. MX50_PAD_EPDC_BDR1 = 144,
  166. MX50_PAD_EPDC_SDCE0 = 145,
  167. MX50_PAD_EPDC_SDCE1 = 146,
  168. MX50_PAD_EPDC_SDCE2 = 147,
  169. MX50_PAD_EPDC_SDCE3 = 148,
  170. MX50_PAD_EPDC_SDCE4 = 149,
  171. MX50_PAD_EPDC_SDCE5 = 150,
  172. MX50_PAD_EIM_DA0 = 151,
  173. MX50_PAD_EIM_DA1 = 152,
  174. MX50_PAD_EIM_DA2 = 153,
  175. MX50_PAD_EIM_DA3 = 154,
  176. MX50_PAD_EIM_DA4 = 155,
  177. MX50_PAD_EIM_DA5 = 156,
  178. MX50_PAD_EIM_DA6 = 157,
  179. MX50_PAD_EIM_DA7 = 158,
  180. MX50_PAD_EIM_DA8 = 159,
  181. MX50_PAD_EIM_DA9 = 160,
  182. MX50_PAD_EIM_DA10 = 161,
  183. MX50_PAD_EIM_DA11 = 162,
  184. MX50_PAD_EIM_DA12 = 163,
  185. MX50_PAD_EIM_DA13 = 164,
  186. MX50_PAD_EIM_DA14 = 165,
  187. MX50_PAD_EIM_DA15 = 166,
  188. MX50_PAD_EIM_CS2 = 167,
  189. MX50_PAD_EIM_CS1 = 168,
  190. MX50_PAD_EIM_CS0 = 169,
  191. MX50_PAD_EIM_EB0 = 170,
  192. MX50_PAD_EIM_EB1 = 171,
  193. MX50_PAD_EIM_WAIT = 172,
  194. MX50_PAD_EIM_BCLK = 173,
  195. MX50_PAD_EIM_RDY = 174,
  196. MX50_PAD_EIM_OE = 175,
  197. MX50_PAD_EIM_RW = 176,
  198. MX50_PAD_EIM_LBA = 177,
  199. MX50_PAD_EIM_CRE = 178,
  200. };
  201. /* Pad names for the pinmux subsystem */
  202. static const struct pinctrl_pin_desc imx50_pinctrl_pads[] = {
  203. IMX_PINCTRL_PIN(MX50_PAD_RESERVE0),
  204. IMX_PINCTRL_PIN(MX50_PAD_RESERVE1),
  205. IMX_PINCTRL_PIN(MX50_PAD_RESERVE2),
  206. IMX_PINCTRL_PIN(MX50_PAD_RESERVE3),
  207. IMX_PINCTRL_PIN(MX50_PAD_RESERVE4),
  208. IMX_PINCTRL_PIN(MX50_PAD_RESERVE5),
  209. IMX_PINCTRL_PIN(MX50_PAD_RESERVE6),
  210. IMX_PINCTRL_PIN(MX50_PAD_RESERVE7),
  211. IMX_PINCTRL_PIN(MX50_PAD_KEY_COL0),
  212. IMX_PINCTRL_PIN(MX50_PAD_KEY_ROW0),
  213. IMX_PINCTRL_PIN(MX50_PAD_KEY_COL1),
  214. IMX_PINCTRL_PIN(MX50_PAD_KEY_ROW1),
  215. IMX_PINCTRL_PIN(MX50_PAD_KEY_COL2),
  216. IMX_PINCTRL_PIN(MX50_PAD_KEY_ROW2),
  217. IMX_PINCTRL_PIN(MX50_PAD_KEY_COL3),
  218. IMX_PINCTRL_PIN(MX50_PAD_KEY_ROW3),
  219. IMX_PINCTRL_PIN(MX50_PAD_I2C1_SCL),
  220. IMX_PINCTRL_PIN(MX50_PAD_I2C1_SDA),
  221. IMX_PINCTRL_PIN(MX50_PAD_I2C2_SCL),
  222. IMX_PINCTRL_PIN(MX50_PAD_I2C2_SDA),
  223. IMX_PINCTRL_PIN(MX50_PAD_I2C3_SCL),
  224. IMX_PINCTRL_PIN(MX50_PAD_I2C3_SDA),
  225. IMX_PINCTRL_PIN(MX50_PAD_PWM1),
  226. IMX_PINCTRL_PIN(MX50_PAD_PWM2),
  227. IMX_PINCTRL_PIN(MX50_PAD_0WIRE),
  228. IMX_PINCTRL_PIN(MX50_PAD_EPITO),
  229. IMX_PINCTRL_PIN(MX50_PAD_WDOG),
  230. IMX_PINCTRL_PIN(MX50_PAD_SSI_TXFS),
  231. IMX_PINCTRL_PIN(MX50_PAD_SSI_TXC),
  232. IMX_PINCTRL_PIN(MX50_PAD_SSI_TXD),
  233. IMX_PINCTRL_PIN(MX50_PAD_SSI_RXD),
  234. IMX_PINCTRL_PIN(MX50_PAD_SSI_RXF),
  235. IMX_PINCTRL_PIN(MX50_PAD_SSI_RXC),
  236. IMX_PINCTRL_PIN(MX50_PAD_UART1_TXD),
  237. IMX_PINCTRL_PIN(MX50_PAD_UART1_RXD),
  238. IMX_PINCTRL_PIN(MX50_PAD_UART1_CTS),
  239. IMX_PINCTRL_PIN(MX50_PAD_UART1_RTS),
  240. IMX_PINCTRL_PIN(MX50_PAD_UART2_TXD),
  241. IMX_PINCTRL_PIN(MX50_PAD_UART2_RXD),
  242. IMX_PINCTRL_PIN(MX50_PAD_UART2_CTS),
  243. IMX_PINCTRL_PIN(MX50_PAD_UART2_RTS),
  244. IMX_PINCTRL_PIN(MX50_PAD_UART3_TXD),
  245. IMX_PINCTRL_PIN(MX50_PAD_UART3_RXD),
  246. IMX_PINCTRL_PIN(MX50_PAD_UART4_TXD),
  247. IMX_PINCTRL_PIN(MX50_PAD_UART4_RXD),
  248. IMX_PINCTRL_PIN(MX50_PAD_CSPI_CLK),
  249. IMX_PINCTRL_PIN(MX50_PAD_CSPI_MOSI),
  250. IMX_PINCTRL_PIN(MX50_PAD_CSPI_MISO),
  251. IMX_PINCTRL_PIN(MX50_PAD_CSPI_SS0),
  252. IMX_PINCTRL_PIN(MX50_PAD_ECSPI1_CLK),
  253. IMX_PINCTRL_PIN(MX50_PAD_ECSPI1_MOSI),
  254. IMX_PINCTRL_PIN(MX50_PAD_ECSPI1_MISO),
  255. IMX_PINCTRL_PIN(MX50_PAD_ECSPI1_SS0),
  256. IMX_PINCTRL_PIN(MX50_PAD_ECSPI2_CLK),
  257. IMX_PINCTRL_PIN(MX50_PAD_ECSPI2_MOSI),
  258. IMX_PINCTRL_PIN(MX50_PAD_ECSPI2_MISO),
  259. IMX_PINCTRL_PIN(MX50_PAD_ECSPI2_SS0),
  260. IMX_PINCTRL_PIN(MX50_PAD_SD1_CLK),
  261. IMX_PINCTRL_PIN(MX50_PAD_SD1_CMD),
  262. IMX_PINCTRL_PIN(MX50_PAD_SD1_D0),
  263. IMX_PINCTRL_PIN(MX50_PAD_SD1_D1),
  264. IMX_PINCTRL_PIN(MX50_PAD_SD1_D2),
  265. IMX_PINCTRL_PIN(MX50_PAD_SD1_D3),
  266. IMX_PINCTRL_PIN(MX50_PAD_SD2_CLK),
  267. IMX_PINCTRL_PIN(MX50_PAD_SD2_CMD),
  268. IMX_PINCTRL_PIN(MX50_PAD_SD2_D0),
  269. IMX_PINCTRL_PIN(MX50_PAD_SD2_D1),
  270. IMX_PINCTRL_PIN(MX50_PAD_SD2_D2),
  271. IMX_PINCTRL_PIN(MX50_PAD_SD2_D3),
  272. IMX_PINCTRL_PIN(MX50_PAD_SD2_D4),
  273. IMX_PINCTRL_PIN(MX50_PAD_SD2_D5),
  274. IMX_PINCTRL_PIN(MX50_PAD_SD2_D6),
  275. IMX_PINCTRL_PIN(MX50_PAD_SD2_D7),
  276. IMX_PINCTRL_PIN(MX50_PAD_SD2_WP),
  277. IMX_PINCTRL_PIN(MX50_PAD_SD2_CD),
  278. IMX_PINCTRL_PIN(MX50_PAD_DISP_D0),
  279. IMX_PINCTRL_PIN(MX50_PAD_DISP_D1),
  280. IMX_PINCTRL_PIN(MX50_PAD_DISP_D2),
  281. IMX_PINCTRL_PIN(MX50_PAD_DISP_D3),
  282. IMX_PINCTRL_PIN(MX50_PAD_DISP_D4),
  283. IMX_PINCTRL_PIN(MX50_PAD_DISP_D5),
  284. IMX_PINCTRL_PIN(MX50_PAD_DISP_D6),
  285. IMX_PINCTRL_PIN(MX50_PAD_DISP_D7),
  286. IMX_PINCTRL_PIN(MX50_PAD_DISP_WR),
  287. IMX_PINCTRL_PIN(MX50_PAD_DISP_RD),
  288. IMX_PINCTRL_PIN(MX50_PAD_DISP_RS),
  289. IMX_PINCTRL_PIN(MX50_PAD_DISP_CS),
  290. IMX_PINCTRL_PIN(MX50_PAD_DISP_BUSY),
  291. IMX_PINCTRL_PIN(MX50_PAD_DISP_RESET),
  292. IMX_PINCTRL_PIN(MX50_PAD_SD3_CLK),
  293. IMX_PINCTRL_PIN(MX50_PAD_SD3_CMD),
  294. IMX_PINCTRL_PIN(MX50_PAD_SD3_D0),
  295. IMX_PINCTRL_PIN(MX50_PAD_SD3_D1),
  296. IMX_PINCTRL_PIN(MX50_PAD_SD3_D2),
  297. IMX_PINCTRL_PIN(MX50_PAD_SD3_D3),
  298. IMX_PINCTRL_PIN(MX50_PAD_SD3_D4),
  299. IMX_PINCTRL_PIN(MX50_PAD_SD3_D5),
  300. IMX_PINCTRL_PIN(MX50_PAD_SD3_D6),
  301. IMX_PINCTRL_PIN(MX50_PAD_SD3_D7),
  302. IMX_PINCTRL_PIN(MX50_PAD_SD3_WP),
  303. IMX_PINCTRL_PIN(MX50_PAD_DISP_D8),
  304. IMX_PINCTRL_PIN(MX50_PAD_DISP_D9),
  305. IMX_PINCTRL_PIN(MX50_PAD_DISP_D10),
  306. IMX_PINCTRL_PIN(MX50_PAD_DISP_D11),
  307. IMX_PINCTRL_PIN(MX50_PAD_DISP_D12),
  308. IMX_PINCTRL_PIN(MX50_PAD_DISP_D13),
  309. IMX_PINCTRL_PIN(MX50_PAD_DISP_D14),
  310. IMX_PINCTRL_PIN(MX50_PAD_DISP_D15),
  311. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D0),
  312. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D1),
  313. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D2),
  314. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D3),
  315. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D4),
  316. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D5),
  317. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D6),
  318. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D7),
  319. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D8),
  320. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D9),
  321. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D10),
  322. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D11),
  323. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D12),
  324. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D13),
  325. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D14),
  326. IMX_PINCTRL_PIN(MX50_PAD_EPDC_D15),
  327. IMX_PINCTRL_PIN(MX50_PAD_EPDC_GDCLK),
  328. IMX_PINCTRL_PIN(MX50_PAD_EPDC_GDSP),
  329. IMX_PINCTRL_PIN(MX50_PAD_EPDC_GDOE),
  330. IMX_PINCTRL_PIN(MX50_PAD_EPDC_GDRL),
  331. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCLK),
  332. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDOEZ),
  333. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDOED),
  334. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDOE),
  335. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDLE),
  336. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCLKN),
  337. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDSHR),
  338. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRCOM),
  339. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRSTAT),
  340. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRCTRL0),
  341. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRCTRL1),
  342. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRCTRL2),
  343. IMX_PINCTRL_PIN(MX50_PAD_EPDC_PWRCTRL3),
  344. IMX_PINCTRL_PIN(MX50_PAD_EPDC_VCOM0),
  345. IMX_PINCTRL_PIN(MX50_PAD_EPDC_VCOM1),
  346. IMX_PINCTRL_PIN(MX50_PAD_EPDC_BDR0),
  347. IMX_PINCTRL_PIN(MX50_PAD_EPDC_BDR1),
  348. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE0),
  349. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE1),
  350. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE2),
  351. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE3),
  352. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE4),
  353. IMX_PINCTRL_PIN(MX50_PAD_EPDC_SDCE5),
  354. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA0),
  355. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA1),
  356. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA2),
  357. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA3),
  358. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA4),
  359. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA5),
  360. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA6),
  361. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA7),
  362. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA8),
  363. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA9),
  364. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA10),
  365. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA11),
  366. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA12),
  367. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA13),
  368. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA14),
  369. IMX_PINCTRL_PIN(MX50_PAD_EIM_DA15),
  370. IMX_PINCTRL_PIN(MX50_PAD_EIM_CS2),
  371. IMX_PINCTRL_PIN(MX50_PAD_EIM_CS1),
  372. IMX_PINCTRL_PIN(MX50_PAD_EIM_CS0),
  373. IMX_PINCTRL_PIN(MX50_PAD_EIM_EB0),
  374. IMX_PINCTRL_PIN(MX50_PAD_EIM_EB1),
  375. IMX_PINCTRL_PIN(MX50_PAD_EIM_WAIT),
  376. IMX_PINCTRL_PIN(MX50_PAD_EIM_BCLK),
  377. IMX_PINCTRL_PIN(MX50_PAD_EIM_RDY),
  378. IMX_PINCTRL_PIN(MX50_PAD_EIM_OE),
  379. IMX_PINCTRL_PIN(MX50_PAD_EIM_RW),
  380. IMX_PINCTRL_PIN(MX50_PAD_EIM_LBA),
  381. IMX_PINCTRL_PIN(MX50_PAD_EIM_CRE),
  382. };
  383. static struct imx_pinctrl_soc_info imx50_pinctrl_info = {
  384. .pins = imx50_pinctrl_pads,
  385. .npins = ARRAY_SIZE(imx50_pinctrl_pads),
  386. .gpr_compatible = "fsl,imx50-iomuxc-gpr",
  387. };
  388. static const struct of_device_id imx50_pinctrl_of_match[] = {
  389. { .compatible = "fsl,imx50-iomuxc", },
  390. { /* sentinel */ }
  391. };
  392. static int imx50_pinctrl_probe(struct platform_device *pdev)
  393. {
  394. return imx_pinctrl_probe(pdev, &imx50_pinctrl_info);
  395. }
  396. static struct platform_driver imx50_pinctrl_driver = {
  397. .driver = {
  398. .name = "imx50-pinctrl",
  399. .of_match_table = of_match_ptr(imx50_pinctrl_of_match),
  400. },
  401. .probe = imx50_pinctrl_probe,
  402. };
  403. static int __init imx50_pinctrl_init(void)
  404. {
  405. return platform_driver_register(&imx50_pinctrl_driver);
  406. }
  407. arch_initcall(imx50_pinctrl_init);