pinctrl-imx27.c 14 KB

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