pinctrl-imx50.c 13 KB

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