18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Marvell Kirkwood pinctrl driver based on mvebu pinctrl core 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <linux/err.h> 98c2ecf20Sopenharmony_ci#include <linux/init.h> 108c2ecf20Sopenharmony_ci#include <linux/io.h> 118c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 128c2ecf20Sopenharmony_ci#include <linux/clk.h> 138c2ecf20Sopenharmony_ci#include <linux/of.h> 148c2ecf20Sopenharmony_ci#include <linux/of_device.h> 158c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#include "pinctrl-mvebu.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define V(f6180, f6190, f6192, f6281, f6282, dx4122, dx1135) \ 208c2ecf20Sopenharmony_ci ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \ 218c2ecf20Sopenharmony_ci (f6281 << 3) | (f6282 << 4) | (dx4122 << 5) | \ 228c2ecf20Sopenharmony_ci (dx1135 << 6)) 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cienum kirkwood_variant { 258c2ecf20Sopenharmony_ci VARIANT_MV88F6180 = V(1, 0, 0, 0, 0, 0, 0), 268c2ecf20Sopenharmony_ci VARIANT_MV88F6190 = V(0, 1, 0, 0, 0, 0, 0), 278c2ecf20Sopenharmony_ci VARIANT_MV88F6192 = V(0, 0, 1, 0, 0, 0, 0), 288c2ecf20Sopenharmony_ci VARIANT_MV88F6281 = V(0, 0, 0, 1, 0, 0, 0), 298c2ecf20Sopenharmony_ci VARIANT_MV88F6282 = V(0, 0, 0, 0, 1, 0, 0), 308c2ecf20Sopenharmony_ci VARIANT_MV98DX4122 = V(0, 0, 0, 0, 0, 1, 0), 318c2ecf20Sopenharmony_ci VARIANT_MV98DX1135 = V(0, 0, 0, 0, 0, 0, 1), 328c2ecf20Sopenharmony_ci}; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_cistatic struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = { 358c2ecf20Sopenharmony_ci MPP_MODE(0, 368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io2", V(1, 1, 1, 1, 1, 1, 1)), 388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1, 1))), 398c2ecf20Sopenharmony_ci MPP_MODE(1, 408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 418c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io3", V(1, 1, 1, 1, 1, 1, 1)), 428c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1, 1, 1))), 438c2ecf20Sopenharmony_ci MPP_MODE(2, 448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io4", V(1, 1, 1, 1, 1, 1, 1)), 468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1, 1))), 478c2ecf20Sopenharmony_ci MPP_MODE(3, 488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io5", V(1, 1, 1, 1, 1, 1, 1)), 508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1, 1))), 518c2ecf20Sopenharmony_ci MPP_MODE(4, 528c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io6", V(1, 1, 1, 1, 1, 1, 1)), 548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "rxd", V(1, 1, 1, 1, 1, 1, 1)), 558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0, 0)), 568c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0, 0)), 578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0, 0))), 588c2ecf20Sopenharmony_ci MPP_MODE(5, 598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io7", V(1, 1, 1, 1, 1, 1, 1)), 618c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "txd", V(1, 1, 1, 1, 1, 1, 1)), 628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0, 0, 0)), 638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0, 0)), 648c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0, 0))), 658c2ecf20Sopenharmony_ci MPP_MODE(6, 668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sysrst", "out", V(1, 1, 1, 1, 1, 1, 1)), 678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1, 1, 1)), 688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0, 0))), 698c2ecf20Sopenharmony_ci MPP_MODE(7, 708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "pex", "rsto", V(1, 1, 1, 1, 0, 1, 1)), 728c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1, 1)), 738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0, 0)), 748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0, 0))), 758c2ecf20Sopenharmony_ci MPP_MODE(8, 768c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "twsi0", "sda", V(1, 1, 1, 1, 1, 1, 1)), 788c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1, 1)), 798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "rts", V(1, 1, 1, 1, 1, 1, 1)), 808c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr", V(0, 1, 1, 1, 1, 0, 0)), 818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0, 0)), 828c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0, 0, 0)), 838c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0, 0))), 848c2ecf20Sopenharmony_ci MPP_MODE(9, 858c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "twsi0", "sck", V(1, 1, 1, 1, 1, 1, 1)), 878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1, 1)), 888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "cts", V(1, 1, 1, 1, 1, 1, 1)), 898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0, 0)), 908c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0, 0, 0)), 918c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0, 0))), 928c2ecf20Sopenharmony_ci MPP_MODE(10, 938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 948c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1, 1)), 958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0X3, "uart0", "txd", V(1, 1, 1, 1, 1, 1, 1)), 968c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0, 0)), 978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0, 0, 0))), 988c2ecf20Sopenharmony_ci MPP_MODE(11, 998c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1, 1)), 1018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart0", "rxd", V(1, 1, 1, 1, 1, 1, 1)), 1028c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0, 0, 0)), 1038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0, 0, 0)), 1048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0, 0)), 1058c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0, 0))), 1068c2ecf20Sopenharmony_ci MPP_MODE(12, 1078c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 0, 1, 0, 0)), 1088c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 0, 0)), 1098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "clk", V(1, 1, 1, 1, 1, 0, 0)), 1108c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1, 0, 0)), 1118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "spi", "mosi", V(0, 0, 0, 0, 1, 0, 0)), 1128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "twsi1", "sda", V(0, 0, 0, 0, 1, 0, 0))), 1138c2ecf20Sopenharmony_ci MPP_MODE(13, 1148c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1158c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "cmd", V(1, 1, 1, 1, 1, 0, 0)), 1168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 1, 1)), 1178c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xa, "audio", "rmclk", V(0, 0, 0, 0, 1, 0, 0)), 1188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0, 0))), 1198c2ecf20Sopenharmony_ci MPP_MODE(14, 1208c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1218c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "d0", V(1, 1, 1, 1, 1, 0, 0)), 1228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 1, 1)), 1238c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0, 0)), 1248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1, 0, 0)), 1258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "audio-1", "sdi", V(0, 0, 0, 0, 1, 0, 0)), 1268c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0, 0))), 1278c2ecf20Sopenharmony_ci MPP_MODE(15, 1288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "d1", V(1, 1, 1, 1, 1, 0, 0)), 1308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1, 1)), 1318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 0, 0)), 1328c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "sata0", "act", V(0, 1, 1, 1, 1, 0, 0)), 1338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "spi", "cs", V(0, 0, 0, 0, 1, 0, 0))), 1348c2ecf20Sopenharmony_ci MPP_MODE(16, 1358c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "d2", V(1, 1, 1, 1, 1, 0, 0)), 1378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1, 1)), 1388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 0, 0)), 1398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "sata1", "act", V(0, 0, 1, 1, 1, 0, 0)), 1408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "extclk", V(0, 0, 0, 0, 1, 0, 0)), 1418c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0, 0))), 1428c2ecf20Sopenharmony_ci MPP_MODE(17, 1438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0, 0)), 1448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "sdio", "d3", V(1, 1, 1, 1, 1, 0, 0)), 1458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0, 0)), 1468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xa, "sata1", "act", V(0, 0, 0, 0, 1, 0, 0)), 1478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xd, "twsi1", "sck", V(0, 0, 0, 0, 1, 0, 0))), 1488c2ecf20Sopenharmony_ci MPP_MODE(18, 1498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io0", V(1, 1, 1, 1, 1, 1, 1)), 1518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "pex", "clkreq", V(0, 0, 0, 0, 1, 0, 0))), 1528c2ecf20Sopenharmony_ci MPP_MODE(19, 1538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1, 1)), 1548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "io1", V(1, 1, 1, 1, 1, 1, 1))), 1558c2ecf20Sopenharmony_ci MPP_MODE(20, 1568c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 1578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 1, 1, 1, 0, 0)), 1588c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0, 0)), 1598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txd0", V(0, 1, 1, 1, 1, 0, 0)), 1608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1, 0, 0)), 1618c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0, 0)), 1628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d0", V(0, 0, 0, 0, 1, 0, 0)), 1638c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(0, 0, 0, 0, 0, 0, 0))), 1648c2ecf20Sopenharmony_ci MPP_MODE(21, 1658c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 1668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 1, 1, 1, 0, 0)), 1678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 1, 1, 1, 0, 0)), 1688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txd1", V(0, 1, 1, 1, 1, 0, 0)), 1698c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 0, 0, 0, 0)), 1708c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1, 0, 0)), 1718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0, 0)), 1728c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d1", V(0, 0, 0, 0, 1, 0, 0))), 1738c2ecf20Sopenharmony_ci MPP_MODE(22, 1748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 1758c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 1, 1, 1, 0, 0)), 1768c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 1, 1, 1, 0, 0)), 1778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txd2", V(0, 1, 1, 1, 1, 0, 0)), 1788c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 0, 0, 0, 0)), 1798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 1, 1, 1, 0, 0)), 1808c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0, 0)), 1818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d2", V(0, 0, 0, 0, 1, 0, 0))), 1828c2ecf20Sopenharmony_ci MPP_MODE(23, 1838c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 1848c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 1, 1, 1, 0, 0)), 1858c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 1, 1, 1, 0, 0)), 1868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txd3", V(0, 1, 1, 1, 1, 0, 0)), 1878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 0, 0, 0, 0, 0)), 1888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 1, 1, 1, 0, 0)), 1898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0, 0)), 1908c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d3", V(0, 0, 0, 0, 1, 0, 0))), 1918c2ecf20Sopenharmony_ci MPP_MODE(24, 1928c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 1938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 1, 1, 1, 0, 0)), 1948c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 1, 1, 1, 0, 0)), 1958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxd0", V(0, 1, 1, 1, 1, 0, 0)), 1968c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 0, 0, 0, 0, 0)), 1978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 1, 1, 1, 0, 0)), 1988c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d4", V(0, 0, 0, 0, 1, 0, 0))), 1998c2ecf20Sopenharmony_ci MPP_MODE(25, 2008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 1, 1, 1, 0, 0)), 2028c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 1, 1, 1, 0, 0)), 2038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxd1", V(0, 1, 1, 1, 1, 0, 0)), 2048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 0, 0, 0, 0, 0)), 2058c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 1, 1, 1, 0, 0)), 2068c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d5", V(0, 0, 0, 0, 1, 0, 0))), 2078c2ecf20Sopenharmony_ci MPP_MODE(26, 2088c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 1, 1, 1, 0, 0)), 2108c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1, 0, 0)), 2118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxd2", V(0, 1, 1, 1, 1, 0, 0)), 2128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 0, 0, 0, 0, 0)), 2138c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 1, 1, 1, 0, 0)), 2148c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d6", V(0, 0, 0, 0, 1, 0, 0))), 2158c2ecf20Sopenharmony_ci MPP_MODE(27, 2168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2178c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 1, 1, 1, 0, 0)), 2188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1, 0, 0)), 2198c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxd3", V(0, 1, 1, 1, 1, 0, 0)), 2208c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 0, 0, 0, 0, 0)), 2218c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 1, 1, 1, 0, 0)), 2228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d7", V(0, 0, 0, 0, 1, 0, 0))), 2238c2ecf20Sopenharmony_ci MPP_MODE(28, 2248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 0)), 2258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 1, 1, 1, 0, 0)), 2268c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 1, 1, 1, 0, 0)), 2278c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "col", V(0, 1, 1, 1, 1, 0, 0)), 2288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 0, 0, 0, 0, 0)), 2298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1, 0, 0)), 2308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d8", V(0, 0, 0, 0, 1, 0, 0)), 2318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "ren", V(0, 0, 0, 0, 0, 0, 1))), 2328c2ecf20Sopenharmony_ci MPP_MODE(29, 2338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 0)), 2348c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 1, 1, 1, 0, 0)), 2358c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 1, 1, 1, 0, 0)), 2368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txclk", V(0, 1, 1, 1, 1, 0, 0)), 2378c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 0, 0, 0, 0)), 2388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d9", V(0, 0, 0, 0, 1, 0, 0)), 2398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "wen", V(0, 0, 0, 0, 0, 0, 1))), 2408c2ecf20Sopenharmony_ci MPP_MODE(30, 2418c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2428c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 1, 1, 1, 0, 0)), 2438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 1, 1, 1, 0, 0)), 2448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxctl", V(0, 1, 1, 1, 1, 0, 0)), 2458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d10", V(0, 0, 0, 0, 1, 0, 0))), 2468c2ecf20Sopenharmony_ci MPP_MODE(31, 2478c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 1, 1, 1, 0, 0)), 2498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 1, 1, 1, 0, 0)), 2508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxclk", V(0, 1, 1, 1, 1, 0, 0)), 2518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d11", V(0, 0, 0, 0, 1, 0, 0))), 2528c2ecf20Sopenharmony_ci MPP_MODE(32, 2538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 1, 1, 1, 0, 0)), 2558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 1, 1, 1, 0, 0)), 2568c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txclko", V(0, 1, 1, 1, 1, 0, 0)), 2578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d12", V(0, 0, 0, 0, 1, 0, 0))), 2588c2ecf20Sopenharmony_ci MPP_MODE(33, 2598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 1, 1, 1, 1, 0, 1)), 2608c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 1, 1, 1, 0, 0)), 2618c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txctl", V(0, 1, 1, 1, 1, 0, 0)), 2628c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d13", V(0, 0, 0, 0, 1, 0, 0))), 2638c2ecf20Sopenharmony_ci MPP_MODE(34, 2648c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 1, 1)), 2658c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 1, 1, 1, 0, 0)), 2668c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "txen", V(0, 1, 1, 1, 1, 0, 0)), 2678c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 0, 1, 1, 0, 0)), 2688c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d14", V(0, 0, 0, 0, 1, 0, 0)), 2698c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "ale", V(0, 0, 0, 0, 0, 0, 1))), 2708c2ecf20Sopenharmony_ci MPP_MODE(35, 2718c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1, 1)), 2728c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0, 0)), 2738c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x3, "ge1", "rxerr", V(0, 1, 1, 1, 1, 0, 0)), 2748c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0, 0)), 2758c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d15", V(0, 0, 0, 0, 1, 0, 0)), 2768c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(1, 1, 1, 1, 1, 0, 0)), 2778c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "nand", "cen", V(0, 0, 0, 0, 0, 0, 1))), 2788c2ecf20Sopenharmony_ci MPP_MODE(36, 2798c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 2808c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 0, 1, 1, 0, 0)), 2818c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 0, 1, 1, 0, 0)), 2828c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 1, 1, 0, 0)), 2838c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "twsi1", "sda", V(0, 0, 0, 0, 1, 0, 0))), 2848c2ecf20Sopenharmony_ci MPP_MODE(37, 2858c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 2868c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 0, 1, 1, 0, 0)), 2878c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 0, 1, 1, 0, 0)), 2888c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 1, 1, 0, 0)), 2898c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "twsi1", "sck", V(0, 0, 0, 0, 1, 0, 0))), 2908c2ecf20Sopenharmony_ci MPP_MODE(38, 2918c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 2928c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 0, 1, 1, 0, 0)), 2938c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 0, 1, 1, 0, 0)), 2948c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(1, 0, 0, 1, 1, 0, 0)), 2958c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d18", V(0, 0, 0, 0, 1, 0, 0))), 2968c2ecf20Sopenharmony_ci MPP_MODE(39, 2978c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 2988c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 0, 1, 1, 0, 0)), 2998c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 0, 1, 1, 0, 0)), 3008c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(1, 0, 0, 1, 1, 0, 0)), 3018c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d19", V(0, 0, 0, 0, 1, 0, 0))), 3028c2ecf20Sopenharmony_ci MPP_MODE(40, 3038c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 3048c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 0, 1, 1, 0, 0)), 3058c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 0, 1, 1, 0, 0)), 3068c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(1, 0, 0, 1, 1, 0, 0)), 3078c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d20", V(0, 0, 0, 0, 1, 0, 0))), 3088c2ecf20Sopenharmony_ci MPP_MODE(41, 3098c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 3108c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 0, 1, 1, 0, 0)), 3118c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1, 0, 0)), 3128c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(1, 0, 0, 1, 1, 0, 0)), 3138c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d21", V(0, 0, 0, 0, 1, 0, 0))), 3148c2ecf20Sopenharmony_ci MPP_MODE(42, 3158c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 3168c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 0, 1, 1, 0, 0)), 3178c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1, 0, 0)), 3188c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(1, 0, 0, 1, 1, 0, 0)), 3198c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d22", V(0, 0, 0, 0, 1, 0, 0))), 3208c2ecf20Sopenharmony_ci MPP_MODE(43, 3218c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 3228c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 0, 1, 1, 0, 0)), 3238c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 0, 1, 1, 0, 0)), 3248c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(1, 0, 0, 1, 1, 0, 0)), 3258c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d23", V(0, 0, 0, 0, 1, 0, 0))), 3268c2ecf20Sopenharmony_ci MPP_MODE(44, 3278c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 0, 0, 1, 1, 1, 1)), 3288c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 0, 1, 1, 0, 0)), 3298c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 0, 1, 1, 0, 0)), 3308c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 1, 1, 0, 0)), 3318c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "clk", V(0, 0, 0, 0, 1, 0, 0))), 3328c2ecf20Sopenharmony_ci MPP_MODE(45, 3338c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1, 1)), 3348c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 1, 0, 0)), 3358c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 0, 1, 1, 0, 0)), 3368c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "e", V(0, 0, 0, 0, 1, 0, 0))), 3378c2ecf20Sopenharmony_ci MPP_MODE(46, 3388c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0, 0)), 3398c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 0, 1, 1, 0, 0)), 3408c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 0, 1, 1, 0, 0)), 3418c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0, 0))), 3428c2ecf20Sopenharmony_ci MPP_MODE(47, 3438c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0, 0)), 3448c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 0, 1, 1, 0, 0)), 3458c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 0, 1, 1, 0, 0)), 3468c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0, 0))), 3478c2ecf20Sopenharmony_ci MPP_MODE(48, 3488c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0, 0)), 3498c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 0, 1, 1, 0, 0)), 3508c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 0, 1, 1, 0, 0)), 3518c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d16", V(0, 0, 0, 0, 1, 0, 0))), 3528c2ecf20Sopenharmony_ci MPP_MODE(49, 3538c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 1, 1)), 3548c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 0, 0, 0, 1, 0, 0)), 3558c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 0, 0, 0)), 3568c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 0, 1, 1, 0, 0)), 3578c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0, 0, 0)), 3588c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xa, "pex", "clkreq", V(0, 0, 0, 0, 1, 0, 0)), 3598c2ecf20Sopenharmony_ci MPP_VAR_FUNCTION(0xb, "lcd", "d17", V(0, 0, 0, 0, 1, 0, 0))), 3608c2ecf20Sopenharmony_ci}; 3618c2ecf20Sopenharmony_ci 3628c2ecf20Sopenharmony_cistatic const struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = { 3638c2ecf20Sopenharmony_ci MPP_FUNC_CTRL(0, 44, NULL, mvebu_mmio_mpp_ctrl), 3648c2ecf20Sopenharmony_ci}; 3658c2ecf20Sopenharmony_ci 3668c2ecf20Sopenharmony_cistatic struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = { 3678c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(0, 0, 0, 20), 3688c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(1, 35, 35, 10), 3698c2ecf20Sopenharmony_ci}; 3708c2ecf20Sopenharmony_ci 3718c2ecf20Sopenharmony_cistatic const struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = { 3728c2ecf20Sopenharmony_ci MPP_FUNC_CTRL(0, 35, NULL, mvebu_mmio_mpp_ctrl), 3738c2ecf20Sopenharmony_ci}; 3748c2ecf20Sopenharmony_ci 3758c2ecf20Sopenharmony_cistatic struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = { 3768c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(0, 0, 0, 32), 3778c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(1, 32, 32, 4), 3788c2ecf20Sopenharmony_ci}; 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_cistatic const struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = { 3818c2ecf20Sopenharmony_ci MPP_FUNC_CTRL(0, 49, NULL, mvebu_mmio_mpp_ctrl), 3828c2ecf20Sopenharmony_ci}; 3838c2ecf20Sopenharmony_ci 3848c2ecf20Sopenharmony_cistatic struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = { 3858c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(0, 0, 0, 32), 3868c2ecf20Sopenharmony_ci MPP_GPIO_RANGE(1, 32, 32, 18), 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv88f6180_info = { 3908c2ecf20Sopenharmony_ci .variant = VARIANT_MV88F6180, 3918c2ecf20Sopenharmony_ci .controls = mv88f6180_mpp_controls, 3928c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f6180_mpp_controls), 3938c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 3948c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 3958c2ecf20Sopenharmony_ci .gpioranges = mv88f6180_gpio_ranges, 3968c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f6180_gpio_ranges), 3978c2ecf20Sopenharmony_ci}; 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv88f6190_info = { 4008c2ecf20Sopenharmony_ci .variant = VARIANT_MV88F6190, 4018c2ecf20Sopenharmony_ci .controls = mv88f619x_mpp_controls, 4028c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), 4038c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4048c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4058c2ecf20Sopenharmony_ci .gpioranges = mv88f619x_gpio_ranges, 4068c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), 4078c2ecf20Sopenharmony_ci}; 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv88f6192_info = { 4108c2ecf20Sopenharmony_ci .variant = VARIANT_MV88F6192, 4118c2ecf20Sopenharmony_ci .controls = mv88f619x_mpp_controls, 4128c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), 4138c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4148c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4158c2ecf20Sopenharmony_ci .gpioranges = mv88f619x_gpio_ranges, 4168c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), 4178c2ecf20Sopenharmony_ci}; 4188c2ecf20Sopenharmony_ci 4198c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv88f6281_info = { 4208c2ecf20Sopenharmony_ci .variant = VARIANT_MV88F6281, 4218c2ecf20Sopenharmony_ci .controls = mv88f628x_mpp_controls, 4228c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 4238c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4248c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4258c2ecf20Sopenharmony_ci .gpioranges = mv88f628x_gpio_ranges, 4268c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 4278c2ecf20Sopenharmony_ci}; 4288c2ecf20Sopenharmony_ci 4298c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv88f6282_info = { 4308c2ecf20Sopenharmony_ci .variant = VARIANT_MV88F6282, 4318c2ecf20Sopenharmony_ci .controls = mv88f628x_mpp_controls, 4328c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 4338c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4348c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4358c2ecf20Sopenharmony_ci .gpioranges = mv88f628x_gpio_ranges, 4368c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 4378c2ecf20Sopenharmony_ci}; 4388c2ecf20Sopenharmony_ci 4398c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv98dx4122_info = { 4408c2ecf20Sopenharmony_ci .variant = VARIANT_MV98DX4122, 4418c2ecf20Sopenharmony_ci .controls = mv88f628x_mpp_controls, 4428c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 4438c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4448c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4458c2ecf20Sopenharmony_ci .gpioranges = mv88f628x_gpio_ranges, 4468c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 4478c2ecf20Sopenharmony_ci}; 4488c2ecf20Sopenharmony_ci 4498c2ecf20Sopenharmony_cistatic struct mvebu_pinctrl_soc_info mv98dx1135_info = { 4508c2ecf20Sopenharmony_ci .variant = VARIANT_MV98DX1135, 4518c2ecf20Sopenharmony_ci .controls = mv88f628x_mpp_controls, 4528c2ecf20Sopenharmony_ci .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 4538c2ecf20Sopenharmony_ci .modes = mv88f6xxx_mpp_modes, 4548c2ecf20Sopenharmony_ci .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4558c2ecf20Sopenharmony_ci .gpioranges = mv88f628x_gpio_ranges, 4568c2ecf20Sopenharmony_ci .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 4578c2ecf20Sopenharmony_ci}; 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_ci 4608c2ecf20Sopenharmony_cistatic const struct of_device_id kirkwood_pinctrl_of_match[] = { 4618c2ecf20Sopenharmony_ci { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, 4628c2ecf20Sopenharmony_ci { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, 4638c2ecf20Sopenharmony_ci { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, 4648c2ecf20Sopenharmony_ci { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info }, 4658c2ecf20Sopenharmony_ci { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info }, 4668c2ecf20Sopenharmony_ci { .compatible = "marvell,98dx4122-pinctrl", .data = &mv98dx4122_info }, 4678c2ecf20Sopenharmony_ci { .compatible = "marvell,98dx1135-pinctrl", .data = &mv98dx1135_info }, 4688c2ecf20Sopenharmony_ci { } 4698c2ecf20Sopenharmony_ci}; 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_cistatic int kirkwood_pinctrl_probe(struct platform_device *pdev) 4728c2ecf20Sopenharmony_ci{ 4738c2ecf20Sopenharmony_ci const struct of_device_id *match = 4748c2ecf20Sopenharmony_ci of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci pdev->dev.platform_data = (void *)match->data; 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ci return mvebu_pinctrl_simple_mmio_probe(pdev); 4798c2ecf20Sopenharmony_ci} 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_cistatic struct platform_driver kirkwood_pinctrl_driver = { 4828c2ecf20Sopenharmony_ci .driver = { 4838c2ecf20Sopenharmony_ci .name = "kirkwood-pinctrl", 4848c2ecf20Sopenharmony_ci .of_match_table = kirkwood_pinctrl_of_match, 4858c2ecf20Sopenharmony_ci }, 4868c2ecf20Sopenharmony_ci .probe = kirkwood_pinctrl_probe, 4878c2ecf20Sopenharmony_ci}; 4888c2ecf20Sopenharmony_cibuiltin_platform_driver(kirkwood_pinctrl_driver); 489