18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Marvell Armada 380/385 pinctrl driver based on mvebu pinctrl core 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2013 Marvell 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/err.h> 118c2ecf20Sopenharmony_ci#include <linux/init.h> 128c2ecf20Sopenharmony_ci#include <linux/io.h> 138c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 148c2ecf20Sopenharmony_ci#include <linux/of.h> 158c2ecf20Sopenharmony_ci#include <linux/of_device.h> 168c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#include "pinctrl-mvebu.h" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cienum { 218c2ecf20Sopenharmony_ci V_88F6810 = BIT(0), 228c2ecf20Sopenharmony_ci V_88F6820 = BIT(1), 238c2ecf20Sopenharmony_ci V_88F6828 = BIT(2), 248c2ecf20Sopenharmony_ci V_88F6810_PLUS = (V_88F6810 | V_88F6820 | V_88F6828), 258c2ecf20Sopenharmony_ci V_88F6820_PLUS = (V_88F6820 | V_88F6828), 268c2ecf20Sopenharmony_ci}; 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_cistatic struct mvebu_mpp_mode armada_38x_mpp_modes[] = { 298c2ecf20Sopenharmony_ci MPP_MODE(0, 308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua0", "rxd", V_88F6810_PLUS)), 328c2ecf20Sopenharmony_ci MPP_MODE(1, 338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 348c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua0", "txd", V_88F6810_PLUS)), 358c2ecf20Sopenharmony_ci MPP_MODE(2, 368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "i2c0", "sck", V_88F6810_PLUS)), 388c2ecf20Sopenharmony_ci MPP_MODE(3, 398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "i2c0", "sda", V_88F6810_PLUS)), 418c2ecf20Sopenharmony_ci MPP_MODE(4, 428c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge", "mdc", V_88F6810_PLUS), 448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ua1", "txd", V_88F6810_PLUS), 458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "rts", V_88F6810_PLUS)), 468c2ecf20Sopenharmony_ci MPP_MODE(5, 478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge", "mdio", V_88F6810_PLUS), 498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ua1", "rxd", V_88F6810_PLUS), 508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "cts", V_88F6810_PLUS)), 518c2ecf20Sopenharmony_ci MPP_MODE(6, 528c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txclkout", V_88F6810_PLUS), 548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge0", "crs", V_88F6810_PLUS), 558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "cs3", V_88F6810_PLUS)), 568c2ecf20Sopenharmony_ci MPP_MODE(7, 578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 588c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txd0", V_88F6810_PLUS), 598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad9", V_88F6810_PLUS)), 608c2ecf20Sopenharmony_ci MPP_MODE(8, 618c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txd1", V_88F6810_PLUS), 638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad10", V_88F6810_PLUS)), 648c2ecf20Sopenharmony_ci MPP_MODE(9, 658c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txd2", V_88F6810_PLUS), 678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad11", V_88F6810_PLUS)), 688c2ecf20Sopenharmony_ci MPP_MODE(10, 698c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txd3", V_88F6810_PLUS), 718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad12", V_88F6810_PLUS)), 728c2ecf20Sopenharmony_ci MPP_MODE(11, 738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txctl", V_88F6810_PLUS), 758c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad13", V_88F6810_PLUS)), 768c2ecf20Sopenharmony_ci MPP_MODE(12, 778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 788c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxd0", V_88F6810_PLUS), 798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "pcie0", "rstout", V_88F6810_PLUS), 808c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "cs1", V_88F6810_PLUS), 818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad14", V_88F6810_PLUS), 828c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie3", "clkreq", V_88F6810_PLUS)), 838c2ecf20Sopenharmony_ci MPP_MODE(13, 848c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 858c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxd1", V_88F6810_PLUS), 868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "pcie0", "clkreq", V_88F6810_PLUS), 878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "pcie1", "clkreq", V_88F6820_PLUS), 888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "cs2", V_88F6810_PLUS), 898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad15", V_88F6810_PLUS), 908c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie2", "clkreq", V_88F6810_PLUS)), 918c2ecf20Sopenharmony_ci MPP_MODE(14, 928c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxd2", V_88F6810_PLUS), 948c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS), 958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "dram", "vttctrl", V_88F6810_PLUS), 968c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "cs3", V_88F6810_PLUS), 978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "we1", V_88F6810_PLUS), 988c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie3", "clkreq", V_88F6810_PLUS)), 998c2ecf20Sopenharmony_ci MPP_MODE(15, 1008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxd3", V_88F6810_PLUS), 1028c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge", "mdc slave", V_88F6810_PLUS), 1038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "pcie0", "rstout", V_88F6810_PLUS), 1048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "mosi", V_88F6810_PLUS)), 1058c2ecf20Sopenharmony_ci MPP_MODE(16, 1068c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1078c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxctl", V_88F6810_PLUS), 1088c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge", "mdio slave", V_88F6810_PLUS), 1098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "dram", "deccerr", V_88F6810_PLUS), 1108c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "miso", V_88F6810_PLUS), 1118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "pcie0", "clkreq", V_88F6810_PLUS), 1128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie1", "clkreq", V_88F6820_PLUS)), 1138c2ecf20Sopenharmony_ci MPP_MODE(17, 1148c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1158c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxclk", V_88F6810_PLUS), 1168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS), 1178c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua1", "rxd", V_88F6810_PLUS), 1188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "sck", V_88F6810_PLUS), 1198c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sata1", "prsnt", V_88F6810_PLUS), 1208c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "sata0", "prsnt", V_88F6810_PLUS)), 1218c2ecf20Sopenharmony_ci MPP_MODE(18, 1228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1238c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "rxerr", V_88F6810_PLUS), 1248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ptp", "trig", V_88F6810_PLUS), 1258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua1", "txd", V_88F6810_PLUS), 1268c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi0", "cs0", V_88F6810_PLUS)), 1278c2ecf20Sopenharmony_ci MPP_MODE(19, 1288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "col", V_88F6810_PLUS), 1308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ptp", "evreq", V_88F6810_PLUS), 1318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ge0", "txerr", V_88F6810_PLUS), 1328c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sata1", "prsnt", V_88F6810_PLUS), 1338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "ua0", "cts", V_88F6810_PLUS), 1348c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "rxd", V_88F6810_PLUS)), 1358c2ecf20Sopenharmony_ci MPP_MODE(20, 1368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ge0", "txclk", V_88F6810_PLUS), 1388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ptp", "clk", V_88F6810_PLUS), 1398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sata0", "prsnt", V_88F6810_PLUS), 1408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "ua0", "rts", V_88F6810_PLUS), 1418c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "txd", V_88F6810_PLUS)), 1428c2ecf20Sopenharmony_ci MPP_MODE(21, 1438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "cs1", V_88F6810_PLUS), 1458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxd0", V_88F6810_PLUS), 1468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "sata0", "prsnt", V_88F6810_PLUS), 1478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "cmd", V_88F6810_PLUS), 1488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "bootcs", V_88F6810_PLUS), 1498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "sata1", "prsnt", V_88F6810_PLUS)), 1508c2ecf20Sopenharmony_ci MPP_MODE(22, 1518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1528c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "mosi", V_88F6810_PLUS), 1538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad0", V_88F6810_PLUS)), 1548c2ecf20Sopenharmony_ci MPP_MODE(23, 1558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1568c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "sck", V_88F6810_PLUS), 1578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad2", V_88F6810_PLUS)), 1588c2ecf20Sopenharmony_ci MPP_MODE(24, 1598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "miso", V_88F6810_PLUS), 1618c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ua0", "cts", V_88F6810_PLUS), 1628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua1", "rxd", V_88F6810_PLUS), 1638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d4", V_88F6810_PLUS), 1648c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ready", V_88F6810_PLUS)), 1658c2ecf20Sopenharmony_ci MPP_MODE(25, 1668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "cs0", V_88F6810_PLUS), 1688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ua0", "rts", V_88F6810_PLUS), 1698c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua1", "txd", V_88F6810_PLUS), 1708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d5", V_88F6810_PLUS), 1718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "cs0", V_88F6810_PLUS)), 1728c2ecf20Sopenharmony_ci MPP_MODE(26, 1738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "cs2", V_88F6810_PLUS), 1758c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "i2c1", "sck", V_88F6810_PLUS), 1768c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d6", V_88F6810_PLUS), 1778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "cs1", V_88F6810_PLUS)), 1788c2ecf20Sopenharmony_ci MPP_MODE(27, 1798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1808c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "spi0", "cs3", V_88F6810_PLUS), 1818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txclkout", V_88F6810_PLUS), 1828c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "i2c1", "sda", V_88F6810_PLUS), 1838c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d7", V_88F6810_PLUS), 1848c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "cs2", V_88F6810_PLUS)), 1858c2ecf20Sopenharmony_ci MPP_MODE(28, 1868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txd0", V_88F6810_PLUS), 1888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "clk", V_88F6810_PLUS), 1898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad5", V_88F6810_PLUS)), 1908c2ecf20Sopenharmony_ci MPP_MODE(29, 1918c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1928c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txd1", V_88F6810_PLUS), 1938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ale0", V_88F6810_PLUS)), 1948c2ecf20Sopenharmony_ci MPP_MODE(30, 1958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 1968c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txd2", V_88F6810_PLUS), 1978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "oe", V_88F6810_PLUS)), 1988c2ecf20Sopenharmony_ci MPP_MODE(31, 1998c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txd3", V_88F6810_PLUS), 2018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ale1", V_88F6810_PLUS)), 2028c2ecf20Sopenharmony_ci MPP_MODE(32, 2038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "txctl", V_88F6810_PLUS), 2058c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "we0", V_88F6810_PLUS)), 2068c2ecf20Sopenharmony_ci MPP_MODE(33, 2078c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2088c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "dram", "deccerr", V_88F6810_PLUS), 2098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad3", V_88F6810_PLUS)), 2108c2ecf20Sopenharmony_ci MPP_MODE(34, 2118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad1", V_88F6810_PLUS)), 2138c2ecf20Sopenharmony_ci MPP_MODE(35, 2148c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2158c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ref", "clk_out1", V_88F6810_PLUS), 2168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "a1", V_88F6810_PLUS)), 2178c2ecf20Sopenharmony_ci MPP_MODE(36, 2188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2198c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ptp", "trig", V_88F6810_PLUS), 2208c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "a0", V_88F6810_PLUS)), 2218c2ecf20Sopenharmony_ci MPP_MODE(37, 2228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2238c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ptp", "clk", V_88F6810_PLUS), 2248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxclk", V_88F6810_PLUS), 2258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d3", V_88F6810_PLUS), 2268c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad8", V_88F6810_PLUS)), 2278c2ecf20Sopenharmony_ci MPP_MODE(38, 2288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ptp", "evreq", V_88F6810_PLUS), 2308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxd1", V_88F6810_PLUS), 2318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ref", "clk_out0", V_88F6810_PLUS), 2328c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d0", V_88F6810_PLUS), 2338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad4", V_88F6810_PLUS)), 2348c2ecf20Sopenharmony_ci MPP_MODE(39, 2358c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "i2c1", "sck", V_88F6810_PLUS), 2378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxd2", V_88F6810_PLUS), 2388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "cts", V_88F6810_PLUS), 2398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d1", V_88F6810_PLUS), 2408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "a2", V_88F6810_PLUS)), 2418c2ecf20Sopenharmony_ci MPP_MODE(40, 2428c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "i2c1", "sda", V_88F6810_PLUS), 2448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxd3", V_88F6810_PLUS), 2458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "rts", V_88F6810_PLUS), 2468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sd0", "d2", V_88F6810_PLUS), 2478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad6", V_88F6810_PLUS)), 2488c2ecf20Sopenharmony_ci MPP_MODE(41, 2498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua1", "rxd", V_88F6810_PLUS), 2518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge1", "rxctl", V_88F6810_PLUS), 2528c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "cts", V_88F6810_PLUS), 2538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "cs3", V_88F6810_PLUS), 2548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "burst/last", V_88F6810_PLUS), 2558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "nand", "rb0", V_88F6810_PLUS)), 2568c2ecf20Sopenharmony_ci MPP_MODE(42, 2578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2588c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua1", "txd", V_88F6810_PLUS), 2598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "ua0", "rts", V_88F6810_PLUS), 2608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "ad7", V_88F6810_PLUS)), 2618c2ecf20Sopenharmony_ci MPP_MODE(43, 2628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "pcie0", "clkreq", V_88F6810_PLUS), 2648c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "dram", "vttctrl", V_88F6810_PLUS), 2658c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "dram", "deccerr", V_88F6810_PLUS), 2668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "cs2", V_88F6810_PLUS), 2678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dev", "clkout", V_88F6810_PLUS), 2688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "nand", "rb1", V_88F6810_PLUS)), 2698c2ecf20Sopenharmony_ci MPP_MODE(44, 2708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata0", "prsnt", V_88F6810_PLUS), 2728c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "sata1", "prsnt", V_88F6810_PLUS), 2738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "sata2", "prsnt", V_88F6828), 2748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "sata3", "prsnt", V_88F6828)), 2758c2ecf20Sopenharmony_ci MPP_MODE(45, 2768c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ref", "clk_out0", V_88F6810_PLUS), 2788c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "pcie0", "rstout", V_88F6810_PLUS), 2798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "rxd", V_88F6810_PLUS)), 2808c2ecf20Sopenharmony_ci MPP_MODE(46, 2818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2828c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ref", "clk_out1", V_88F6810_PLUS), 2838c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "pcie0", "rstout", V_88F6810_PLUS), 2848c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "txd", V_88F6810_PLUS)), 2858c2ecf20Sopenharmony_ci MPP_MODE(47, 2868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata0", "prsnt", V_88F6810_PLUS), 2888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "sata1", "prsnt", V_88F6810_PLUS), 2898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "sata2", "prsnt", V_88F6828), 2908c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sata3", "prsnt", V_88F6828)), 2918c2ecf20Sopenharmony_ci MPP_MODE(48, 2928c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 2938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata0", "prsnt", V_88F6810_PLUS), 2948c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "dram", "vttctrl", V_88F6810_PLUS), 2958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "pclk", V_88F6810_PLUS), 2968c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "mclk", V_88F6810_PLUS), 2978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d4", V_88F6810_PLUS), 2988c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie0", "clkreq", V_88F6810_PLUS)), 2998c2ecf20Sopenharmony_ci MPP_MODE(49, 3008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata2", "prsnt", V_88F6828), 3028c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "sata3", "prsnt", V_88F6828), 3038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "fsync", V_88F6810_PLUS), 3048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "lrclk", V_88F6810_PLUS), 3058c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d5", V_88F6810_PLUS), 3068c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "pcie1", "clkreq", V_88F6820_PLUS)), 3078c2ecf20Sopenharmony_ci MPP_MODE(50, 3088c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "pcie0", "rstout", V_88F6810_PLUS), 3108c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "drx", V_88F6810_PLUS), 3118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "extclk", V_88F6810_PLUS), 3128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "cmd", V_88F6810_PLUS)), 3138c2ecf20Sopenharmony_ci MPP_MODE(51, 3148c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3158c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "dtx", V_88F6810_PLUS), 3168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "sdo", V_88F6810_PLUS), 3178c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "dram", "deccerr", V_88F6810_PLUS), 3188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ptp", "trig", V_88F6810_PLUS)), 3198c2ecf20Sopenharmony_ci MPP_MODE(52, 3208c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3218c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "pcie0", "rstout", V_88F6810_PLUS), 3228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "int", V_88F6810_PLUS), 3238c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "sdi", V_88F6810_PLUS), 3248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d6", V_88F6810_PLUS), 3258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ptp", "clk", V_88F6810_PLUS)), 3268c2ecf20Sopenharmony_ci MPP_MODE(53, 3278c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata1", "prsnt", V_88F6810_PLUS), 3298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "sata0", "prsnt", V_88F6810_PLUS), 3308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "tdm", "rst", V_88F6810_PLUS), 3318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "audio", "bclk", V_88F6810_PLUS), 3328c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d7", V_88F6810_PLUS), 3338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ptp", "evreq", V_88F6810_PLUS)), 3348c2ecf20Sopenharmony_ci MPP_MODE(54, 3358c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "sata0", "prsnt", V_88F6810_PLUS), 3378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "sata1", "prsnt", V_88F6810_PLUS), 3388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "pcie0", "rstout", V_88F6810_PLUS), 3398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "ge0", "txerr", V_88F6810_PLUS), 3408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d3", V_88F6810_PLUS)), 3418c2ecf20Sopenharmony_ci MPP_MODE(55, 3428c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua1", "cts", V_88F6810_PLUS), 3448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge", "mdio", V_88F6810_PLUS), 3458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "pcie1", "clkreq", V_88F6820_PLUS), 3468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "cs1", V_88F6810_PLUS), 3478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d0", V_88F6810_PLUS), 3488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "rxd", V_88F6810_PLUS)), 3498c2ecf20Sopenharmony_ci MPP_MODE(56, 3508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "ua1", "rts", V_88F6810_PLUS), 3528c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "ge", "mdc", V_88F6810_PLUS), 3538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "dram", "deccerr", V_88F6810_PLUS), 3548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "mosi", V_88F6810_PLUS), 3558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "txd", V_88F6810_PLUS)), 3568c2ecf20Sopenharmony_ci MPP_MODE(57, 3578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3588c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "sck", V_88F6810_PLUS), 3598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "clk", V_88F6810_PLUS), 3608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "txd", V_88F6810_PLUS)), 3618c2ecf20Sopenharmony_ci MPP_MODE(58, 3628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "pcie1", "clkreq", V_88F6820_PLUS), 3648c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "i2c1", "sck", V_88F6810_PLUS), 3658c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(3, "pcie2", "clkreq", V_88F6810_PLUS), 3668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "miso", V_88F6810_PLUS), 3678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d1", V_88F6810_PLUS), 3688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(6, "ua1", "rxd", V_88F6810_PLUS)), 3698c2ecf20Sopenharmony_ci MPP_MODE(59, 3708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0, "gpio", NULL, V_88F6810_PLUS), 3718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(1, "pcie0", "rstout", V_88F6810_PLUS), 3728c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(2, "i2c1", "sda", V_88F6810_PLUS), 3738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(4, "spi1", "cs0", V_88F6810_PLUS), 3748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(5, "sd0", "d2", V_88F6810_PLUS)), 3758c2ecf20Sopenharmony_ci}; 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info armada_38x_pinctrl_info; 3788c2ecf20Sopenharmony_ci 3798c2ecf20Sopenharmony_cistatic const struct of_device_id armada_38x_pinctrl_of_match[] = { 3808c2ecf20Sopenharmony_ci { 3818c2ecf20Sopenharmony_ci .compatible = "marvell,mv88f6810-pinctrl", 3828c2ecf20Sopenharmony_ci .data = (void *) V_88F6810, 3838c2ecf20Sopenharmony_ci }, 3848c2ecf20Sopenharmony_ci { 3858c2ecf20Sopenharmony_ci .compatible = "marvell,mv88f6820-pinctrl", 3868c2ecf20Sopenharmony_ci .data = (void *) V_88F6820, 3878c2ecf20Sopenharmony_ci }, 3888c2ecf20Sopenharmony_ci { 3898c2ecf20Sopenharmony_ci .compatible = "marvell,mv88f6828-pinctrl", 3908c2ecf20Sopenharmony_ci .data = (void *) V_88F6828, 3918c2ecf20Sopenharmony_ci }, 3928c2ecf20Sopenharmony_ci { }, 3938c2ecf20Sopenharmony_ci}; 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_cistatic const struct mvebu_mpp_ctrl armada_38x_mpp_controls[] = { 3968c2ecf20Sopenharmony_ci MPP_FUNC_CTRL(0, 59, NULL, mvebu_mmio_mpp_ctrl), 3978c2ecf20Sopenharmony_ci}; 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_cistatic struct pinctrl_gpio_range armada_38x_mpp_gpio_ranges[] = { 4008c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(0, 0, 0, 32), 4018c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(1, 32, 32, 28), 4028c2ecf20Sopenharmony_ci}; 4038c2ecf20Sopenharmony_ci 4048c2ecf20Sopenharmony_cistatic int armada_38x_pinctrl_probe(struct platform_device *pdev) 4058c2ecf20Sopenharmony_ci{ 4068c2ecf20Sopenharmony_ci struct mvebu_pinctrl_soc_info *soc = &armada_38x_pinctrl_info; 4078c2ecf20Sopenharmony_ci const struct of_device_id *match = 4088c2ecf20Sopenharmony_ci of_match_device(armada_38x_pinctrl_of_match, &pdev->dev); 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_ci if (!match) 4118c2ecf20Sopenharmony_ci return -ENODEV; 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci soc->variant = (unsigned) match->data & 0xff; 4148c2ecf20Sopenharmony_ci soc->controls = armada_38x_mpp_controls; 4158c2ecf20Sopenharmony_ci soc->ncontrols = ARRAY_SIZE(armada_38x_mpp_controls); 4168c2ecf20Sopenharmony_ci soc->gpioranges = armada_38x_mpp_gpio_ranges; 4178c2ecf20Sopenharmony_ci soc->ngpioranges = ARRAY_SIZE(armada_38x_mpp_gpio_ranges); 4188c2ecf20Sopenharmony_ci soc->modes = armada_38x_mpp_modes; 4198c2ecf20Sopenharmony_ci soc->nmodes = armada_38x_mpp_controls[0].npins; 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci pdev->dev.platform_data = soc; 4228c2ecf20Sopenharmony_ci 4238c2ecf20Sopenharmony_ci return mvebu_pinctrl_simple_mmio_probe(pdev); 4248c2ecf20Sopenharmony_ci} 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_cistatic struct platform_driver armada_38x_pinctrl_driver = { 4278c2ecf20Sopenharmony_ci .driver = { 4288c2ecf20Sopenharmony_ci .name = "armada-38x-pinctrl", 4298c2ecf20Sopenharmony_ci .of_match_table = of_match_ptr(armada_38x_pinctrl_of_match), 4308c2ecf20Sopenharmony_ci }, 4318c2ecf20Sopenharmony_ci .probe = armada_38x_pinctrl_probe, 4328c2ecf20Sopenharmony_ci}; 4338c2ecf20Sopenharmony_cibuiltin_platform_driver(armada_38x_pinctrl_driver); 434