18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Marvell Armada CP110 pinctrl driver based on mvebu pinctrl core 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2017 Marvell 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Hanna Hawa <hannah@marvell.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/mfd/syscon.h> 148c2ecf20Sopenharmony_ci#include <linux/of.h> 158c2ecf20Sopenharmony_ci#include <linux/of_device.h> 168c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 178c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#include "pinctrl-mvebu.h" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* 228c2ecf20Sopenharmony_ci * Even if the pin controller is the same the MMP available depend on the SoC 238c2ecf20Sopenharmony_ci * integration. 248c2ecf20Sopenharmony_ci * - In Armada7K (single CP) almost all the MPPs are available (except the 258c2ecf20Sopenharmony_ci * MMP 39 to 43) 268c2ecf20Sopenharmony_ci * - In Armada8K (dual CP) the MPPs are split into 2 parts, MPPs 0-31 from 278c2ecf20Sopenharmony_ci * CPS, and MPPs 32-62 from CPM, the below flags (V_ARMADA_8K_CPM, 288c2ecf20Sopenharmony_ci * V_ARMADA_8K_CPS) set which MPP is available to the CPx. 298c2ecf20Sopenharmony_ci * The x_PLUS enum mean that the MPP available for CPx and for Armada70x0 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_cienum { 328c2ecf20Sopenharmony_ci V_ARMADA_7K = BIT(0), 338c2ecf20Sopenharmony_ci V_ARMADA_8K_CPM = BIT(1), 348c2ecf20Sopenharmony_ci V_ARMADA_8K_CPS = BIT(2), 358c2ecf20Sopenharmony_ci V_CP115_STANDALONE = BIT(3), 368c2ecf20Sopenharmony_ci V_ARMADA_7K_8K_CPM = (V_ARMADA_7K | V_ARMADA_8K_CPM), 378c2ecf20Sopenharmony_ci V_ARMADA_7K_8K_CPS = (V_ARMADA_7K | V_ARMADA_8K_CPS), 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cistatic struct mvebu_mpp_mode armada_cp110_mpp_modes[] = { 418c2ecf20Sopenharmony_ci MPP_MODE(0, 428c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 438c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ale1"), 448c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2smclk"), 458c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd3"), 468c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 478c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "ptp", "pulse"), 488c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "mss_i2c", "sda"), 498c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart0", "rxd"), 508c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 518c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio")), 528c2ecf20Sopenharmony_ci MPP_MODE(1, 538c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 548c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ale0"), 558c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sdo_spdifo"), 568c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd2"), 578c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 588c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "ptp", "clk"), 598c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "mss_i2c", "sck"), 608c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart0", "txd"), 618c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 628c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc")), 638c2ecf20Sopenharmony_ci MPP_MODE(2, 648c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 658c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad15"), 668c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sextclk"), 678c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd1"), 688c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 698c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 708c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "ptp", "pclk_out"), 718c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "i2c1", "sck"), 728c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart1", "rxd"), 738c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 748c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "xg", "mdc")), 758c2ecf20Sopenharmony_ci MPP_MODE(3, 768c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 778c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad14"), 788c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2slrclk"), 798c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd0"), 808c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 818c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 828c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "pcie", "rstoutn"), 838c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "i2c1", "sda"), 848c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart1", "txd"), 858c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 868c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "xg", "mdio")), 878c2ecf20Sopenharmony_ci MPP_MODE(4, 888c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 898c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad13"), 908c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sbclk"), 918c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxctl"), 928c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 938c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 948c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart1", "cts"), 958c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "pcie0", "clkreq"), 968c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart3", "rxd"), 978c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc")), 988c2ecf20Sopenharmony_ci MPP_MODE(5, 998c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1008c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad12"), 1018c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sdi"), 1028c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxclk"), 1038c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 1048c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 1058c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart1", "rts"), 1068c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "pcie1", "clkreq"), 1078c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart3", "txd"), 1088c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio")), 1098c2ecf20Sopenharmony_ci MPP_MODE(6, 1108c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1118c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad11"), 1128c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd3"), 1138c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn2"), 1148c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 1158c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sata1", "present_act"), 1168c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "pcie2", "clkreq"), 1178c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart0", "rxd"), 1188c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "ptp", "pulse")), 1198c2ecf20Sopenharmony_ci MPP_MODE(7, 1208c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1218c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad10"), 1228c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd2"), 1238c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn1"), 1248c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn1"), 1258c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 1268c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "led", "data"), 1278c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart0", "txd"), 1288c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "ptp", "clk")), 1298c2ecf20Sopenharmony_ci MPP_MODE(8, 1308c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1318c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad9"), 1328c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd1"), 1338c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn0"), 1348c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn0"), 1358c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart0", "cts"), 1368c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "led", "stb"), 1378c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart2", "rxd"), 1388c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "ptp", "pclk_out"), 1398c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "synce1", "clk")), 1408c2ecf20Sopenharmony_ci MPP_MODE(9, 1418c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1428c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad8"), 1438c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd0"), 1448c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "mosi"), 1458c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "mosi"), 1468c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "pcie", "rstoutn"), 1478c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "synce2", "clk")), 1488c2ecf20Sopenharmony_ci MPP_MODE(10, 1498c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1508c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "readyn"), 1518c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txctl"), 1528c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "miso"), 1538c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "miso"), 1548c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart0", "cts"), 1558c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "sata1", "present_act")), 1568c2ecf20Sopenharmony_ci MPP_MODE(11, 1578c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1588c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "wen1"), 1598c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txclkout"), 1608c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "clk"), 1618c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "clk"), 1628c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart0", "rts"), 1638c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "led", "clk"), 1648c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart2", "txd"), 1658c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act")), 1668c2ecf20Sopenharmony_ci MPP_MODE(12, 1678c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1688c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "clk_out"), 1698c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "nf", "rbn1"), 1708c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "spi1", "csn1"), 1718c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxclk")), 1728c2ecf20Sopenharmony_ci MPP_MODE(13, 1738c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1748c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "burstn"), 1758c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "nf", "rbn0"), 1768c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "spi1", "miso"), 1778c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxctl"), 1788c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "miso")), 1798c2ecf20Sopenharmony_ci MPP_MODE(14, 1808c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1818c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "bootcsn"), 1828c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "dev", "csn0"), 1838c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "spi1", "csn0"), 1848c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn3"), 1858c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 1868c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 1878c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "sata0", "present_act"), 1888c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "csn")), 1898c2ecf20Sopenharmony_ci MPP_MODE(15, 1908c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1918c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad7"), 1928c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "spi1", "mosi"), 1938c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 1948c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "mosi"), 1958c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "ptp", "pulse_cp2cp")), 1968c2ecf20Sopenharmony_ci MPP_MODE(16, 1978c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 1988c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad6"), 1998c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "spi1", "clk"), 2008c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "clk")), 2018c2ecf20Sopenharmony_ci MPP_MODE(17, 2028c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2038c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad5"), 2048c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd3")), 2058c2ecf20Sopenharmony_ci MPP_MODE(18, 2068c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2078c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad4"), 2088c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd2"), 2098c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "ptp", "clk_cp2cp")), 2108c2ecf20Sopenharmony_ci MPP_MODE(19, 2118c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2128c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad3"), 2138c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd1"), 2148c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "out_cp2cp")), 2158c2ecf20Sopenharmony_ci MPP_MODE(20, 2168c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2178c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad2"), 2188c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd0")), 2198c2ecf20Sopenharmony_ci MPP_MODE(21, 2208c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2218c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad1"), 2228c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txctl"), 2238c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "sei", "in_cp2cp")), 2248c2ecf20Sopenharmony_ci MPP_MODE(22, 2258c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2268c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad0"), 2278c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txclkout"), 2288c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "in_cp2cp")), 2298c2ecf20Sopenharmony_ci MPP_MODE(23, 2308c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2318c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "a1"), 2328c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 2338c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "link", "rd_in_cp2cp")), 2348c2ecf20Sopenharmony_ci MPP_MODE(24, 2358c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2368c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "a0"), 2378c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk")), 2388c2ecf20Sopenharmony_ci MPP_MODE(25, 2398c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2408c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "oen"), 2418c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo")), 2428c2ecf20Sopenharmony_ci MPP_MODE(26, 2438c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2448c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "wen0"), 2458c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk")), 2468c2ecf20Sopenharmony_ci MPP_MODE(27, 2478c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2488c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn0"), 2498c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "spi1", "miso"), 2508c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio4", NULL), 2518c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd3"), 2528c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn4"), 2538c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 2548c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 2558c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "uart0", "rts"), 2568c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "rei", "in_cp2cp")), 2578c2ecf20Sopenharmony_ci MPP_MODE(28, 2588c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2598c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn1"), 2608c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "spi1", "csn0"), 2618c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio5", NULL), 2628c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd2"), 2638c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn5"), 2648c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "pcie2", "clkreq"), 2658c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ptp", "pulse"), 2668c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 2678c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 2688c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "uart0", "cts"), 2698c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "led", "data")), 2708c2ecf20Sopenharmony_ci MPP_MODE(29, 2718c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2728c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn2"), 2738c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "spi1", "mosi"), 2748c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio6", NULL), 2758c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd1"), 2768c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn6"), 2778c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "pcie1", "clkreq"), 2788c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ptp", "clk"), 2798c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_i2c", "sda"), 2808c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 2818c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "uart0", "rxd"), 2828c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "led", "stb")), 2838c2ecf20Sopenharmony_ci MPP_MODE(30, 2848c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2858c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn3"), 2868c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "spi1", "clk"), 2878c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio7", NULL), 2888c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd0"), 2898c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn7"), 2908c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "pcie0", "clkreq"), 2918c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ptp", "pclk_out"), 2928c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "mss_i2c", "sck"), 2938c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 2948c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "uart0", "txd"), 2958c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "led", "clk")), 2968c2ecf20Sopenharmony_ci MPP_MODE(31, 2978c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 2988c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "dev", "a2"), 2998c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio4", NULL), 3008c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "pcie", "rstoutn"), 3018c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc")), 3028c2ecf20Sopenharmony_ci MPP_MODE(32, 3038c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3048c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mii", "col"), 3058c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mii", "txerr"), 3068c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "miso"), 3078c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 3088c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 3098c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "au", "i2sdi"), 3108c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdio"), 3118c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "sdio", "v18_en"), 3128c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie1", "clkreq"), 3138c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio0", NULL)), 3148c2ecf20Sopenharmony_ci MPP_MODE(33, 3158c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3168c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mii", "txclk"), 3178c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "sdio", "pwr10"), 3188c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "csn"), 3198c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 3208c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 3218c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sdio", "bus_pwr"), 3228c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 3238c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie2", "clkreq"), 3248c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio1", NULL)), 3258c2ecf20Sopenharmony_ci MPP_MODE(34, 3268c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3278c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mii", "rxerr"), 3288c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "sdio", "pwr11"), 3298c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "mosi"), 3308c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 3318c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk"), 3328c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sdio", "wr_protect"), 3338c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdc"), 3348c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie0", "clkreq"), 3358c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio2", NULL)), 3368c2ecf20Sopenharmony_ci MPP_MODE(35, 3378c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3388c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sata1", "present_act"), 3398c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "i2c1", "sda"), 3408c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "clk"), 3418c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 3428c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo"), 3438c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sdio", "card_detect"), 3448c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "xg", "mdio"), 3458c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 3468c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn"), 3478c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio3", NULL)), 3488c2ecf20Sopenharmony_ci MPP_MODE(36, 3498c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3508c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "synce2", "clk"), 3518c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "i2c1", "sck"), 3528c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 3538c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "synce1", "clk"), 3548c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk"), 3558c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 3568c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "xg", "mdc"), 3578c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 3588c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie2", "clkreq"), 3598c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio5", NULL)), 3608c2ecf20Sopenharmony_ci MPP_MODE(37, 3618c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3628c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "uart2", "rxd"), 3638c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "i2c0", "sck"), 3648c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 3658c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 3668c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_i2c", "sck"), 3678c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sata1", "present_act"), 3688c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdc"), 3698c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 3708c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie1", "clkreq"), 3718c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio6", NULL), 3728c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "link", "rd_out_cp2cp")), 3738c2ecf20Sopenharmony_ci MPP_MODE(38, 3748c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3758c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "uart2", "txd"), 3768c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "i2c0", "sda"), 3778c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 3788c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 3798c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_i2c", "sda"), 3808c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 3818c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdio"), 3828c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 3838c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "au", "i2sextclk"), 3848c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio7", NULL), 3858c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "ptp", "pulse_cp2cp")), 3868c2ecf20Sopenharmony_ci MPP_MODE(39, 3878c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3888c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sdio", "wr_protect"), 3898c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sbclk"), 3908c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "ptp", "clk"), 3918c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn1"), 3928c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 3938c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio0", NULL)), 3948c2ecf20Sopenharmony_ci MPP_MODE(40, 3958c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 3968c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sdio", "pwr11"), 3978c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 3988c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_i2c", "sda"), 3998c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sdo_spdifo"), 4008c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "ptp", "pclk_out"), 4018c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "clk"), 4028c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 4038c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 4048c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 4058c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio1", NULL)), 4068c2ecf20Sopenharmony_ci MPP_MODE(41, 4078c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4088c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sdio", "pwr10"), 4098c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "sdio", "bus_pwr"), 4108c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "mss_i2c", "sck"), 4118c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "au", "i2slrclk"), 4128c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "ptp", "pulse"), 4138c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 4148c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 4158c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 4168c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 4178c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio2", NULL), 4188c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "rei", "out_cp2cp")), 4198c2ecf20Sopenharmony_ci MPP_MODE(42, 4208c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4218c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sdio", "v18_en"), 4228c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "sdio", "wr_protect"), 4238c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "synce2", "clk"), 4248c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "au", "i2smclk"), 4258c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 4268c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 4278c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 4288c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 4298c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 4308c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio4", NULL)), 4318c2ecf20Sopenharmony_ci MPP_MODE(43, 4328c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4338c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "sdio", "card_detect"), 4348c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "synce1", "clk"), 4358c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sextclk"), 4368c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 4378c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn0"), 4388c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rts"), 4398c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 4408c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 4418c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio5", NULL), 4428c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "out_cp2cp")), 4438c2ecf20Sopenharmony_ci MPP_MODE(44, 4448c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4458c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd2"), 4468c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rts"), 4478c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "ptp", "clk_cp2cp")), 4488c2ecf20Sopenharmony_ci MPP_MODE(45, 4498c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4508c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd3"), 4518c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "txd"), 4528c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn")), 4538c2ecf20Sopenharmony_ci MPP_MODE(46, 4548c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4558c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd1"), 4568c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rts")), 4578c2ecf20Sopenharmony_ci MPP_MODE(47, 4588c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4598c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd0"), 4608c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "clk"), 4618c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 4628c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc")), 4638c2ecf20Sopenharmony_ci MPP_MODE(48, 4648c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4658c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txctl_txen"), 4668c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "mosi"), 4678c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 4688c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "in_cp2cp")), 4698c2ecf20Sopenharmony_ci MPP_MODE(49, 4708c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4718c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txclkout"), 4728c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mii", "crs"), 4738c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "miso"), 4748c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 4758c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 4768c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie0", "clkreq"), 4778c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "sdio", "v18_en"), 4788c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "sei", "out_cp2cp")), 4798c2ecf20Sopenharmony_ci MPP_MODE(50, 4808c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4818c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxclk"), 4828c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sda"), 4838c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn0"), 4848c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart2", "txd"), 4858c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rxd"), 4868c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 4878c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "sdio", "pwr11")), 4888c2ecf20Sopenharmony_ci MPP_MODE(51, 4898c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4908c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd0"), 4918c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sck"), 4928c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn1"), 4938c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "uart2", "rxd"), 4948c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "cts"), 4958c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "sdio", "pwr10")), 4968c2ecf20Sopenharmony_ci MPP_MODE(52, 4978c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4988c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd1"), 4998c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 5008c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "synce2", "clk"), 5018c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn2"), 5028c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 5038c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "clk"), 5048c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn"), 5058c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "pcie0", "clkreq")), 5068c2ecf20Sopenharmony_ci MPP_MODE(53, 5078c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5088c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd2"), 5098c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 5108c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn3"), 5118c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 5128c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "stb"), 5138c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "sdio", "led")), 5148c2ecf20Sopenharmony_ci MPP_MODE(54, 5158c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5168c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd3"), 5178c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "synce2", "clk"), 5188c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 5198c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "synce1", "clk"), 5208c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "data"), 5218c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "sdio", "hw_rst"), 5228c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "sdio", "wr_protect")), 5238c2ecf20Sopenharmony_ci MPP_MODE(55, 5248c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5258c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxctl_rxdv"), 5268c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 5278c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "sdio", "led"), 5288c2ecf20Sopenharmony_ci MPP_FUNCTION(11, "sdio", "card_detect")), 5298c2ecf20Sopenharmony_ci MPP_MODE(56, 5308c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5318c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 5328c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo"), 5338c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "clk"), 5348c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 5358c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 5368c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "clk")), 5378c2ecf20Sopenharmony_ci MPP_MODE(57, 5388c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5398c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sda"), 5408c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 5418c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 5428c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk"), 5438c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 5448c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 5458c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 5468c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "cmd")), 5478c2ecf20Sopenharmony_ci MPP_MODE(58, 5488c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5498c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sck"), 5508c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 5518c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 5528c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdi"), 5538c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 5548c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 5558c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "clk"), 5568c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d0")), 5578c2ecf20Sopenharmony_ci MPP_MODE(59, 5588c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5598c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio7", NULL), 5608c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "synce2", "clk"), 5618c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 5628c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk"), 5638c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn0"), 5648c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "cts"), 5658c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "stb"), 5668c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "uart1", "txd"), 5678c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d1")), 5688c2ecf20Sopenharmony_ci MPP_MODE(60, 5698c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5708c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio6", NULL), 5718c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 5728c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 5738c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 5748c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn1"), 5758c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rts"), 5768c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "led", "data"), 5778c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "uart1", "rxd"), 5788c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d2")), 5798c2ecf20Sopenharmony_ci MPP_MODE(61, 5808c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5818c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio5", NULL), 5828c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 5838c2ecf20Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 5848c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 5858c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn2"), 5868c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "txd"), 5878c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart2", "txd"), 5888c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 5898c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio"), 5908c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d3")), 5918c2ecf20Sopenharmony_ci MPP_MODE(62, 5928c2ecf20Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5938c2ecf20Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio4", NULL), 5948c2ecf20Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 5958c2ecf20Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 5968c2ecf20Sopenharmony_ci MPP_FUNCTION(5, "sata1", "present_act"), 5978c2ecf20Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn3"), 5988c2ecf20Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rxd"), 5998c2ecf20Sopenharmony_ci MPP_FUNCTION(8, "uart2", "rxd"), 6008c2ecf20Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 6018c2ecf20Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc"), 6028c2ecf20Sopenharmony_ci MPP_FUNCTION(14, "sdio", "ds")), 6038c2ecf20Sopenharmony_ci}; 6048c2ecf20Sopenharmony_ci 6058c2ecf20Sopenharmony_cistatic const struct of_device_id armada_cp110_pinctrl_of_match[] = { 6068c2ecf20Sopenharmony_ci { 6078c2ecf20Sopenharmony_ci .compatible = "marvell,armada-7k-pinctrl", 6088c2ecf20Sopenharmony_ci .data = (void *) V_ARMADA_7K, 6098c2ecf20Sopenharmony_ci }, 6108c2ecf20Sopenharmony_ci { 6118c2ecf20Sopenharmony_ci .compatible = "marvell,armada-8k-cpm-pinctrl", 6128c2ecf20Sopenharmony_ci .data = (void *) V_ARMADA_8K_CPM, 6138c2ecf20Sopenharmony_ci }, 6148c2ecf20Sopenharmony_ci { 6158c2ecf20Sopenharmony_ci .compatible = "marvell,armada-8k-cps-pinctrl", 6168c2ecf20Sopenharmony_ci .data = (void *) V_ARMADA_8K_CPS, 6178c2ecf20Sopenharmony_ci }, 6188c2ecf20Sopenharmony_ci { 6198c2ecf20Sopenharmony_ci .compatible = "marvell,cp115-standalone-pinctrl", 6208c2ecf20Sopenharmony_ci .data = (void *) V_CP115_STANDALONE, 6218c2ecf20Sopenharmony_ci }, 6228c2ecf20Sopenharmony_ci { }, 6238c2ecf20Sopenharmony_ci}; 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_cistatic const struct mvebu_mpp_ctrl armada_cp110_mpp_controls[] = { 6268c2ecf20Sopenharmony_ci MPP_FUNC_CTRL(0, 62, NULL, mvebu_regmap_mpp_ctrl), 6278c2ecf20Sopenharmony_ci}; 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_cistatic void mvebu_pinctrl_assign_variant(struct mvebu_mpp_mode *m, 6308c2ecf20Sopenharmony_ci u8 variant) 6318c2ecf20Sopenharmony_ci{ 6328c2ecf20Sopenharmony_ci struct mvebu_mpp_ctrl_setting *s; 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ci for (s = m->settings ; s->name ; s++) 6358c2ecf20Sopenharmony_ci s->variant = variant; 6368c2ecf20Sopenharmony_ci} 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_cistatic int armada_cp110_pinctrl_probe(struct platform_device *pdev) 6398c2ecf20Sopenharmony_ci{ 6408c2ecf20Sopenharmony_ci struct mvebu_pinctrl_soc_info *soc; 6418c2ecf20Sopenharmony_ci const struct of_device_id *match = 6428c2ecf20Sopenharmony_ci of_match_device(armada_cp110_pinctrl_of_match, &pdev->dev); 6438c2ecf20Sopenharmony_ci int i; 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_ci if (!pdev->dev.parent) 6468c2ecf20Sopenharmony_ci return -ENODEV; 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_ci soc = devm_kzalloc(&pdev->dev, 6498c2ecf20Sopenharmony_ci sizeof(struct mvebu_pinctrl_soc_info), GFP_KERNEL); 6508c2ecf20Sopenharmony_ci if (!soc) 6518c2ecf20Sopenharmony_ci return -ENOMEM; 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci soc->variant = (unsigned long) match->data & 0xff; 6548c2ecf20Sopenharmony_ci soc->controls = armada_cp110_mpp_controls; 6558c2ecf20Sopenharmony_ci soc->ncontrols = ARRAY_SIZE(armada_cp110_mpp_controls); 6568c2ecf20Sopenharmony_ci soc->modes = armada_cp110_mpp_modes; 6578c2ecf20Sopenharmony_ci soc->nmodes = ARRAY_SIZE(armada_cp110_mpp_modes); 6588c2ecf20Sopenharmony_ci for (i = 0; i < ARRAY_SIZE(armada_cp110_mpp_modes); i++) { 6598c2ecf20Sopenharmony_ci struct mvebu_mpp_mode *m = &armada_cp110_mpp_modes[i]; 6608c2ecf20Sopenharmony_ci 6618c2ecf20Sopenharmony_ci switch (i) { 6628c2ecf20Sopenharmony_ci case 0 ... 31: 6638c2ecf20Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPS | 6648c2ecf20Sopenharmony_ci V_CP115_STANDALONE)); 6658c2ecf20Sopenharmony_ci break; 6668c2ecf20Sopenharmony_ci case 32 ... 38: 6678c2ecf20Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPM | 6688c2ecf20Sopenharmony_ci V_CP115_STANDALONE)); 6698c2ecf20Sopenharmony_ci break; 6708c2ecf20Sopenharmony_ci case 39 ... 43: 6718c2ecf20Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_8K_CPM | 6728c2ecf20Sopenharmony_ci V_CP115_STANDALONE)); 6738c2ecf20Sopenharmony_ci break; 6748c2ecf20Sopenharmony_ci case 44 ... 62: 6758c2ecf20Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPM | 6768c2ecf20Sopenharmony_ci V_CP115_STANDALONE)); 6778c2ecf20Sopenharmony_ci break; 6788c2ecf20Sopenharmony_ci } 6798c2ecf20Sopenharmony_ci } 6808c2ecf20Sopenharmony_ci pdev->dev.platform_data = soc; 6818c2ecf20Sopenharmony_ci 6828c2ecf20Sopenharmony_ci return mvebu_pinctrl_simple_regmap_probe(pdev, pdev->dev.parent, 0); 6838c2ecf20Sopenharmony_ci} 6848c2ecf20Sopenharmony_ci 6858c2ecf20Sopenharmony_cistatic struct platform_driver armada_cp110_pinctrl_driver = { 6868c2ecf20Sopenharmony_ci .driver = { 6878c2ecf20Sopenharmony_ci .name = "armada-cp110-pinctrl", 6888c2ecf20Sopenharmony_ci .of_match_table = of_match_ptr(armada_cp110_pinctrl_of_match), 6898c2ecf20Sopenharmony_ci }, 6908c2ecf20Sopenharmony_ci .probe = armada_cp110_pinctrl_probe, 6918c2ecf20Sopenharmony_ci}; 6928c2ecf20Sopenharmony_ci 6938c2ecf20Sopenharmony_cibuiltin_platform_driver(armada_cp110_pinctrl_driver); 694