pinctrl-imx6sx.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. /*
  2. * Freescale imx6sx pinctrl driver
  3. *
  4. * Author: Anson Huang <Anson.Huang@freescale.com>
  5. * Copyright (C) 2014 Freescale Semiconductor, Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/err.h>
  12. #include <linux/init.h>
  13. #include <linux/io.h>
  14. #include <linux/of.h>
  15. #include <linux/of_device.h>
  16. #include <linux/pinctrl/pinctrl.h>
  17. #include "pinctrl-imx.h"
  18. enum imx6sx_pads {
  19. MX6Sx_PAD_RESERVE0 = 0,
  20. MX6Sx_PAD_RESERVE1 = 1,
  21. MX6Sx_PAD_RESERVE2 = 2,
  22. MX6Sx_PAD_RESERVE3 = 3,
  23. MX6Sx_PAD_RESERVE4 = 4,
  24. MX6SX_PAD_GPIO1_IO00 = 5,
  25. MX6SX_PAD_GPIO1_IO01 = 6,
  26. MX6SX_PAD_GPIO1_IO02 = 7,
  27. MX6SX_PAD_GPIO1_IO03 = 8,
  28. MX6SX_PAD_GPIO1_IO04 = 9,
  29. MX6SX_PAD_GPIO1_IO05 = 10,
  30. MX6SX_PAD_GPIO1_IO06 = 11,
  31. MX6SX_PAD_GPIO1_IO07 = 12,
  32. MX6SX_PAD_GPIO1_IO08 = 13,
  33. MX6SX_PAD_GPIO1_IO09 = 14,
  34. MX6SX_PAD_GPIO1_IO10 = 15,
  35. MX6SX_PAD_GPIO1_IO11 = 16,
  36. MX6SX_PAD_GPIO1_IO12 = 17,
  37. MX6SX_PAD_GPIO1_IO13 = 18,
  38. MX6SX_PAD_CSI_DATA00 = 19,
  39. MX6SX_PAD_CSI_DATA01 = 20,
  40. MX6SX_PAD_CSI_DATA02 = 21,
  41. MX6SX_PAD_CSI_DATA03 = 22,
  42. MX6SX_PAD_CSI_DATA04 = 23,
  43. MX6SX_PAD_CSI_DATA05 = 24,
  44. MX6SX_PAD_CSI_DATA06 = 25,
  45. MX6SX_PAD_CSI_DATA07 = 26,
  46. MX6SX_PAD_CSI_HSYNC = 27,
  47. MX6SX_PAD_CSI_MCLK = 28,
  48. MX6SX_PAD_CSI_PIXCLK = 29,
  49. MX6SX_PAD_CSI_VSYNC = 30,
  50. MX6SX_PAD_ENET1_COL = 31,
  51. MX6SX_PAD_ENET1_CRS = 32,
  52. MX6SX_PAD_ENET1_MDC = 33,
  53. MX6SX_PAD_ENET1_MDIO = 34,
  54. MX6SX_PAD_ENET1_RX_CLK = 35,
  55. MX6SX_PAD_ENET1_TX_CLK = 36,
  56. MX6SX_PAD_ENET2_COL = 37,
  57. MX6SX_PAD_ENET2_CRS = 38,
  58. MX6SX_PAD_ENET2_RX_CLK = 39,
  59. MX6SX_PAD_ENET2_TX_CLK = 40,
  60. MX6SX_PAD_KEY_COL0 = 41,
  61. MX6SX_PAD_KEY_COL1 = 42,
  62. MX6SX_PAD_KEY_COL2 = 43,
  63. MX6SX_PAD_KEY_COL3 = 44,
  64. MX6SX_PAD_KEY_COL4 = 45,
  65. MX6SX_PAD_KEY_ROW0 = 46,
  66. MX6SX_PAD_KEY_ROW1 = 47,
  67. MX6SX_PAD_KEY_ROW2 = 48,
  68. MX6SX_PAD_KEY_ROW3 = 49,
  69. MX6SX_PAD_KEY_ROW4 = 50,
  70. MX6SX_PAD_LCD1_CLK = 51,
  71. MX6SX_PAD_LCD1_DATA00 = 52,
  72. MX6SX_PAD_LCD1_DATA01 = 53,
  73. MX6SX_PAD_LCD1_DATA02 = 54,
  74. MX6SX_PAD_LCD1_DATA03 = 55,
  75. MX6SX_PAD_LCD1_DATA04 = 56,
  76. MX6SX_PAD_LCD1_DATA05 = 57,
  77. MX6SX_PAD_LCD1_DATA06 = 58,
  78. MX6SX_PAD_LCD1_DATA07 = 59,
  79. MX6SX_PAD_LCD1_DATA08 = 60,
  80. MX6SX_PAD_LCD1_DATA09 = 61,
  81. MX6SX_PAD_LCD1_DATA10 = 62,
  82. MX6SX_PAD_LCD1_DATA11 = 63,
  83. MX6SX_PAD_LCD1_DATA12 = 64,
  84. MX6SX_PAD_LCD1_DATA13 = 65,
  85. MX6SX_PAD_LCD1_DATA14 = 66,
  86. MX6SX_PAD_LCD1_DATA15 = 67,
  87. MX6SX_PAD_LCD1_DATA16 = 68,
  88. MX6SX_PAD_LCD1_DATA17 = 69,
  89. MX6SX_PAD_LCD1_DATA18 = 70,
  90. MX6SX_PAD_LCD1_DATA19 = 71,
  91. MX6SX_PAD_LCD1_DATA20 = 72,
  92. MX6SX_PAD_LCD1_DATA21 = 73,
  93. MX6SX_PAD_LCD1_DATA22 = 74,
  94. MX6SX_PAD_LCD1_DATA23 = 75,
  95. MX6SX_PAD_LCD1_ENABLE = 76,
  96. MX6SX_PAD_LCD1_HSYNC = 77,
  97. MX6SX_PAD_LCD1_RESET = 78,
  98. MX6SX_PAD_LCD1_VSYNC = 79,
  99. MX6SX_PAD_NAND_ALE = 80,
  100. MX6SX_PAD_NAND_CE0_B = 81,
  101. MX6SX_PAD_NAND_CE1_B = 82,
  102. MX6SX_PAD_NAND_CLE = 83,
  103. MX6SX_PAD_NAND_DATA00 = 84 ,
  104. MX6SX_PAD_NAND_DATA01 = 85,
  105. MX6SX_PAD_NAND_DATA02 = 86,
  106. MX6SX_PAD_NAND_DATA03 = 87,
  107. MX6SX_PAD_NAND_DATA04 = 88,
  108. MX6SX_PAD_NAND_DATA05 = 89,
  109. MX6SX_PAD_NAND_DATA06 = 90,
  110. MX6SX_PAD_NAND_DATA07 = 91,
  111. MX6SX_PAD_NAND_RE_B = 92,
  112. MX6SX_PAD_NAND_READY_B = 93,
  113. MX6SX_PAD_NAND_WE_B = 94,
  114. MX6SX_PAD_NAND_WP_B = 95,
  115. MX6SX_PAD_QSPI1A_DATA0 = 96,
  116. MX6SX_PAD_QSPI1A_DATA1 = 97,
  117. MX6SX_PAD_QSPI1A_DATA2 = 98,
  118. MX6SX_PAD_QSPI1A_DATA3 = 99,
  119. MX6SX_PAD_QSPI1A_DQS = 100,
  120. MX6SX_PAD_QSPI1A_SCLK = 101,
  121. MX6SX_PAD_QSPI1A_SS0_B = 102,
  122. MX6SX_PAD_QSPI1A_SS1_B = 103,
  123. MX6SX_PAD_QSPI1B_DATA0 = 104,
  124. MX6SX_PAD_QSPI1B_DATA1 = 105,
  125. MX6SX_PAD_QSPI1B_DATA2 = 106,
  126. MX6SX_PAD_QSPI1B_DATA3 = 107,
  127. MX6SX_PAD_QSPI1B_DQS = 108,
  128. MX6SX_PAD_QSPI1B_SCLK = 109,
  129. MX6SX_PAD_QSPI1B_SS0_B = 110,
  130. MX6SX_PAD_QSPI1B_SS1_B = 111,
  131. MX6SX_PAD_RGMII1_RD0 = 112,
  132. MX6SX_PAD_RGMII1_RD1 = 113,
  133. MX6SX_PAD_RGMII1_RD2 = 114,
  134. MX6SX_PAD_RGMII1_RD3 = 115,
  135. MX6SX_PAD_RGMII1_RX_CTL = 116,
  136. MX6SX_PAD_RGMII1_RXC = 117,
  137. MX6SX_PAD_RGMII1_TD0 = 118,
  138. MX6SX_PAD_RGMII1_TD1 = 119,
  139. MX6SX_PAD_RGMII1_TD2 = 120,
  140. MX6SX_PAD_RGMII1_TD3 = 121,
  141. MX6SX_PAD_RGMII1_TX_CTL = 122,
  142. MX6SX_PAD_RGMII1_TXC = 123,
  143. MX6SX_PAD_RGMII2_RD0 = 124,
  144. MX6SX_PAD_RGMII2_RD1 = 125,
  145. MX6SX_PAD_RGMII2_RD2 = 126,
  146. MX6SX_PAD_RGMII2_RD3 = 127,
  147. MX6SX_PAD_RGMII2_RX_CTL = 128,
  148. MX6SX_PAD_RGMII2_RXC = 129,
  149. MX6SX_PAD_RGMII2_TD0 = 130,
  150. MX6SX_PAD_RGMII2_TD1 = 131,
  151. MX6SX_PAD_RGMII2_TD2 = 132,
  152. MX6SX_PAD_RGMII2_TD3 = 133,
  153. MX6SX_PAD_RGMII2_TX_CTL = 134,
  154. MX6SX_PAD_RGMII2_TXC = 135,
  155. MX6SX_PAD_SD1_CLK = 136,
  156. MX6SX_PAD_SD1_CMD = 137,
  157. MX6SX_PAD_SD1_DATA0 = 138,
  158. MX6SX_PAD_SD1_DATA1 = 139,
  159. MX6SX_PAD_SD1_DATA2 = 140,
  160. MX6SX_PAD_SD1_DATA3 = 141,
  161. MX6SX_PAD_SD2_CLK = 142,
  162. MX6SX_PAD_SD2_CMD = 143,
  163. MX6SX_PAD_SD2_DATA0 = 144,
  164. MX6SX_PAD_SD2_DATA1 = 145,
  165. MX6SX_PAD_SD2_DATA2 = 146,
  166. MX6SX_PAD_SD2_DATA3 = 147,
  167. MX6SX_PAD_SD3_CLK = 148,
  168. MX6SX_PAD_SD3_CMD = 149,
  169. MX6SX_PAD_SD3_DATA0 = 150,
  170. MX6SX_PAD_SD3_DATA1 = 151,
  171. MX6SX_PAD_SD3_DATA2 = 152,
  172. MX6SX_PAD_SD3_DATA3 = 153,
  173. MX6SX_PAD_SD3_DATA4 = 154,
  174. MX6SX_PAD_SD3_DATA5 = 155,
  175. MX6SX_PAD_SD3_DATA6 = 156,
  176. MX6SX_PAD_SD3_DATA7 = 157,
  177. MX6SX_PAD_SD4_CLK = 158,
  178. MX6SX_PAD_SD4_CMD = 159,
  179. MX6SX_PAD_SD4_DATA0 = 160,
  180. MX6SX_PAD_SD4_DATA1 = 161,
  181. MX6SX_PAD_SD4_DATA2 = 162,
  182. MX6SX_PAD_SD4_DATA3 = 163,
  183. MX6SX_PAD_SD4_DATA4 = 164,
  184. MX6SX_PAD_SD4_DATA5 = 165,
  185. MX6SX_PAD_SD4_DATA6 = 166,
  186. MX6SX_PAD_SD4_DATA7 = 167,
  187. MX6SX_PAD_SD4_RESET_B = 168,
  188. MX6SX_PAD_USB_H_DATA = 169,
  189. MX6SX_PAD_USB_H_STROBE = 170,
  190. };
  191. /* Pad names for the pinmux subsystem */
  192. static const struct pinctrl_pin_desc imx6sx_pinctrl_pads[] = {
  193. IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE0),
  194. IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE1),
  195. IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE2),
  196. IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE3),
  197. IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE4),
  198. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO00),
  199. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO01),
  200. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO02),
  201. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO03),
  202. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO04),
  203. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO05),
  204. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO06),
  205. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO07),
  206. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO08),
  207. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO09),
  208. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO10),
  209. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO11),
  210. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO12),
  211. IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO13),
  212. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA00),
  213. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA01),
  214. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA02),
  215. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA03),
  216. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA04),
  217. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA05),
  218. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA06),
  219. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA07),
  220. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_HSYNC),
  221. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_MCLK),
  222. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_PIXCLK),
  223. IMX_PINCTRL_PIN(MX6SX_PAD_CSI_VSYNC),
  224. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_COL),
  225. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_CRS),
  226. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDC),
  227. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDIO),
  228. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_RX_CLK),
  229. IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_TX_CLK),
  230. IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_COL),
  231. IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_CRS),
  232. IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_RX_CLK),
  233. IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_TX_CLK),
  234. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL0),
  235. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL1),
  236. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL2),
  237. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL3),
  238. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL4),
  239. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW0),
  240. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW1),
  241. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW2),
  242. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW3),
  243. IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW4),
  244. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_CLK),
  245. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA00),
  246. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA01),
  247. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA02),
  248. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA03),
  249. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA04),
  250. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA05),
  251. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA06),
  252. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA07),
  253. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA08),
  254. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA09),
  255. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA10),
  256. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA11),
  257. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA12),
  258. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA13),
  259. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA14),
  260. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA15),
  261. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA16),
  262. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA17),
  263. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA18),
  264. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA19),
  265. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA20),
  266. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA21),
  267. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA22),
  268. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA23),
  269. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_ENABLE),
  270. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_HSYNC),
  271. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_RESET),
  272. IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_VSYNC),
  273. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_ALE),
  274. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE0_B),
  275. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE1_B),
  276. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CLE),
  277. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA00),
  278. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA01),
  279. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA02),
  280. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA03),
  281. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA04),
  282. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA05),
  283. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA06),
  284. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA07),
  285. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_RE_B),
  286. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_READY_B),
  287. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WE_B),
  288. IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WP_B),
  289. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA0),
  290. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA1),
  291. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA2),
  292. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA3),
  293. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DQS),
  294. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SCLK),
  295. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS0_B),
  296. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS1_B),
  297. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA0),
  298. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA1),
  299. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA2),
  300. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA3),
  301. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DQS),
  302. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SCLK),
  303. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS0_B),
  304. IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS1_B),
  305. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD0),
  306. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD1),
  307. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD2),
  308. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD3),
  309. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RX_CTL),
  310. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RXC),
  311. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD0),
  312. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD1),
  313. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD2),
  314. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD3),
  315. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TX_CTL),
  316. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TXC),
  317. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD0),
  318. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD1),
  319. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD2),
  320. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD3),
  321. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RX_CTL),
  322. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RXC),
  323. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD0),
  324. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD1),
  325. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD2),
  326. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD3),
  327. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TX_CTL),
  328. IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TXC),
  329. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CLK),
  330. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CMD),
  331. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA0),
  332. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA1),
  333. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA2),
  334. IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA3),
  335. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CLK),
  336. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CMD),
  337. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA0),
  338. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA1),
  339. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA2),
  340. IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA3),
  341. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CLK),
  342. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CMD),
  343. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA0),
  344. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA1),
  345. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA2),
  346. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA3),
  347. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA4),
  348. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA5),
  349. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA6),
  350. IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA7),
  351. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CLK),
  352. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CMD),
  353. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA0),
  354. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA1),
  355. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA2),
  356. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA3),
  357. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA4),
  358. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA5),
  359. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA6),
  360. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA7),
  361. IMX_PINCTRL_PIN(MX6SX_PAD_SD4_RESET_B),
  362. IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_DATA),
  363. IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_STROBE),
  364. };
  365. static struct imx_pinctrl_soc_info imx6sx_pinctrl_info = {
  366. .pins = imx6sx_pinctrl_pads,
  367. .npins = ARRAY_SIZE(imx6sx_pinctrl_pads),
  368. .gpr_compatible = "fsl,imx6sx-iomuxc-gpr",
  369. };
  370. static const struct of_device_id imx6sx_pinctrl_of_match[] = {
  371. { .compatible = "fsl,imx6sx-iomuxc", },
  372. { /* sentinel */ }
  373. };
  374. static int imx6sx_pinctrl_probe(struct platform_device *pdev)
  375. {
  376. return imx_pinctrl_probe(pdev, &imx6sx_pinctrl_info);
  377. }
  378. static struct platform_driver imx6sx_pinctrl_driver = {
  379. .driver = {
  380. .name = "imx6sx-pinctrl",
  381. .of_match_table = of_match_ptr(imx6sx_pinctrl_of_match),
  382. },
  383. .probe = imx6sx_pinctrl_probe,
  384. };
  385. static int __init imx6sx_pinctrl_init(void)
  386. {
  387. return platform_driver_register(&imx6sx_pinctrl_driver);
  388. }
  389. arch_initcall(imx6sx_pinctrl_init);