pinctrl-armada-370.c 13 KB

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