pinctrl-imx6sl.c 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 imx6sl_pads {
  17. MX6SL_PAD_RESERVE0 = 0,
  18. MX6SL_PAD_RESERVE1 = 1,
  19. MX6SL_PAD_RESERVE2 = 2,
  20. MX6SL_PAD_RESERVE3 = 3,
  21. MX6SL_PAD_RESERVE4 = 4,
  22. MX6SL_PAD_RESERVE5 = 5,
  23. MX6SL_PAD_RESERVE6 = 6,
  24. MX6SL_PAD_RESERVE7 = 7,
  25. MX6SL_PAD_RESERVE8 = 8,
  26. MX6SL_PAD_RESERVE9 = 9,
  27. MX6SL_PAD_RESERVE10 = 10,
  28. MX6SL_PAD_RESERVE11 = 11,
  29. MX6SL_PAD_RESERVE12 = 12,
  30. MX6SL_PAD_RESERVE13 = 13,
  31. MX6SL_PAD_RESERVE14 = 14,
  32. MX6SL_PAD_RESERVE15 = 15,
  33. MX6SL_PAD_RESERVE16 = 16,
  34. MX6SL_PAD_RESERVE17 = 17,
  35. MX6SL_PAD_RESERVE18 = 18,
  36. MX6SL_PAD_AUD_MCLK = 19,
  37. MX6SL_PAD_AUD_RXC = 20,
  38. MX6SL_PAD_AUD_RXD = 21,
  39. MX6SL_PAD_AUD_RXFS = 22,
  40. MX6SL_PAD_AUD_TXC = 23,
  41. MX6SL_PAD_AUD_TXD = 24,
  42. MX6SL_PAD_AUD_TXFS = 25,
  43. MX6SL_PAD_ECSPI1_MISO = 26,
  44. MX6SL_PAD_ECSPI1_MOSI = 27,
  45. MX6SL_PAD_ECSPI1_SCLK = 28,
  46. MX6SL_PAD_ECSPI1_SS0 = 29,
  47. MX6SL_PAD_ECSPI2_MISO = 30,
  48. MX6SL_PAD_ECSPI2_MOSI = 31,
  49. MX6SL_PAD_ECSPI2_SCLK = 32,
  50. MX6SL_PAD_ECSPI2_SS0 = 33,
  51. MX6SL_PAD_EPDC_BDR0 = 34,
  52. MX6SL_PAD_EPDC_BDR1 = 35,
  53. MX6SL_PAD_EPDC_D0 = 36,
  54. MX6SL_PAD_EPDC_D1 = 37,
  55. MX6SL_PAD_EPDC_D10 = 38,
  56. MX6SL_PAD_EPDC_D11 = 39,
  57. MX6SL_PAD_EPDC_D12 = 40,
  58. MX6SL_PAD_EPDC_D13 = 41,
  59. MX6SL_PAD_EPDC_D14 = 42,
  60. MX6SL_PAD_EPDC_D15 = 43,
  61. MX6SL_PAD_EPDC_D2 = 44,
  62. MX6SL_PAD_EPDC_D3 = 45,
  63. MX6SL_PAD_EPDC_D4 = 46,
  64. MX6SL_PAD_EPDC_D5 = 47,
  65. MX6SL_PAD_EPDC_D6 = 48,
  66. MX6SL_PAD_EPDC_D7 = 49,
  67. MX6SL_PAD_EPDC_D8 = 50,
  68. MX6SL_PAD_EPDC_D9 = 51,
  69. MX6SL_PAD_EPDC_GDCLK = 52,
  70. MX6SL_PAD_EPDC_GDOE = 53,
  71. MX6SL_PAD_EPDC_GDRL = 54,
  72. MX6SL_PAD_EPDC_GDSP = 55,
  73. MX6SL_PAD_EPDC_PWRCOM = 56,
  74. MX6SL_PAD_EPDC_PWRCTRL0 = 57,
  75. MX6SL_PAD_EPDC_PWRCTRL1 = 58,
  76. MX6SL_PAD_EPDC_PWRCTRL2 = 59,
  77. MX6SL_PAD_EPDC_PWRCTRL3 = 60,
  78. MX6SL_PAD_EPDC_PWRINT = 61,
  79. MX6SL_PAD_EPDC_PWRSTAT = 62,
  80. MX6SL_PAD_EPDC_PWRWAKEUP = 63,
  81. MX6SL_PAD_EPDC_SDCE0 = 64,
  82. MX6SL_PAD_EPDC_SDCE1 = 65,
  83. MX6SL_PAD_EPDC_SDCE2 = 66,
  84. MX6SL_PAD_EPDC_SDCE3 = 67,
  85. MX6SL_PAD_EPDC_SDCLK = 68,
  86. MX6SL_PAD_EPDC_SDLE = 69,
  87. MX6SL_PAD_EPDC_SDOE = 70,
  88. MX6SL_PAD_EPDC_SDSHR = 71,
  89. MX6SL_PAD_EPDC_VCOM0 = 72,
  90. MX6SL_PAD_EPDC_VCOM1 = 73,
  91. MX6SL_PAD_FEC_CRS_DV = 74,
  92. MX6SL_PAD_FEC_MDC = 75,
  93. MX6SL_PAD_FEC_MDIO = 76,
  94. MX6SL_PAD_FEC_REF_CLK = 77,
  95. MX6SL_PAD_FEC_RX_ER = 78,
  96. MX6SL_PAD_FEC_RXD0 = 79,
  97. MX6SL_PAD_FEC_RXD1 = 80,
  98. MX6SL_PAD_FEC_TX_CLK = 81,
  99. MX6SL_PAD_FEC_TX_EN = 82,
  100. MX6SL_PAD_FEC_TXD0 = 83,
  101. MX6SL_PAD_FEC_TXD1 = 84,
  102. MX6SL_PAD_HSIC_DAT = 85,
  103. MX6SL_PAD_HSIC_STROBE = 86,
  104. MX6SL_PAD_I2C1_SCL = 87,
  105. MX6SL_PAD_I2C1_SDA = 88,
  106. MX6SL_PAD_I2C2_SCL = 89,
  107. MX6SL_PAD_I2C2_SDA = 90,
  108. MX6SL_PAD_KEY_COL0 = 91,
  109. MX6SL_PAD_KEY_COL1 = 92,
  110. MX6SL_PAD_KEY_COL2 = 93,
  111. MX6SL_PAD_KEY_COL3 = 94,
  112. MX6SL_PAD_KEY_COL4 = 95,
  113. MX6SL_PAD_KEY_COL5 = 96,
  114. MX6SL_PAD_KEY_COL6 = 97,
  115. MX6SL_PAD_KEY_COL7 = 98,
  116. MX6SL_PAD_KEY_ROW0 = 99,
  117. MX6SL_PAD_KEY_ROW1 = 100,
  118. MX6SL_PAD_KEY_ROW2 = 101,
  119. MX6SL_PAD_KEY_ROW3 = 102,
  120. MX6SL_PAD_KEY_ROW4 = 103,
  121. MX6SL_PAD_KEY_ROW5 = 104,
  122. MX6SL_PAD_KEY_ROW6 = 105,
  123. MX6SL_PAD_KEY_ROW7 = 106,
  124. MX6SL_PAD_LCD_CLK = 107,
  125. MX6SL_PAD_LCD_DAT0 = 108,
  126. MX6SL_PAD_LCD_DAT1 = 109,
  127. MX6SL_PAD_LCD_DAT10 = 110,
  128. MX6SL_PAD_LCD_DAT11 = 111,
  129. MX6SL_PAD_LCD_DAT12 = 112,
  130. MX6SL_PAD_LCD_DAT13 = 113,
  131. MX6SL_PAD_LCD_DAT14 = 114,
  132. MX6SL_PAD_LCD_DAT15 = 115,
  133. MX6SL_PAD_LCD_DAT16 = 116,
  134. MX6SL_PAD_LCD_DAT17 = 117,
  135. MX6SL_PAD_LCD_DAT18 = 118,
  136. MX6SL_PAD_LCD_DAT19 = 119,
  137. MX6SL_PAD_LCD_DAT2 = 120,
  138. MX6SL_PAD_LCD_DAT20 = 121,
  139. MX6SL_PAD_LCD_DAT21 = 122,
  140. MX6SL_PAD_LCD_DAT22 = 123,
  141. MX6SL_PAD_LCD_DAT23 = 124,
  142. MX6SL_PAD_LCD_DAT3 = 125,
  143. MX6SL_PAD_LCD_DAT4 = 126,
  144. MX6SL_PAD_LCD_DAT5 = 127,
  145. MX6SL_PAD_LCD_DAT6 = 128,
  146. MX6SL_PAD_LCD_DAT7 = 129,
  147. MX6SL_PAD_LCD_DAT8 = 130,
  148. MX6SL_PAD_LCD_DAT9 = 131,
  149. MX6SL_PAD_LCD_ENABLE = 132,
  150. MX6SL_PAD_LCD_HSYNC = 133,
  151. MX6SL_PAD_LCD_RESET = 134,
  152. MX6SL_PAD_LCD_VSYNC = 135,
  153. MX6SL_PAD_PWM1 = 136,
  154. MX6SL_PAD_REF_CLK_24M = 137,
  155. MX6SL_PAD_REF_CLK_32K = 138,
  156. MX6SL_PAD_SD1_CLK = 139,
  157. MX6SL_PAD_SD1_CMD = 140,
  158. MX6SL_PAD_SD1_DAT0 = 141,
  159. MX6SL_PAD_SD1_DAT1 = 142,
  160. MX6SL_PAD_SD1_DAT2 = 143,
  161. MX6SL_PAD_SD1_DAT3 = 144,
  162. MX6SL_PAD_SD1_DAT4 = 145,
  163. MX6SL_PAD_SD1_DAT5 = 146,
  164. MX6SL_PAD_SD1_DAT6 = 147,
  165. MX6SL_PAD_SD1_DAT7 = 148,
  166. MX6SL_PAD_SD2_CLK = 149,
  167. MX6SL_PAD_SD2_CMD = 150,
  168. MX6SL_PAD_SD2_DAT0 = 151,
  169. MX6SL_PAD_SD2_DAT1 = 152,
  170. MX6SL_PAD_SD2_DAT2 = 153,
  171. MX6SL_PAD_SD2_DAT3 = 154,
  172. MX6SL_PAD_SD2_DAT4 = 155,
  173. MX6SL_PAD_SD2_DAT5 = 156,
  174. MX6SL_PAD_SD2_DAT6 = 157,
  175. MX6SL_PAD_SD2_DAT7 = 158,
  176. MX6SL_PAD_SD2_RST = 159,
  177. MX6SL_PAD_SD3_CLK = 160,
  178. MX6SL_PAD_SD3_CMD = 161,
  179. MX6SL_PAD_SD3_DAT0 = 162,
  180. MX6SL_PAD_SD3_DAT1 = 163,
  181. MX6SL_PAD_SD3_DAT2 = 164,
  182. MX6SL_PAD_SD3_DAT3 = 165,
  183. MX6SL_PAD_UART1_RXD = 166,
  184. MX6SL_PAD_UART1_TXD = 167,
  185. MX6SL_PAD_WDOG_B = 168,
  186. };
  187. /* Pad names for the pinmux subsystem */
  188. static const struct pinctrl_pin_desc imx6sl_pinctrl_pads[] = {
  189. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE0),
  190. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE1),
  191. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE2),
  192. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE3),
  193. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE4),
  194. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE5),
  195. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE6),
  196. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE7),
  197. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE8),
  198. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE9),
  199. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE10),
  200. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE11),
  201. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE12),
  202. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE13),
  203. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE14),
  204. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE15),
  205. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE16),
  206. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE17),
  207. IMX_PINCTRL_PIN(MX6SL_PAD_RESERVE18),
  208. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_MCLK),
  209. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_RXC),
  210. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_RXD),
  211. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_RXFS),
  212. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_TXC),
  213. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_TXD),
  214. IMX_PINCTRL_PIN(MX6SL_PAD_AUD_TXFS),
  215. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI1_MISO),
  216. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI1_MOSI),
  217. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI1_SCLK),
  218. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI1_SS0),
  219. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI2_MISO),
  220. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI2_MOSI),
  221. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI2_SCLK),
  222. IMX_PINCTRL_PIN(MX6SL_PAD_ECSPI2_SS0),
  223. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_BDR0),
  224. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_BDR1),
  225. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D0),
  226. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D1),
  227. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D10),
  228. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D11),
  229. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D12),
  230. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D13),
  231. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D14),
  232. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D15),
  233. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D2),
  234. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D3),
  235. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D4),
  236. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D5),
  237. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D6),
  238. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D7),
  239. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D8),
  240. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_D9),
  241. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_GDCLK),
  242. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_GDOE),
  243. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_GDRL),
  244. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_GDSP),
  245. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRCOM),
  246. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRCTRL0),
  247. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRCTRL1),
  248. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRCTRL2),
  249. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRCTRL3),
  250. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRINT),
  251. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRSTAT),
  252. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_PWRWAKEUP),
  253. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDCE0),
  254. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDCE1),
  255. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDCE2),
  256. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDCE3),
  257. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDCLK),
  258. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDLE),
  259. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDOE),
  260. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_SDSHR),
  261. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_VCOM0),
  262. IMX_PINCTRL_PIN(MX6SL_PAD_EPDC_VCOM1),
  263. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_CRS_DV),
  264. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_MDC),
  265. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_MDIO),
  266. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_REF_CLK),
  267. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_RX_ER),
  268. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_RXD0),
  269. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_RXD1),
  270. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_TX_CLK),
  271. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_TX_EN),
  272. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_TXD0),
  273. IMX_PINCTRL_PIN(MX6SL_PAD_FEC_TXD1),
  274. IMX_PINCTRL_PIN(MX6SL_PAD_HSIC_DAT),
  275. IMX_PINCTRL_PIN(MX6SL_PAD_HSIC_STROBE),
  276. IMX_PINCTRL_PIN(MX6SL_PAD_I2C1_SCL),
  277. IMX_PINCTRL_PIN(MX6SL_PAD_I2C1_SDA),
  278. IMX_PINCTRL_PIN(MX6SL_PAD_I2C2_SCL),
  279. IMX_PINCTRL_PIN(MX6SL_PAD_I2C2_SDA),
  280. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL0),
  281. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL1),
  282. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL2),
  283. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL3),
  284. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL4),
  285. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL5),
  286. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL6),
  287. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_COL7),
  288. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW0),
  289. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW1),
  290. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW2),
  291. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW3),
  292. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW4),
  293. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW5),
  294. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW6),
  295. IMX_PINCTRL_PIN(MX6SL_PAD_KEY_ROW7),
  296. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_CLK),
  297. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT0),
  298. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT1),
  299. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT10),
  300. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT11),
  301. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT12),
  302. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT13),
  303. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT14),
  304. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT15),
  305. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT16),
  306. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT17),
  307. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT18),
  308. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT19),
  309. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT2),
  310. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT20),
  311. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT21),
  312. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT22),
  313. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT23),
  314. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT3),
  315. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT4),
  316. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT5),
  317. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT6),
  318. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT7),
  319. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT8),
  320. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_DAT9),
  321. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_ENABLE),
  322. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_HSYNC),
  323. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_RESET),
  324. IMX_PINCTRL_PIN(MX6SL_PAD_LCD_VSYNC),
  325. IMX_PINCTRL_PIN(MX6SL_PAD_PWM1),
  326. IMX_PINCTRL_PIN(MX6SL_PAD_REF_CLK_24M),
  327. IMX_PINCTRL_PIN(MX6SL_PAD_REF_CLK_32K),
  328. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_CLK),
  329. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_CMD),
  330. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT0),
  331. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT1),
  332. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT2),
  333. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT3),
  334. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT4),
  335. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT5),
  336. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT6),
  337. IMX_PINCTRL_PIN(MX6SL_PAD_SD1_DAT7),
  338. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_CLK),
  339. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_CMD),
  340. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT0),
  341. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT1),
  342. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT2),
  343. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT3),
  344. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT4),
  345. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT5),
  346. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT6),
  347. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_DAT7),
  348. IMX_PINCTRL_PIN(MX6SL_PAD_SD2_RST),
  349. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_CLK),
  350. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_CMD),
  351. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_DAT0),
  352. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_DAT1),
  353. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_DAT2),
  354. IMX_PINCTRL_PIN(MX6SL_PAD_SD3_DAT3),
  355. IMX_PINCTRL_PIN(MX6SL_PAD_UART1_RXD),
  356. IMX_PINCTRL_PIN(MX6SL_PAD_UART1_TXD),
  357. IMX_PINCTRL_PIN(MX6SL_PAD_WDOG_B),
  358. };
  359. static struct imx_pinctrl_soc_info imx6sl_pinctrl_info = {
  360. .pins = imx6sl_pinctrl_pads,
  361. .npins = ARRAY_SIZE(imx6sl_pinctrl_pads),
  362. };
  363. static const struct of_device_id imx6sl_pinctrl_of_match[] = {
  364. { .compatible = "fsl,imx6sl-iomuxc", },
  365. { /* sentinel */ }
  366. };
  367. MODULE_DEVICE_TABLE(of, imx6sl_pinctrl_of_match);
  368. static int imx6sl_pinctrl_probe(struct platform_device *pdev)
  369. {
  370. return imx_pinctrl_probe(pdev, &imx6sl_pinctrl_info);
  371. }
  372. static struct platform_driver imx6sl_pinctrl_driver = {
  373. .driver = {
  374. .name = "imx6sl-pinctrl",
  375. .of_match_table = imx6sl_pinctrl_of_match,
  376. },
  377. .probe = imx6sl_pinctrl_probe,
  378. .remove = imx_pinctrl_remove,
  379. };
  380. static int __init imx6sl_pinctrl_init(void)
  381. {
  382. return platform_driver_register(&imx6sl_pinctrl_driver);
  383. }
  384. arch_initcall(imx6sl_pinctrl_init);
  385. static void __exit imx6sl_pinctrl_exit(void)
  386. {
  387. platform_driver_unregister(&imx6sl_pinctrl_driver);
  388. }
  389. module_exit(imx6sl_pinctrl_exit);
  390. MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>");
  391. MODULE_DESCRIPTION("Freescale imx6sl pinctrl driver");
  392. MODULE_LICENSE("GPL v2");