pinctrl-armada-370.c 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. /*
  2. * Marvell Armada 370 pinctrl driver based on mvebu pinctrl core
  3. *
  4. * Copyright (C) 2012 Marvell
  5. *
  6. * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  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/platform_device.h>
  17. #include <linux/clk.h>
  18. #include <linux/of.h>
  19. #include <linux/of_device.h>
  20. #include <linux/pinctrl/pinctrl.h>
  21. #include "pinctrl-mvebu.h"
  22. static struct mvebu_mpp_mode mv88f6710_mpp_modes[] = {
  23. MPP_MODE(0,
  24. MPP_FUNCTION(0x0, "gpio", NULL),
  25. MPP_FUNCTION(0x1, "uart0", "rxd")),
  26. MPP_MODE(1,
  27. MPP_FUNCTION(0x0, "gpo", NULL),
  28. MPP_FUNCTION(0x1, "uart0", "txd")),
  29. MPP_MODE(2,
  30. MPP_FUNCTION(0x0, "gpio", NULL),
  31. MPP_FUNCTION(0x1, "i2c0", "sck"),
  32. MPP_FUNCTION(0x2, "uart0", "txd")),
  33. MPP_MODE(3,
  34. MPP_FUNCTION(0x0, "gpio", NULL),
  35. MPP_FUNCTION(0x1, "i2c0", "sda"),
  36. MPP_FUNCTION(0x2, "uart0", "rxd")),
  37. MPP_MODE(4,
  38. MPP_FUNCTION(0x0, "gpio", NULL),
  39. MPP_FUNCTION(0x1, "vdd", "cpu-pd")),
  40. MPP_MODE(5,
  41. MPP_FUNCTION(0x0, "gpo", NULL),
  42. MPP_FUNCTION(0x1, "ge0", "txclkout"),
  43. MPP_FUNCTION(0x2, "uart1", "txd"),
  44. MPP_FUNCTION(0x4, "spi1", "sck"),
  45. MPP_FUNCTION(0x5, "audio", "mclk")),
  46. MPP_MODE(6,
  47. MPP_FUNCTION(0x0, "gpio", NULL),
  48. MPP_FUNCTION(0x1, "ge0", "txd0"),
  49. MPP_FUNCTION(0x2, "sata0", "prsnt"),
  50. MPP_FUNCTION(0x4, "tdm", "rst"),
  51. MPP_FUNCTION(0x5, "audio", "sdo")),
  52. MPP_MODE(7,
  53. MPP_FUNCTION(0x0, "gpo", NULL),
  54. MPP_FUNCTION(0x1, "ge0", "txd1"),
  55. MPP_FUNCTION(0x4, "tdm", "dtx"),
  56. MPP_FUNCTION(0x5, "audio", "lrclk")),
  57. MPP_MODE(8,
  58. MPP_FUNCTION(0x0, "gpio", NULL),
  59. MPP_FUNCTION(0x1, "ge0", "txd2"),
  60. MPP_FUNCTION(0x2, "uart0", "rts"),
  61. MPP_FUNCTION(0x4, "tdm", "drx"),
  62. MPP_FUNCTION(0x5, "audio", "bclk")),
  63. MPP_MODE(9,
  64. MPP_FUNCTION(0x0, "gpo", NULL),
  65. MPP_FUNCTION(0x1, "ge0", "txd3"),
  66. MPP_FUNCTION(0x2, "uart1", "txd"),
  67. MPP_FUNCTION(0x3, "sd0", "clk"),
  68. MPP_FUNCTION(0x5, "audio", "spdifo")),
  69. MPP_MODE(10,
  70. MPP_FUNCTION(0x0, "gpio", NULL),
  71. MPP_FUNCTION(0x1, "ge0", "txctl"),
  72. MPP_FUNCTION(0x2, "uart0", "cts"),
  73. MPP_FUNCTION(0x4, "tdm", "fsync"),
  74. MPP_FUNCTION(0x5, "audio", "sdi")),
  75. MPP_MODE(11,
  76. MPP_FUNCTION(0x0, "gpio", NULL),
  77. MPP_FUNCTION(0x1, "ge0", "rxd0"),
  78. MPP_FUNCTION(0x2, "uart1", "rxd"),
  79. MPP_FUNCTION(0x3, "sd0", "cmd"),
  80. MPP_FUNCTION(0x4, "spi0", "cs1"),
  81. MPP_FUNCTION(0x5, "sata1", "prsnt"),
  82. MPP_FUNCTION(0x6, "spi1", "cs1")),
  83. MPP_MODE(12,
  84. MPP_FUNCTION(0x0, "gpio", NULL),
  85. MPP_FUNCTION(0x1, "ge0", "rxd1"),
  86. MPP_FUNCTION(0x2, "i2c1", "sda"),
  87. MPP_FUNCTION(0x3, "sd0", "d0"),
  88. MPP_FUNCTION(0x4, "spi1", "cs0"),
  89. MPP_FUNCTION(0x5, "audio", "spdifi")),
  90. MPP_MODE(13,
  91. MPP_FUNCTION(0x0, "gpio", NULL),
  92. MPP_FUNCTION(0x1, "ge0", "rxd2"),
  93. MPP_FUNCTION(0x2, "i2c1", "sck"),
  94. MPP_FUNCTION(0x3, "sd0", "d1"),
  95. MPP_FUNCTION(0x4, "tdm", "pclk"),
  96. MPP_FUNCTION(0x5, "audio", "rmclk")),
  97. MPP_MODE(14,
  98. MPP_FUNCTION(0x0, "gpio", NULL),
  99. MPP_FUNCTION(0x1, "ge0", "rxd3"),
  100. MPP_FUNCTION(0x2, "pcie", "clkreq0"),
  101. MPP_FUNCTION(0x3, "sd0", "d2"),
  102. MPP_FUNCTION(0x4, "spi1", "mosi"),
  103. MPP_FUNCTION(0x5, "spi0", "cs2")),
  104. MPP_MODE(15,
  105. MPP_FUNCTION(0x0, "gpio", NULL),
  106. MPP_FUNCTION(0x1, "ge0", "rxctl"),
  107. MPP_FUNCTION(0x2, "pcie", "clkreq1"),
  108. MPP_FUNCTION(0x3, "sd0", "d3"),
  109. MPP_FUNCTION(0x4, "spi1", "miso"),
  110. MPP_FUNCTION(0x5, "spi0", "cs3")),
  111. MPP_MODE(16,
  112. MPP_FUNCTION(0x0, "gpio", NULL),
  113. MPP_FUNCTION(0x1, "ge0", "rxclk"),
  114. MPP_FUNCTION(0x2, "uart1", "rxd"),
  115. MPP_FUNCTION(0x4, "tdm", "int"),
  116. MPP_FUNCTION(0x5, "audio", "extclk")),
  117. MPP_MODE(17,
  118. MPP_FUNCTION(0x0, "gpo", NULL),
  119. MPP_FUNCTION(0x1, "ge", "mdc")),
  120. MPP_MODE(18,
  121. MPP_FUNCTION(0x0, "gpio", NULL),
  122. MPP_FUNCTION(0x1, "ge", "mdio")),
  123. MPP_MODE(19,
  124. MPP_FUNCTION(0x0, "gpio", NULL),
  125. MPP_FUNCTION(0x1, "ge0", "txclk"),
  126. MPP_FUNCTION(0x2, "ge1", "txclkout"),
  127. MPP_FUNCTION(0x4, "tdm", "pclk")),
  128. MPP_MODE(20,
  129. MPP_FUNCTION(0x0, "gpo", NULL),
  130. MPP_FUNCTION(0x1, "ge0", "txd4"),
  131. MPP_FUNCTION(0x2, "ge1", "txd0")),
  132. MPP_MODE(21,
  133. MPP_FUNCTION(0x0, "gpo", NULL),
  134. MPP_FUNCTION(0x1, "ge0", "txd5"),
  135. MPP_FUNCTION(0x2, "ge1", "txd1"),
  136. MPP_FUNCTION(0x4, "uart1", "txd")),
  137. MPP_MODE(22,
  138. MPP_FUNCTION(0x0, "gpo", NULL),
  139. MPP_FUNCTION(0x1, "ge0", "txd6"),
  140. MPP_FUNCTION(0x2, "ge1", "txd2"),
  141. MPP_FUNCTION(0x4, "uart0", "rts")),
  142. MPP_MODE(23,
  143. MPP_FUNCTION(0x0, "gpo", NULL),
  144. MPP_FUNCTION(0x1, "ge0", "txd7"),
  145. MPP_FUNCTION(0x2, "ge1", "txd3"),
  146. MPP_FUNCTION(0x4, "spi1", "mosi")),
  147. MPP_MODE(24,
  148. MPP_FUNCTION(0x0, "gpio", NULL),
  149. MPP_FUNCTION(0x1, "ge0", "col"),
  150. MPP_FUNCTION(0x2, "ge1", "txctl"),
  151. MPP_FUNCTION(0x4, "spi1", "cs0")),
  152. MPP_MODE(25,
  153. MPP_FUNCTION(0x0, "gpio", NULL),
  154. MPP_FUNCTION(0x1, "ge0", "rxerr"),
  155. MPP_FUNCTION(0x2, "ge1", "rxd0"),
  156. MPP_FUNCTION(0x4, "uart1", "rxd")),
  157. MPP_MODE(26,
  158. MPP_FUNCTION(0x0, "gpio", NULL),
  159. MPP_FUNCTION(0x1, "ge0", "crs"),
  160. MPP_FUNCTION(0x2, "ge1", "rxd1"),
  161. MPP_FUNCTION(0x4, "spi1", "miso")),
  162. MPP_MODE(27,
  163. MPP_FUNCTION(0x0, "gpio", NULL),
  164. MPP_FUNCTION(0x1, "ge0", "rxd4"),
  165. MPP_FUNCTION(0x2, "ge1", "rxd2"),
  166. MPP_FUNCTION(0x4, "uart0", "cts")),
  167. MPP_MODE(28,
  168. MPP_FUNCTION(0x0, "gpio", NULL),
  169. MPP_FUNCTION(0x1, "ge0", "rxd5"),
  170. MPP_FUNCTION(0x2, "ge1", "rxd3")),
  171. MPP_MODE(29,
  172. MPP_FUNCTION(0x0, "gpio", NULL),
  173. MPP_FUNCTION(0x1, "ge0", "rxd6"),
  174. MPP_FUNCTION(0x2, "ge1", "rxctl"),
  175. MPP_FUNCTION(0x4, "i2c1", "sda")),
  176. MPP_MODE(30,
  177. MPP_FUNCTION(0x0, "gpio", NULL),
  178. MPP_FUNCTION(0x1, "ge0", "rxd7"),
  179. MPP_FUNCTION(0x2, "ge1", "rxclk"),
  180. MPP_FUNCTION(0x4, "i2c1", "sck")),
  181. MPP_MODE(31,
  182. MPP_FUNCTION(0x0, "gpio", NULL),
  183. MPP_FUNCTION(0x3, "tclk", NULL),
  184. MPP_FUNCTION(0x4, "ge0", "txerr")),
  185. MPP_MODE(32,
  186. MPP_FUNCTION(0x0, "gpio", NULL),
  187. MPP_FUNCTION(0x1, "spi0", "cs0")),
  188. MPP_MODE(33,
  189. MPP_FUNCTION(0x0, "gpio", NULL),
  190. MPP_FUNCTION(0x1, "dev", "bootcs"),
  191. MPP_FUNCTION(0x2, "spi0", "cs0")),
  192. MPP_MODE(34,
  193. MPP_FUNCTION(0x0, "gpo", NULL),
  194. MPP_FUNCTION(0x1, "dev", "we0"),
  195. MPP_FUNCTION(0x2, "spi0", "mosi")),
  196. MPP_MODE(35,
  197. MPP_FUNCTION(0x0, "gpo", NULL),
  198. MPP_FUNCTION(0x1, "dev", "oe"),
  199. MPP_FUNCTION(0x2, "spi0", "sck")),
  200. MPP_MODE(36,
  201. MPP_FUNCTION(0x0, "gpo", NULL),
  202. MPP_FUNCTION(0x1, "dev", "a1"),
  203. MPP_FUNCTION(0x2, "spi0", "miso")),
  204. MPP_MODE(37,
  205. MPP_FUNCTION(0x0, "gpo", NULL),
  206. MPP_FUNCTION(0x1, "dev", "a0"),
  207. MPP_FUNCTION(0x2, "sata0", "prsnt")),
  208. MPP_MODE(38,
  209. MPP_FUNCTION(0x0, "gpio", NULL),
  210. MPP_FUNCTION(0x1, "dev", "ready"),
  211. MPP_FUNCTION(0x2, "uart1", "cts"),
  212. MPP_FUNCTION(0x3, "uart0", "cts")),
  213. MPP_MODE(39,
  214. MPP_FUNCTION(0x0, "gpo", NULL),
  215. MPP_FUNCTION(0x1, "dev", "ad0"),
  216. MPP_FUNCTION(0x2, "audio", "spdifo")),
  217. MPP_MODE(40,
  218. MPP_FUNCTION(0x0, "gpio", NULL),
  219. MPP_FUNCTION(0x1, "dev", "ad1"),
  220. MPP_FUNCTION(0x2, "uart1", "rts"),
  221. MPP_FUNCTION(0x3, "uart0", "rts")),
  222. MPP_MODE(41,
  223. MPP_FUNCTION(0x0, "gpio", NULL),
  224. MPP_FUNCTION(0x1, "dev", "ad2"),
  225. MPP_FUNCTION(0x2, "uart1", "rxd")),
  226. MPP_MODE(42,
  227. MPP_FUNCTION(0x0, "gpo", NULL),
  228. MPP_FUNCTION(0x1, "dev", "ad3"),
  229. MPP_FUNCTION(0x2, "uart1", "txd")),
  230. MPP_MODE(43,
  231. MPP_FUNCTION(0x0, "gpo", NULL),
  232. MPP_FUNCTION(0x1, "dev", "ad4"),
  233. MPP_FUNCTION(0x2, "audio", "bclk")),
  234. MPP_MODE(44,
  235. MPP_FUNCTION(0x0, "gpo", NULL),
  236. MPP_FUNCTION(0x1, "dev", "ad5"),
  237. MPP_FUNCTION(0x2, "audio", "mclk")),
  238. MPP_MODE(45,
  239. MPP_FUNCTION(0x0, "gpo", NULL),
  240. MPP_FUNCTION(0x1, "dev", "ad6"),
  241. MPP_FUNCTION(0x2, "audio", "lrclk")),
  242. MPP_MODE(46,
  243. MPP_FUNCTION(0x0, "gpo", NULL),
  244. MPP_FUNCTION(0x1, "dev", "ad7"),
  245. MPP_FUNCTION(0x2, "audio", "sdo")),
  246. MPP_MODE(47,
  247. MPP_FUNCTION(0x0, "gpo", NULL),
  248. MPP_FUNCTION(0x1, "dev", "ad8"),
  249. MPP_FUNCTION(0x3, "sd0", "clk"),
  250. MPP_FUNCTION(0x5, "audio", "spdifo")),
  251. MPP_MODE(48,
  252. MPP_FUNCTION(0x0, "gpio", NULL),
  253. MPP_FUNCTION(0x1, "dev", "ad9"),
  254. MPP_FUNCTION(0x2, "uart0", "rts"),
  255. MPP_FUNCTION(0x3, "sd0", "cmd"),
  256. MPP_FUNCTION(0x4, "sata1", "prsnt"),
  257. MPP_FUNCTION(0x5, "spi0", "cs1")),
  258. MPP_MODE(49,
  259. MPP_FUNCTION(0x0, "gpio", NULL),
  260. MPP_FUNCTION(0x1, "dev", "ad10"),
  261. MPP_FUNCTION(0x2, "pcie", "clkreq1"),
  262. MPP_FUNCTION(0x3, "sd0", "d0"),
  263. MPP_FUNCTION(0x4, "spi1", "cs0"),
  264. MPP_FUNCTION(0x5, "audio", "spdifi")),
  265. MPP_MODE(50,
  266. MPP_FUNCTION(0x0, "gpio", NULL),
  267. MPP_FUNCTION(0x1, "dev", "ad11"),
  268. MPP_FUNCTION(0x2, "uart0", "cts"),
  269. MPP_FUNCTION(0x3, "sd0", "d1"),
  270. MPP_FUNCTION(0x4, "spi1", "miso"),
  271. MPP_FUNCTION(0x5, "audio", "rmclk")),
  272. MPP_MODE(51,
  273. MPP_FUNCTION(0x0, "gpio", NULL),
  274. MPP_FUNCTION(0x1, "dev", "ad12"),
  275. MPP_FUNCTION(0x2, "i2c1", "sda"),
  276. MPP_FUNCTION(0x3, "sd0", "d2"),
  277. MPP_FUNCTION(0x4, "spi1", "mosi")),
  278. MPP_MODE(52,
  279. MPP_FUNCTION(0x0, "gpio", NULL),
  280. MPP_FUNCTION(0x1, "dev", "ad13"),
  281. MPP_FUNCTION(0x2, "i2c1", "sck"),
  282. MPP_FUNCTION(0x3, "sd0", "d3"),
  283. MPP_FUNCTION(0x4, "spi1", "sck")),
  284. MPP_MODE(53,
  285. MPP_FUNCTION(0x0, "gpio", NULL),
  286. MPP_FUNCTION(0x1, "dev", "ad14"),
  287. MPP_FUNCTION(0x2, "sd0", "clk"),
  288. MPP_FUNCTION(0x3, "tdm", "pclk"),
  289. MPP_FUNCTION(0x4, "spi0", "cs2"),
  290. MPP_FUNCTION(0x5, "pcie", "clkreq1")),
  291. MPP_MODE(54,
  292. MPP_FUNCTION(0x0, "gpo", NULL),
  293. MPP_FUNCTION(0x1, "dev", "ad15"),
  294. MPP_FUNCTION(0x3, "tdm", "dtx")),
  295. MPP_MODE(55,
  296. MPP_FUNCTION(0x0, "gpio", NULL),
  297. MPP_FUNCTION(0x1, "dev", "cs1"),
  298. MPP_FUNCTION(0x2, "uart1", "txd"),
  299. MPP_FUNCTION(0x3, "tdm", "rst"),
  300. MPP_FUNCTION(0x4, "sata1", "prsnt"),
  301. MPP_FUNCTION(0x5, "sata0", "prsnt")),
  302. MPP_MODE(56,
  303. MPP_FUNCTION(0x0, "gpio", NULL),
  304. MPP_FUNCTION(0x1, "dev", "cs2"),
  305. MPP_FUNCTION(0x2, "uart1", "cts"),
  306. MPP_FUNCTION(0x3, "uart0", "cts"),
  307. MPP_FUNCTION(0x4, "spi0", "cs3"),
  308. MPP_FUNCTION(0x5, "pcie", "clkreq0"),
  309. MPP_FUNCTION(0x6, "spi1", "cs1")),
  310. MPP_MODE(57,
  311. MPP_FUNCTION(0x0, "gpio", NULL),
  312. MPP_FUNCTION(0x1, "dev", "cs3"),
  313. MPP_FUNCTION(0x2, "uart1", "rxd"),
  314. MPP_FUNCTION(0x3, "tdm", "fsync"),
  315. MPP_FUNCTION(0x4, "sata0", "prsnt"),
  316. MPP_FUNCTION(0x5, "audio", "sdo")),
  317. MPP_MODE(58,
  318. MPP_FUNCTION(0x0, "gpio", NULL),
  319. MPP_FUNCTION(0x1, "dev", "cs0"),
  320. MPP_FUNCTION(0x2, "uart1", "rts"),
  321. MPP_FUNCTION(0x3, "tdm", "int"),
  322. MPP_FUNCTION(0x5, "audio", "extclk"),
  323. MPP_FUNCTION(0x6, "uart0", "rts")),
  324. MPP_MODE(59,
  325. MPP_FUNCTION(0x0, "gpo", NULL),
  326. MPP_FUNCTION(0x1, "dev", "ale0"),
  327. MPP_FUNCTION(0x2, "uart1", "rts"),
  328. MPP_FUNCTION(0x3, "uart0", "rts"),
  329. MPP_FUNCTION(0x5, "audio", "bclk")),
  330. MPP_MODE(60,
  331. MPP_FUNCTION(0x0, "gpio", NULL),
  332. MPP_FUNCTION(0x1, "dev", "ale1"),
  333. MPP_FUNCTION(0x2, "uart1", "rxd"),
  334. MPP_FUNCTION(0x3, "sata0", "prsnt"),
  335. MPP_FUNCTION(0x4, "pcie", "rstout"),
  336. MPP_FUNCTION(0x5, "audio", "sdi")),
  337. MPP_MODE(61,
  338. MPP_FUNCTION(0x0, "gpo", NULL),
  339. MPP_FUNCTION(0x1, "dev", "we1"),
  340. MPP_FUNCTION(0x2, "uart1", "txd"),
  341. MPP_FUNCTION(0x5, "audio", "lrclk")),
  342. MPP_MODE(62,
  343. MPP_FUNCTION(0x0, "gpio", NULL),
  344. MPP_FUNCTION(0x1, "dev", "a2"),
  345. MPP_FUNCTION(0x2, "uart1", "cts"),
  346. MPP_FUNCTION(0x3, "tdm", "drx"),
  347. MPP_FUNCTION(0x4, "pcie", "clkreq0"),
  348. MPP_FUNCTION(0x5, "audio", "mclk"),
  349. MPP_FUNCTION(0x6, "uart0", "cts")),
  350. MPP_MODE(63,
  351. MPP_FUNCTION(0x0, "gpio", NULL),
  352. MPP_FUNCTION(0x1, "spi0", "sck"),
  353. MPP_FUNCTION(0x2, "tclk", NULL)),
  354. MPP_MODE(64,
  355. MPP_FUNCTION(0x0, "gpio", NULL),
  356. MPP_FUNCTION(0x1, "spi0", "miso"),
  357. MPP_FUNCTION(0x2, "spi0", "cs1")),
  358. MPP_MODE(65,
  359. MPP_FUNCTION(0x0, "gpio", NULL),
  360. MPP_FUNCTION(0x1, "spi0", "mosi"),
  361. MPP_FUNCTION(0x2, "spi0", "cs2")),
  362. };
  363. static struct mvebu_pinctrl_soc_info armada_370_pinctrl_info;
  364. static const struct of_device_id armada_370_pinctrl_of_match[] = {
  365. { .compatible = "marvell,mv88f6710-pinctrl" },
  366. { },
  367. };
  368. static const struct mvebu_mpp_ctrl mv88f6710_mpp_controls[] = {
  369. MPP_FUNC_CTRL(0, 65, NULL, mvebu_mmio_mpp_ctrl),
  370. };
  371. static struct pinctrl_gpio_range mv88f6710_mpp_gpio_ranges[] = {
  372. MPP_GPIO_RANGE(0, 0, 0, 32),
  373. MPP_GPIO_RANGE(1, 32, 32, 32),
  374. MPP_GPIO_RANGE(2, 64, 64, 2),
  375. };
  376. static int armada_370_pinctrl_probe(struct platform_device *pdev)
  377. {
  378. struct mvebu_pinctrl_soc_info *soc = &armada_370_pinctrl_info;
  379. soc->variant = 0; /* no variants for Armada 370 */
  380. soc->controls = mv88f6710_mpp_controls;
  381. soc->ncontrols = ARRAY_SIZE(mv88f6710_mpp_controls);
  382. soc->modes = mv88f6710_mpp_modes;
  383. soc->nmodes = ARRAY_SIZE(mv88f6710_mpp_modes);
  384. soc->gpioranges = mv88f6710_mpp_gpio_ranges;
  385. soc->ngpioranges = ARRAY_SIZE(mv88f6710_mpp_gpio_ranges);
  386. pdev->dev.platform_data = soc;
  387. return mvebu_pinctrl_simple_mmio_probe(pdev);
  388. }
  389. static struct platform_driver armada_370_pinctrl_driver = {
  390. .driver = {
  391. .name = "armada-370-pinctrl",
  392. .of_match_table = armada_370_pinctrl_of_match,
  393. },
  394. .probe = armada_370_pinctrl_probe,
  395. };
  396. builtin_platform_driver(armada_370_pinctrl_driver);