pinctrl-imx27.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. /*
  2. * imx27 pinctrl driver based on imx pinmux core
  3. *
  4. * Copyright (C) 2013 Pengutronix
  5. *
  6. * Author: Markus Pargmann <mpa@pengutronix.de>
  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-imx1.h"
  21. #define PAD_ID(port, pin) (port*32 + pin)
  22. #define PA 0
  23. #define PB 1
  24. #define PC 2
  25. #define PD 3
  26. #define PE 4
  27. #define PF 5
  28. enum imx27_pads {
  29. MX27_PAD_USBH2_CLK = PAD_ID(PA, 0),
  30. MX27_PAD_USBH2_DIR = PAD_ID(PA, 1),
  31. MX27_PAD_USBH2_DATA7 = PAD_ID(PA, 2),
  32. MX27_PAD_USBH2_NXT = PAD_ID(PA, 3),
  33. MX27_PAD_USBH2_STP = PAD_ID(PA, 4),
  34. MX27_PAD_LSCLK = PAD_ID(PA, 5),
  35. MX27_PAD_LD0 = PAD_ID(PA, 6),
  36. MX27_PAD_LD1 = PAD_ID(PA, 7),
  37. MX27_PAD_LD2 = PAD_ID(PA, 8),
  38. MX27_PAD_LD3 = PAD_ID(PA, 9),
  39. MX27_PAD_LD4 = PAD_ID(PA, 10),
  40. MX27_PAD_LD5 = PAD_ID(PA, 11),
  41. MX27_PAD_LD6 = PAD_ID(PA, 12),
  42. MX27_PAD_LD7 = PAD_ID(PA, 13),
  43. MX27_PAD_LD8 = PAD_ID(PA, 14),
  44. MX27_PAD_LD9 = PAD_ID(PA, 15),
  45. MX27_PAD_LD10 = PAD_ID(PA, 16),
  46. MX27_PAD_LD11 = PAD_ID(PA, 17),
  47. MX27_PAD_LD12 = PAD_ID(PA, 18),
  48. MX27_PAD_LD13 = PAD_ID(PA, 19),
  49. MX27_PAD_LD14 = PAD_ID(PA, 20),
  50. MX27_PAD_LD15 = PAD_ID(PA, 21),
  51. MX27_PAD_LD16 = PAD_ID(PA, 22),
  52. MX27_PAD_LD17 = PAD_ID(PA, 23),
  53. MX27_PAD_REV = PAD_ID(PA, 24),
  54. MX27_PAD_CLS = PAD_ID(PA, 25),
  55. MX27_PAD_PS = PAD_ID(PA, 26),
  56. MX27_PAD_SPL_SPR = PAD_ID(PA, 27),
  57. MX27_PAD_HSYNC = PAD_ID(PA, 28),
  58. MX27_PAD_VSYNC = PAD_ID(PA, 29),
  59. MX27_PAD_CONTRAST = PAD_ID(PA, 30),
  60. MX27_PAD_OE_ACD = PAD_ID(PA, 31),
  61. MX27_PAD_SD2_D0 = PAD_ID(PB, 4),
  62. MX27_PAD_SD2_D1 = PAD_ID(PB, 5),
  63. MX27_PAD_SD2_D2 = PAD_ID(PB, 6),
  64. MX27_PAD_SD2_D3 = PAD_ID(PB, 7),
  65. MX27_PAD_SD2_CMD = PAD_ID(PB, 8),
  66. MX27_PAD_SD2_CLK = PAD_ID(PB, 9),
  67. MX27_PAD_CSI_D0 = PAD_ID(PB, 10),
  68. MX27_PAD_CSI_D1 = PAD_ID(PB, 11),
  69. MX27_PAD_CSI_D2 = PAD_ID(PB, 12),
  70. MX27_PAD_CSI_D3 = PAD_ID(PB, 13),
  71. MX27_PAD_CSI_D4 = PAD_ID(PB, 14),
  72. MX27_PAD_CSI_MCLK = PAD_ID(PB, 15),
  73. MX27_PAD_CSI_PIXCLK = PAD_ID(PB, 16),
  74. MX27_PAD_CSI_D5 = PAD_ID(PB, 17),
  75. MX27_PAD_CSI_D6 = PAD_ID(PB, 18),
  76. MX27_PAD_CSI_D7 = PAD_ID(PB, 19),
  77. MX27_PAD_CSI_VSYNC = PAD_ID(PB, 20),
  78. MX27_PAD_CSI_HSYNC = PAD_ID(PB, 21),
  79. MX27_PAD_USBH1_SUSP = PAD_ID(PB, 22),
  80. MX27_PAD_USB_PWR = PAD_ID(PB, 23),
  81. MX27_PAD_USB_OC_B = PAD_ID(PB, 24),
  82. MX27_PAD_USBH1_RCV = PAD_ID(PB, 25),
  83. MX27_PAD_USBH1_FS = PAD_ID(PB, 26),
  84. MX27_PAD_USBH1_OE_B = PAD_ID(PB, 27),
  85. MX27_PAD_USBH1_TXDM = PAD_ID(PB, 28),
  86. MX27_PAD_USBH1_TXDP = PAD_ID(PB, 29),
  87. MX27_PAD_USBH1_RXDM = PAD_ID(PB, 30),
  88. MX27_PAD_USBH1_RXDP = PAD_ID(PB, 31),
  89. MX27_PAD_I2C2_SDA = PAD_ID(PC, 5),
  90. MX27_PAD_I2C2_SCL = PAD_ID(PC, 6),
  91. MX27_PAD_USBOTG_DATA5 = PAD_ID(PC, 7),
  92. MX27_PAD_USBOTG_DATA6 = PAD_ID(PC, 8),
  93. MX27_PAD_USBOTG_DATA0 = PAD_ID(PC, 9),
  94. MX27_PAD_USBOTG_DATA2 = PAD_ID(PC, 10),
  95. MX27_PAD_USBOTG_DATA1 = PAD_ID(PC, 11),
  96. MX27_PAD_USBOTG_DATA4 = PAD_ID(PC, 12),
  97. MX27_PAD_USBOTG_DATA3 = PAD_ID(PC, 13),
  98. MX27_PAD_TOUT = PAD_ID(PC, 14),
  99. MX27_PAD_TIN = PAD_ID(PC, 15),
  100. MX27_PAD_SSI4_FS = PAD_ID(PC, 16),
  101. MX27_PAD_SSI4_RXDAT = PAD_ID(PC, 17),
  102. MX27_PAD_SSI4_TXDAT = PAD_ID(PC, 18),
  103. MX27_PAD_SSI4_CLK = PAD_ID(PC, 19),
  104. MX27_PAD_SSI1_FS = PAD_ID(PC, 20),
  105. MX27_PAD_SSI1_RXDAT = PAD_ID(PC, 21),
  106. MX27_PAD_SSI1_TXDAT = PAD_ID(PC, 22),
  107. MX27_PAD_SSI1_CLK = PAD_ID(PC, 23),
  108. MX27_PAD_SSI2_FS = PAD_ID(PC, 24),
  109. MX27_PAD_SSI2_RXDAT = PAD_ID(PC, 25),
  110. MX27_PAD_SSI2_TXDAT = PAD_ID(PC, 26),
  111. MX27_PAD_SSI2_CLK = PAD_ID(PC, 27),
  112. MX27_PAD_SSI3_FS = PAD_ID(PC, 28),
  113. MX27_PAD_SSI3_RXDAT = PAD_ID(PC, 29),
  114. MX27_PAD_SSI3_TXDAT = PAD_ID(PC, 30),
  115. MX27_PAD_SSI3_CLK = PAD_ID(PC, 31),
  116. MX27_PAD_SD3_CMD = PAD_ID(PD, 0),
  117. MX27_PAD_SD3_CLK = PAD_ID(PD, 1),
  118. MX27_PAD_ATA_DATA0 = PAD_ID(PD, 2),
  119. MX27_PAD_ATA_DATA1 = PAD_ID(PD, 3),
  120. MX27_PAD_ATA_DATA2 = PAD_ID(PD, 4),
  121. MX27_PAD_ATA_DATA3 = PAD_ID(PD, 5),
  122. MX27_PAD_ATA_DATA4 = PAD_ID(PD, 6),
  123. MX27_PAD_ATA_DATA5 = PAD_ID(PD, 7),
  124. MX27_PAD_ATA_DATA6 = PAD_ID(PD, 8),
  125. MX27_PAD_ATA_DATA7 = PAD_ID(PD, 9),
  126. MX27_PAD_ATA_DATA8 = PAD_ID(PD, 10),
  127. MX27_PAD_ATA_DATA9 = PAD_ID(PD, 11),
  128. MX27_PAD_ATA_DATA10 = PAD_ID(PD, 12),
  129. MX27_PAD_ATA_DATA11 = PAD_ID(PD, 13),
  130. MX27_PAD_ATA_DATA12 = PAD_ID(PD, 14),
  131. MX27_PAD_ATA_DATA13 = PAD_ID(PD, 15),
  132. MX27_PAD_ATA_DATA14 = PAD_ID(PD, 16),
  133. MX27_PAD_I2C_DATA = PAD_ID(PD, 17),
  134. MX27_PAD_I2C_CLK = PAD_ID(PD, 18),
  135. MX27_PAD_CSPI2_SS2 = PAD_ID(PD, 19),
  136. MX27_PAD_CSPI2_SS1 = PAD_ID(PD, 20),
  137. MX27_PAD_CSPI2_SS0 = PAD_ID(PD, 21),
  138. MX27_PAD_CSPI2_SCLK = PAD_ID(PD, 22),
  139. MX27_PAD_CSPI2_MISO = PAD_ID(PD, 23),
  140. MX27_PAD_CSPI2_MOSI = PAD_ID(PD, 24),
  141. MX27_PAD_CSPI1_RDY = PAD_ID(PD, 25),
  142. MX27_PAD_CSPI1_SS2 = PAD_ID(PD, 26),
  143. MX27_PAD_CSPI1_SS1 = PAD_ID(PD, 27),
  144. MX27_PAD_CSPI1_SS0 = PAD_ID(PD, 28),
  145. MX27_PAD_CSPI1_SCLK = PAD_ID(PD, 29),
  146. MX27_PAD_CSPI1_MISO = PAD_ID(PD, 30),
  147. MX27_PAD_CSPI1_MOSI = PAD_ID(PD, 31),
  148. MX27_PAD_USBOTG_NXT = PAD_ID(PE, 0),
  149. MX27_PAD_USBOTG_STP = PAD_ID(PE, 1),
  150. MX27_PAD_USBOTG_DIR = PAD_ID(PE, 2),
  151. MX27_PAD_UART2_CTS = PAD_ID(PE, 3),
  152. MX27_PAD_UART2_RTS = PAD_ID(PE, 4),
  153. MX27_PAD_PWMO = PAD_ID(PE, 5),
  154. MX27_PAD_UART2_TXD = PAD_ID(PE, 6),
  155. MX27_PAD_UART2_RXD = PAD_ID(PE, 7),
  156. MX27_PAD_UART3_TXD = PAD_ID(PE, 8),
  157. MX27_PAD_UART3_RXD = PAD_ID(PE, 9),
  158. MX27_PAD_UART3_CTS = PAD_ID(PE, 10),
  159. MX27_PAD_UART3_RTS = PAD_ID(PE, 11),
  160. MX27_PAD_UART1_TXD = PAD_ID(PE, 12),
  161. MX27_PAD_UART1_RXD = PAD_ID(PE, 13),
  162. MX27_PAD_UART1_CTS = PAD_ID(PE, 14),
  163. MX27_PAD_UART1_RTS = PAD_ID(PE, 15),
  164. MX27_PAD_RTCK = PAD_ID(PE, 16),
  165. MX27_PAD_RESET_OUT_B = PAD_ID(PE, 17),
  166. MX27_PAD_SD1_D0 = PAD_ID(PE, 18),
  167. MX27_PAD_SD1_D1 = PAD_ID(PE, 19),
  168. MX27_PAD_SD1_D2 = PAD_ID(PE, 20),
  169. MX27_PAD_SD1_D3 = PAD_ID(PE, 21),
  170. MX27_PAD_SD1_CMD = PAD_ID(PE, 22),
  171. MX27_PAD_SD1_CLK = PAD_ID(PE, 23),
  172. MX27_PAD_USBOTG_CLK = PAD_ID(PE, 24),
  173. MX27_PAD_USBOTG_DATA7 = PAD_ID(PE, 25),
  174. MX27_PAD_NFRB = PAD_ID(PF, 0),
  175. MX27_PAD_NFCLE = PAD_ID(PF, 1),
  176. MX27_PAD_NFWP_B = PAD_ID(PF, 2),
  177. MX27_PAD_NFCE_B = PAD_ID(PF, 3),
  178. MX27_PAD_NFALE = PAD_ID(PF, 4),
  179. MX27_PAD_NFRE_B = PAD_ID(PF, 5),
  180. MX27_PAD_NFWE_B = PAD_ID(PF, 6),
  181. MX27_PAD_PC_POE = PAD_ID(PF, 7),
  182. MX27_PAD_PC_RW_B = PAD_ID(PF, 8),
  183. MX27_PAD_IOIS16 = PAD_ID(PF, 9),
  184. MX27_PAD_PC_RST = PAD_ID(PF, 10),
  185. MX27_PAD_PC_BVD2 = PAD_ID(PF, 11),
  186. MX27_PAD_PC_BVD1 = PAD_ID(PF, 12),
  187. MX27_PAD_PC_VS2 = PAD_ID(PF, 13),
  188. MX27_PAD_PC_VS1 = PAD_ID(PF, 14),
  189. MX27_PAD_CLKO = PAD_ID(PF, 15),
  190. MX27_PAD_PC_PWRON = PAD_ID(PF, 16),
  191. MX27_PAD_PC_READY = PAD_ID(PF, 17),
  192. MX27_PAD_PC_WAIT_B = PAD_ID(PF, 18),
  193. MX27_PAD_PC_CD2_B = PAD_ID(PF, 19),
  194. MX27_PAD_PC_CD1_B = PAD_ID(PF, 20),
  195. MX27_PAD_CS4_B = PAD_ID(PF, 21),
  196. MX27_PAD_CS5_B = PAD_ID(PF, 22),
  197. MX27_PAD_ATA_DATA15 = PAD_ID(PF, 23),
  198. };
  199. /* Pad names for the pinmux subsystem */
  200. static const struct pinctrl_pin_desc imx27_pinctrl_pads[] = {
  201. IMX_PINCTRL_PIN(MX27_PAD_USBH2_CLK),
  202. IMX_PINCTRL_PIN(MX27_PAD_USBH2_DIR),
  203. IMX_PINCTRL_PIN(MX27_PAD_USBH2_DATA7),
  204. IMX_PINCTRL_PIN(MX27_PAD_USBH2_NXT),
  205. IMX_PINCTRL_PIN(MX27_PAD_USBH2_STP),
  206. IMX_PINCTRL_PIN(MX27_PAD_LSCLK),
  207. IMX_PINCTRL_PIN(MX27_PAD_LD0),
  208. IMX_PINCTRL_PIN(MX27_PAD_LD1),
  209. IMX_PINCTRL_PIN(MX27_PAD_LD2),
  210. IMX_PINCTRL_PIN(MX27_PAD_LD3),
  211. IMX_PINCTRL_PIN(MX27_PAD_LD4),
  212. IMX_PINCTRL_PIN(MX27_PAD_LD5),
  213. IMX_PINCTRL_PIN(MX27_PAD_LD6),
  214. IMX_PINCTRL_PIN(MX27_PAD_LD7),
  215. IMX_PINCTRL_PIN(MX27_PAD_LD8),
  216. IMX_PINCTRL_PIN(MX27_PAD_LD9),
  217. IMX_PINCTRL_PIN(MX27_PAD_LD10),
  218. IMX_PINCTRL_PIN(MX27_PAD_LD11),
  219. IMX_PINCTRL_PIN(MX27_PAD_LD12),
  220. IMX_PINCTRL_PIN(MX27_PAD_LD13),
  221. IMX_PINCTRL_PIN(MX27_PAD_LD14),
  222. IMX_PINCTRL_PIN(MX27_PAD_LD15),
  223. IMX_PINCTRL_PIN(MX27_PAD_LD16),
  224. IMX_PINCTRL_PIN(MX27_PAD_LD17),
  225. IMX_PINCTRL_PIN(MX27_PAD_REV),
  226. IMX_PINCTRL_PIN(MX27_PAD_CLS),
  227. IMX_PINCTRL_PIN(MX27_PAD_PS),
  228. IMX_PINCTRL_PIN(MX27_PAD_SPL_SPR),
  229. IMX_PINCTRL_PIN(MX27_PAD_HSYNC),
  230. IMX_PINCTRL_PIN(MX27_PAD_VSYNC),
  231. IMX_PINCTRL_PIN(MX27_PAD_CONTRAST),
  232. IMX_PINCTRL_PIN(MX27_PAD_OE_ACD),
  233. IMX_PINCTRL_PIN(MX27_PAD_SD2_D0),
  234. IMX_PINCTRL_PIN(MX27_PAD_SD2_D1),
  235. IMX_PINCTRL_PIN(MX27_PAD_SD2_D2),
  236. IMX_PINCTRL_PIN(MX27_PAD_SD2_D3),
  237. IMX_PINCTRL_PIN(MX27_PAD_SD2_CMD),
  238. IMX_PINCTRL_PIN(MX27_PAD_SD2_CLK),
  239. IMX_PINCTRL_PIN(MX27_PAD_CSI_D0),
  240. IMX_PINCTRL_PIN(MX27_PAD_CSI_D1),
  241. IMX_PINCTRL_PIN(MX27_PAD_CSI_D2),
  242. IMX_PINCTRL_PIN(MX27_PAD_CSI_D3),
  243. IMX_PINCTRL_PIN(MX27_PAD_CSI_D4),
  244. IMX_PINCTRL_PIN(MX27_PAD_CSI_MCLK),
  245. IMX_PINCTRL_PIN(MX27_PAD_CSI_PIXCLK),
  246. IMX_PINCTRL_PIN(MX27_PAD_CSI_D5),
  247. IMX_PINCTRL_PIN(MX27_PAD_CSI_D6),
  248. IMX_PINCTRL_PIN(MX27_PAD_CSI_D7),
  249. IMX_PINCTRL_PIN(MX27_PAD_CSI_VSYNC),
  250. IMX_PINCTRL_PIN(MX27_PAD_CSI_HSYNC),
  251. IMX_PINCTRL_PIN(MX27_PAD_USBH1_SUSP),
  252. IMX_PINCTRL_PIN(MX27_PAD_USB_PWR),
  253. IMX_PINCTRL_PIN(MX27_PAD_USB_OC_B),
  254. IMX_PINCTRL_PIN(MX27_PAD_USBH1_RCV),
  255. IMX_PINCTRL_PIN(MX27_PAD_USBH1_FS),
  256. IMX_PINCTRL_PIN(MX27_PAD_USBH1_OE_B),
  257. IMX_PINCTRL_PIN(MX27_PAD_USBH1_TXDM),
  258. IMX_PINCTRL_PIN(MX27_PAD_USBH1_TXDP),
  259. IMX_PINCTRL_PIN(MX27_PAD_USBH1_RXDM),
  260. IMX_PINCTRL_PIN(MX27_PAD_USBH1_RXDP),
  261. IMX_PINCTRL_PIN(MX27_PAD_I2C2_SDA),
  262. IMX_PINCTRL_PIN(MX27_PAD_I2C2_SCL),
  263. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA5),
  264. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA6),
  265. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA0),
  266. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA2),
  267. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA1),
  268. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA4),
  269. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA3),
  270. IMX_PINCTRL_PIN(MX27_PAD_TOUT),
  271. IMX_PINCTRL_PIN(MX27_PAD_TIN),
  272. IMX_PINCTRL_PIN(MX27_PAD_SSI4_FS),
  273. IMX_PINCTRL_PIN(MX27_PAD_SSI4_RXDAT),
  274. IMX_PINCTRL_PIN(MX27_PAD_SSI4_TXDAT),
  275. IMX_PINCTRL_PIN(MX27_PAD_SSI4_CLK),
  276. IMX_PINCTRL_PIN(MX27_PAD_SSI1_FS),
  277. IMX_PINCTRL_PIN(MX27_PAD_SSI1_RXDAT),
  278. IMX_PINCTRL_PIN(MX27_PAD_SSI1_TXDAT),
  279. IMX_PINCTRL_PIN(MX27_PAD_SSI1_CLK),
  280. IMX_PINCTRL_PIN(MX27_PAD_SSI2_FS),
  281. IMX_PINCTRL_PIN(MX27_PAD_SSI2_RXDAT),
  282. IMX_PINCTRL_PIN(MX27_PAD_SSI2_TXDAT),
  283. IMX_PINCTRL_PIN(MX27_PAD_SSI2_CLK),
  284. IMX_PINCTRL_PIN(MX27_PAD_SSI3_FS),
  285. IMX_PINCTRL_PIN(MX27_PAD_SSI3_RXDAT),
  286. IMX_PINCTRL_PIN(MX27_PAD_SSI3_TXDAT),
  287. IMX_PINCTRL_PIN(MX27_PAD_SSI3_CLK),
  288. IMX_PINCTRL_PIN(MX27_PAD_SD3_CMD),
  289. IMX_PINCTRL_PIN(MX27_PAD_SD3_CLK),
  290. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA0),
  291. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA1),
  292. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA2),
  293. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA3),
  294. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA4),
  295. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA5),
  296. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA6),
  297. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA7),
  298. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA8),
  299. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA9),
  300. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA10),
  301. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA11),
  302. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA12),
  303. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA13),
  304. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA14),
  305. IMX_PINCTRL_PIN(MX27_PAD_I2C_DATA),
  306. IMX_PINCTRL_PIN(MX27_PAD_I2C_CLK),
  307. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_SS2),
  308. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_SS1),
  309. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_SS0),
  310. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_SCLK),
  311. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_MISO),
  312. IMX_PINCTRL_PIN(MX27_PAD_CSPI2_MOSI),
  313. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_RDY),
  314. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_SS2),
  315. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_SS1),
  316. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_SS0),
  317. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_SCLK),
  318. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_MISO),
  319. IMX_PINCTRL_PIN(MX27_PAD_CSPI1_MOSI),
  320. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_NXT),
  321. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_STP),
  322. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DIR),
  323. IMX_PINCTRL_PIN(MX27_PAD_UART2_CTS),
  324. IMX_PINCTRL_PIN(MX27_PAD_UART2_RTS),
  325. IMX_PINCTRL_PIN(MX27_PAD_PWMO),
  326. IMX_PINCTRL_PIN(MX27_PAD_UART2_TXD),
  327. IMX_PINCTRL_PIN(MX27_PAD_UART2_RXD),
  328. IMX_PINCTRL_PIN(MX27_PAD_UART3_TXD),
  329. IMX_PINCTRL_PIN(MX27_PAD_UART3_RXD),
  330. IMX_PINCTRL_PIN(MX27_PAD_UART3_CTS),
  331. IMX_PINCTRL_PIN(MX27_PAD_UART3_RTS),
  332. IMX_PINCTRL_PIN(MX27_PAD_UART1_TXD),
  333. IMX_PINCTRL_PIN(MX27_PAD_UART1_RXD),
  334. IMX_PINCTRL_PIN(MX27_PAD_UART1_CTS),
  335. IMX_PINCTRL_PIN(MX27_PAD_UART1_RTS),
  336. IMX_PINCTRL_PIN(MX27_PAD_RTCK),
  337. IMX_PINCTRL_PIN(MX27_PAD_RESET_OUT_B),
  338. IMX_PINCTRL_PIN(MX27_PAD_SD1_D0),
  339. IMX_PINCTRL_PIN(MX27_PAD_SD1_D1),
  340. IMX_PINCTRL_PIN(MX27_PAD_SD1_D2),
  341. IMX_PINCTRL_PIN(MX27_PAD_SD1_D3),
  342. IMX_PINCTRL_PIN(MX27_PAD_SD1_CMD),
  343. IMX_PINCTRL_PIN(MX27_PAD_SD1_CLK),
  344. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_CLK),
  345. IMX_PINCTRL_PIN(MX27_PAD_USBOTG_DATA7),
  346. IMX_PINCTRL_PIN(MX27_PAD_NFRB),
  347. IMX_PINCTRL_PIN(MX27_PAD_NFCLE),
  348. IMX_PINCTRL_PIN(MX27_PAD_NFWP_B),
  349. IMX_PINCTRL_PIN(MX27_PAD_NFCE_B),
  350. IMX_PINCTRL_PIN(MX27_PAD_NFALE),
  351. IMX_PINCTRL_PIN(MX27_PAD_NFRE_B),
  352. IMX_PINCTRL_PIN(MX27_PAD_NFWE_B),
  353. IMX_PINCTRL_PIN(MX27_PAD_PC_POE),
  354. IMX_PINCTRL_PIN(MX27_PAD_PC_RW_B),
  355. IMX_PINCTRL_PIN(MX27_PAD_IOIS16),
  356. IMX_PINCTRL_PIN(MX27_PAD_PC_RST),
  357. IMX_PINCTRL_PIN(MX27_PAD_PC_BVD2),
  358. IMX_PINCTRL_PIN(MX27_PAD_PC_BVD1),
  359. IMX_PINCTRL_PIN(MX27_PAD_PC_VS2),
  360. IMX_PINCTRL_PIN(MX27_PAD_PC_VS1),
  361. IMX_PINCTRL_PIN(MX27_PAD_CLKO),
  362. IMX_PINCTRL_PIN(MX27_PAD_PC_PWRON),
  363. IMX_PINCTRL_PIN(MX27_PAD_PC_READY),
  364. IMX_PINCTRL_PIN(MX27_PAD_PC_WAIT_B),
  365. IMX_PINCTRL_PIN(MX27_PAD_PC_CD2_B),
  366. IMX_PINCTRL_PIN(MX27_PAD_PC_CD1_B),
  367. IMX_PINCTRL_PIN(MX27_PAD_CS4_B),
  368. IMX_PINCTRL_PIN(MX27_PAD_CS5_B),
  369. IMX_PINCTRL_PIN(MX27_PAD_ATA_DATA15),
  370. };
  371. static struct imx1_pinctrl_soc_info imx27_pinctrl_info = {
  372. .pins = imx27_pinctrl_pads,
  373. .npins = ARRAY_SIZE(imx27_pinctrl_pads),
  374. };
  375. static const struct of_device_id imx27_pinctrl_of_match[] = {
  376. { .compatible = "fsl,imx27-iomuxc", },
  377. { /* sentinel */ }
  378. };
  379. static int imx27_pinctrl_probe(struct platform_device *pdev)
  380. {
  381. return imx1_pinctrl_core_probe(pdev, &imx27_pinctrl_info);
  382. }
  383. static struct platform_driver imx27_pinctrl_driver = {
  384. .driver = {
  385. .name = "imx27-pinctrl",
  386. .of_match_table = of_match_ptr(imx27_pinctrl_of_match),
  387. },
  388. .probe = imx27_pinctrl_probe,
  389. .remove = imx1_pinctrl_core_remove,
  390. };
  391. static int __init imx27_pinctrl_init(void)
  392. {
  393. return platform_driver_register(&imx27_pinctrl_driver);
  394. }
  395. arch_initcall(imx27_pinctrl_init);
  396. static void __exit imx27_pinctrl_exit(void)
  397. {
  398. platform_driver_unregister(&imx27_pinctrl_driver);
  399. }
  400. module_exit(imx27_pinctrl_exit);
  401. MODULE_AUTHOR("Markus Pargmann <mpa@pengutronix.de>");
  402. MODULE_DESCRIPTION("Freescale IMX27 pinctrl driver");
  403. MODULE_LICENSE("GPL v2");