106763c74SThomas Petazzoni /* 206763c74SThomas Petazzoni * Marvell Kirkwood pinctrl driver based on mvebu pinctrl core 306763c74SThomas Petazzoni * 406763c74SThomas Petazzoni * Author: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 506763c74SThomas Petazzoni * 606763c74SThomas Petazzoni * This program is free software; you can redistribute it and/or modify 706763c74SThomas Petazzoni * it under the terms of the GNU General Public License as published by 806763c74SThomas Petazzoni * the Free Software Foundation; either version 2 of the License, or 906763c74SThomas Petazzoni * (at your option) any later version. 1006763c74SThomas Petazzoni */ 1106763c74SThomas Petazzoni 1206763c74SThomas Petazzoni #include <linux/err.h> 1306763c74SThomas Petazzoni #include <linux/init.h> 1406763c74SThomas Petazzoni #include <linux/io.h> 1506763c74SThomas Petazzoni #include <linux/module.h> 1606763c74SThomas Petazzoni #include <linux/platform_device.h> 1706763c74SThomas Petazzoni #include <linux/clk.h> 1806763c74SThomas Petazzoni #include <linux/of.h> 1906763c74SThomas Petazzoni #include <linux/of_device.h> 2006763c74SThomas Petazzoni #include <linux/pinctrl/pinctrl.h> 2106763c74SThomas Petazzoni 2206763c74SThomas Petazzoni #include "pinctrl-mvebu.h" 2306763c74SThomas Petazzoni 244e5bc99cSValentin Longchamp #define V(f6180, f6190, f6192, f6281, f6282, dx4122) \ 2506763c74SThomas Petazzoni ((f6180 << 0) | (f6190 << 1) | (f6192 << 2) | \ 264e5bc99cSValentin Longchamp (f6281 << 3) | (f6282 << 4) | (dx4122 << 5)) 2706763c74SThomas Petazzoni 2806763c74SThomas Petazzoni enum kirkwood_variant { 294e5bc99cSValentin Longchamp VARIANT_MV88F6180 = V(1, 0, 0, 0, 0, 0), 304e5bc99cSValentin Longchamp VARIANT_MV88F6190 = V(0, 1, 0, 0, 0, 0), 314e5bc99cSValentin Longchamp VARIANT_MV88F6192 = V(0, 0, 1, 0, 0, 0), 324e5bc99cSValentin Longchamp VARIANT_MV88F6281 = V(0, 0, 0, 1, 0, 0), 334e5bc99cSValentin Longchamp VARIANT_MV88F6282 = V(0, 0, 0, 0, 1, 0), 344e5bc99cSValentin Longchamp VARIANT_MV98DX4122 = V(0, 0, 0, 0, 0, 1), 3506763c74SThomas Petazzoni }; 3606763c74SThomas Petazzoni 3706763c74SThomas Petazzoni static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = { 3806763c74SThomas Petazzoni MPP_MODE(0, 394e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 404e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io2", V(1, 1, 1, 1, 1, 1)), 414e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1))), 4206763c74SThomas Petazzoni MPP_MODE(1, 434e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 444e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io3", V(1, 1, 1, 1, 1, 1)), 454e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1, 1))), 4606763c74SThomas Petazzoni MPP_MODE(2, 474e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 484e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io4", V(1, 1, 1, 1, 1, 1)), 494e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1))), 5006763c74SThomas Petazzoni MPP_MODE(3, 514e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 524e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io5", V(1, 1, 1, 1, 1, 1)), 534e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1))), 5406763c74SThomas Petazzoni MPP_MODE(4, 554e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 564e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io6", V(1, 1, 1, 1, 1, 1)), 574e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "rxd", V(1, 1, 1, 1, 1, 1)), 584e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), 594e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0)), 604e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0))), 6106763c74SThomas Petazzoni MPP_MODE(5, 624e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 634e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io7", V(1, 1, 1, 1, 1, 1)), 644e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "txd", V(1, 1, 1, 1, 1, 1)), 654e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "ptp", "trig", V(1, 1, 1, 1, 0, 0)), 664e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), 674e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0))), 6806763c74SThomas Petazzoni MPP_MODE(6, 69889c5d3eSSimon Guinot MPP_VAR_FUNCTION(0x1, "sysrst", "out", V(1, 1, 1, 1, 1, 1)), 70889c5d3eSSimon Guinot MPP_VAR_FUNCTION(0x2, "spi", "mosi", V(1, 1, 1, 1, 1, 1)), 71889c5d3eSSimon Guinot MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0))), 7206763c74SThomas Petazzoni MPP_MODE(7, 734e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 744e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "pex", "rsto", V(1, 1, 1, 1, 0, 1)), 754e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "cs", V(1, 1, 1, 1, 1, 1)), 764e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ptp", "trig", V(1, 1, 1, 1, 0, 0)), 774e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0))), 7806763c74SThomas Petazzoni MPP_MODE(8, 794e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 804e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "twsi0", "sda", V(1, 1, 1, 1, 1, 1)), 814e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1)), 824e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "rts", V(1, 1, 1, 1, 1, 1)), 834e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr", V(0, 1, 1, 1, 1, 0)), 844e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), 854e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "ptp", "clk", V(1, 1, 1, 1, 0, 0)), 864e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0))), 8706763c74SThomas Petazzoni MPP_MODE(9, 884e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 894e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "twsi0", "sck", V(1, 1, 1, 1, 1, 1)), 904e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1)), 914e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "cts", V(1, 1, 1, 1, 1, 1)), 924e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), 934e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "ptp", "evreq", V(1, 1, 1, 1, 0, 0)), 944e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0))), 9506763c74SThomas Petazzoni MPP_MODE(10, 964e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 974e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "sck", V(1, 1, 1, 1, 1, 1)), 984e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0X3, "uart0", "txd", V(1, 1, 1, 1, 1, 1)), 994e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), 1004e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "ptp", "trig", V(1, 1, 1, 1, 0, 0))), 10106763c74SThomas Petazzoni MPP_MODE(11, 1024e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 1034e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "spi", "miso", V(1, 1, 1, 1, 1, 1)), 1044e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart0", "rxd", V(1, 1, 1, 1, 1, 1)), 1054e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq", V(1, 1, 1, 1, 0, 0)), 1064e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "ptp-2", "trig", V(1, 1, 1, 1, 0, 0)), 1074e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "ptp", "clk", V(1, 1, 1, 1, 0, 0)), 1084e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0))), 10906763c74SThomas Petazzoni MPP_MODE(12, 1104e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 0, 1, 0)), 1114e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 0)), 1124e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "clk", V(1, 1, 1, 1, 1, 0)), 1134e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1, 0)), 1144e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "spi", "mosi", V(0, 0, 0, 0, 1, 0)), 1154e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "twsi1", "sda", V(0, 0, 0, 0, 1, 0))), 11606763c74SThomas Petazzoni MPP_MODE(13, 1174e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 1184e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "cmd", V(1, 1, 1, 1, 1, 0)), 1194e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 1)), 1204e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xa, "audio", "rmclk", V(0, 0, 0, 0, 1, 0)), 1214e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "pwm", V(0, 0, 0, 0, 1, 0))), 12206763c74SThomas Petazzoni MPP_MODE(14, 1234e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 1244e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "d0", V(1, 1, 1, 1, 1, 0)), 1254e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 1)), 1264e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), 1274e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1, 0)), 1284e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "audio-1", "sdi", V(0, 0, 0, 0, 1, 0)), 1294e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "mii", "col", V(1, 1, 1, 1, 1, 0))), 13006763c74SThomas Petazzoni MPP_MODE(15, 1314e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 1324e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "d1", V(1, 1, 1, 1, 1, 0)), 1334e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "rts", V(1, 1, 1, 1, 1, 1)), 1344e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "txd", V(1, 1, 1, 1, 1, 0)), 1354e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "sata0", "act", V(0, 1, 1, 1, 1, 0)), 1364e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "spi", "cs", V(0, 0, 0, 0, 1, 0))), 13706763c74SThomas Petazzoni MPP_MODE(16, 1384e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 1)), 1394e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "d2", V(1, 1, 1, 1, 1, 0)), 1404e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "uart0", "cts", V(1, 1, 1, 1, 1, 1)), 1414e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "uart1", "rxd", V(1, 1, 1, 1, 1, 0)), 1424e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "sata1", "act", V(0, 0, 1, 1, 1, 0)), 1434e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "extclk", V(0, 0, 0, 0, 1, 0)), 1444e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "mii", "crs", V(1, 1, 1, 1, 1, 0))), 14506763c74SThomas Petazzoni MPP_MODE(17, 1464e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1474e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "sdio", "d3", V(1, 1, 1, 1, 1, 0)), 1484e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), 1494e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xa, "sata1", "act", V(0, 0, 0, 0, 1, 0)), 1504e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xd, "twsi1", "sck", V(0, 0, 0, 0, 1, 0))), 15106763c74SThomas Petazzoni MPP_MODE(18, 1524e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 1534e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io0", V(1, 1, 1, 1, 1, 1)), 1544e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "pex", "clkreq", V(0, 0, 0, 0, 1, 0))), 15506763c74SThomas Petazzoni MPP_MODE(19, 1564e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(1, 1, 1, 1, 1, 1)), 1574e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "nand", "io1", V(1, 1, 1, 1, 1, 1))), 15806763c74SThomas Petazzoni MPP_MODE(20, 1594e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1604e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 1, 1, 1, 0)), 1614e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0)), 1624e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txd0", V(0, 1, 1, 1, 1, 0)), 1634e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1, 0)), 1644e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 1, 1, 1, 0)), 1654e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d0", V(0, 0, 0, 0, 1, 0)), 1664e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(1, 0, 0, 0, 0, 0))), 16706763c74SThomas Petazzoni MPP_MODE(21, 1684e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1694e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 1, 1, 1, 0)), 1704e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 1, 1, 1, 0)), 1714e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txd1", V(0, 1, 1, 1, 1, 0)), 1724e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0, 0)), 1734e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1, 0)), 1744e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), 1754e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d1", V(0, 0, 0, 0, 1, 0))), 17606763c74SThomas Petazzoni MPP_MODE(22, 1774e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1784e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 1, 1, 1, 0)), 1794e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 1, 1, 1, 0)), 1804e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txd2", V(0, 1, 1, 1, 1, 0)), 1814e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0, 0)), 1824e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 1, 1, 1, 0)), 1834e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "prsnt", V(0, 0, 1, 1, 1, 0)), 1844e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d2", V(0, 0, 0, 0, 1, 0))), 18506763c74SThomas Petazzoni MPP_MODE(23, 1864e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1874e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 1, 1, 1, 0)), 1884e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 1, 1, 1, 0)), 1894e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txd3", V(0, 1, 1, 1, 1, 0)), 1904e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(1, 0, 0, 0, 0, 0)), 1914e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 1, 1, 1, 0)), 1924e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "prsnt", V(0, 1, 1, 1, 1, 0)), 1934e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d3", V(0, 0, 0, 0, 1, 0))), 19406763c74SThomas Petazzoni MPP_MODE(24, 1954e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 1964e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 1, 1, 1, 0)), 1974e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 1, 1, 1, 0)), 1984e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxd0", V(0, 1, 1, 1, 1, 0)), 1994e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(1, 0, 0, 0, 0, 0)), 2004e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 1, 1, 1, 0)), 2014e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d4", V(0, 0, 0, 0, 1, 0))), 20206763c74SThomas Petazzoni MPP_MODE(25, 2034e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 2044e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 1, 1, 1, 0)), 2054e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 1, 1, 1, 0)), 2064e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxd1", V(0, 1, 1, 1, 1, 0)), 2074e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(1, 0, 0, 0, 0, 0)), 2084e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 1, 1, 1, 0)), 2094e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d5", V(0, 0, 0, 0, 1, 0))), 21006763c74SThomas Petazzoni MPP_MODE(26, 2114e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 2124e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 1, 1, 1, 0)), 2134e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1, 0)), 2144e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxd2", V(0, 1, 1, 1, 1, 0)), 2154e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(1, 0, 0, 0, 0, 0)), 2164e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 1, 1, 1, 0)), 2174e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d6", V(0, 0, 0, 0, 1, 0))), 21806763c74SThomas Petazzoni MPP_MODE(27, 2194e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 2204e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 1, 1, 1, 0)), 2214e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1, 0)), 2224e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxd3", V(0, 1, 1, 1, 1, 0)), 2234e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(1, 0, 0, 0, 0, 0)), 2244e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 1, 1, 1, 0)), 2254e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d7", V(0, 0, 0, 0, 1, 0))), 22606763c74SThomas Petazzoni MPP_MODE(28, 2274e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 2284e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 1, 1, 1, 0)), 2294e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 1, 1, 1, 0)), 2304e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "col", V(0, 1, 1, 1, 1, 0)), 2314e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(1, 0, 0, 0, 0, 0)), 2324e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1, 0)), 2334e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d8", V(0, 0, 0, 0, 1, 0))), 23406763c74SThomas Petazzoni MPP_MODE(29, 2354e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(1, 1, 1, 1, 1, 0)), 2364e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 1, 1, 1, 0)), 2374e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 1, 1, 1, 0)), 2384e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txclk", V(0, 1, 1, 1, 1, 0)), 2394e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0, 0)), 2404e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d9", V(0, 0, 0, 0, 1, 0))), 24106763c74SThomas Petazzoni MPP_MODE(30, 2424e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), 2434e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 1, 1, 1, 0)), 2444e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 1, 1, 1, 0)), 2454e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxctl", V(0, 1, 1, 1, 1, 0)), 2464e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d10", V(0, 0, 0, 0, 1, 0))), 24706763c74SThomas Petazzoni MPP_MODE(31, 2484e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), 2494e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 1, 1, 1, 0)), 2504e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 1, 1, 1, 0)), 2514e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxclk", V(0, 1, 1, 1, 1, 0)), 2524e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d11", V(0, 0, 0, 0, 1, 0))), 25306763c74SThomas Petazzoni MPP_MODE(32, 2544e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 0)), 2554e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 1, 1, 1, 0)), 2564e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 1, 1, 1, 0)), 2574e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txclko", V(0, 1, 1, 1, 1, 0)), 2584e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d12", V(0, 0, 0, 0, 1, 0))), 25906763c74SThomas Petazzoni MPP_MODE(33, 2604e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 1, 1, 1, 1, 0)), 2614e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 1, 1, 1, 0)), 2624e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txctl", V(0, 1, 1, 1, 1, 0)), 2634e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d13", V(0, 0, 0, 0, 1, 0))), 26406763c74SThomas Petazzoni MPP_MODE(34, 2654e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 1)), 2664e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 1, 1, 1, 0)), 2674e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "txen", V(0, 1, 1, 1, 1, 0)), 2684e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata1", "act", V(0, 0, 0, 1, 1, 0)), 2694e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d14", V(0, 0, 0, 0, 1, 0))), 27006763c74SThomas Petazzoni MPP_MODE(35, 2714e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 1, 1, 1, 1, 1)), 2724e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql", V(0, 0, 1, 1, 1, 0)), 2734e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x3, "ge1", "rxerr", V(0, 1, 1, 1, 1, 0)), 2744e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "sata0", "act", V(0, 1, 1, 1, 1, 0)), 2754e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d15", V(0, 0, 0, 0, 1, 0)), 2764e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xc, "mii", "rxerr", V(0, 1, 1, 1, 1, 0))), 27706763c74SThomas Petazzoni MPP_MODE(36, 2784e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 2794e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp0", V(0, 0, 0, 1, 1, 0)), 2804e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1", V(0, 0, 0, 1, 1, 0)), 2814e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1, 0)), 2824e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "twsi1", "sda", V(0, 0, 0, 0, 1, 0))), 28306763c74SThomas Petazzoni MPP_MODE(37, 2844e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 2854e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp1", V(0, 0, 0, 1, 1, 0)), 2864e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql", V(0, 0, 0, 1, 1, 0)), 2874e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1, 0)), 2884e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "twsi1", "sck", V(0, 0, 0, 0, 1, 0))), 28906763c74SThomas Petazzoni MPP_MODE(38, 2904e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 2914e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp2", V(0, 0, 0, 1, 1, 0)), 2924e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql", V(0, 0, 0, 1, 1, 0)), 2934e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "rmclk", V(0, 0, 0, 1, 1, 0)), 2944e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d18", V(0, 0, 0, 0, 1, 0))), 29506763c74SThomas Petazzoni MPP_MODE(39, 2964e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 2974e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp3", V(0, 0, 0, 1, 1, 0)), 2984e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0", V(0, 0, 0, 1, 1, 0)), 2994e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "bclk", V(0, 0, 0, 1, 1, 0)), 3004e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d19", V(0, 0, 0, 0, 1, 0))), 30106763c74SThomas Petazzoni MPP_MODE(40, 3024e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3034e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp4", V(0, 0, 0, 1, 1, 0)), 3044e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck", V(0, 0, 0, 1, 1, 0)), 3054e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdo", V(0, 0, 0, 1, 1, 0)), 3064e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d20", V(0, 0, 0, 0, 1, 0))), 30706763c74SThomas Petazzoni MPP_MODE(41, 3084e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3094e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp5", V(0, 0, 0, 1, 1, 0)), 3104e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1, 0)), 3114e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "lrclk", V(0, 0, 0, 1, 1, 0)), 3124e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d21", V(0, 0, 0, 0, 1, 0))), 31306763c74SThomas Petazzoni MPP_MODE(42, 3144e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3154e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp6", V(0, 0, 0, 1, 1, 0)), 3164e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1, 0)), 3174e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "mclk", V(0, 0, 0, 1, 1, 0)), 3184e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d22", V(0, 0, 0, 0, 1, 0))), 31906763c74SThomas Petazzoni MPP_MODE(43, 3204e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3214e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp7", V(0, 0, 0, 1, 1, 0)), 3224e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "int", V(0, 0, 0, 1, 1, 0)), 3234e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "sdi", V(0, 0, 0, 1, 1, 0)), 3244e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d23", V(0, 0, 0, 0, 1, 0))), 32506763c74SThomas Petazzoni MPP_MODE(44, 3264e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3274e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp8", V(0, 0, 0, 1, 1, 0)), 3284e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rst", V(0, 0, 0, 1, 1, 0)), 3294e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1, 0)), 3304e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "clk", V(0, 0, 0, 0, 1, 0))), 33106763c74SThomas Petazzoni MPP_MODE(45, 3324e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 1)), 3334e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 1, 0)), 3344e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "pclk", V(0, 0, 0, 1, 1, 0)), 3354e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "e", V(0, 0, 0, 0, 1, 0))), 33606763c74SThomas Petazzoni MPP_MODE(46, 3374e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), 3384e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp10", V(0, 0, 0, 1, 1, 0)), 3394e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "fs", V(0, 0, 0, 1, 1, 0)), 3404e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "hsync", V(0, 0, 0, 0, 1, 0))), 34106763c74SThomas Petazzoni MPP_MODE(47, 3424e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), 3434e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp11", V(0, 0, 0, 1, 1, 0)), 3444e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "drx", V(0, 0, 0, 1, 1, 0)), 3454e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "vsync", V(0, 0, 0, 0, 1, 0))), 34606763c74SThomas Petazzoni MPP_MODE(48, 3474e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 1, 0)), 3484e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp12", V(0, 0, 0, 1, 1, 0)), 3494e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "dtx", V(0, 0, 0, 1, 1, 0)), 3504e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d16", V(0, 0, 0, 0, 1, 0))), 35106763c74SThomas Petazzoni MPP_MODE(49, 3524e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpio", NULL, V(0, 0, 0, 1, 0, 1)), 3534e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x0, "gpo", NULL, V(0, 0, 0, 0, 1, 0)), 3544e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x1, "ts", "mp9", V(0, 0, 0, 1, 0, 0)), 3554e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql", V(0, 0, 0, 1, 1, 0)), 3564e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0x5, "ptp", "clk", V(0, 0, 0, 1, 0, 0)), 3574e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xa, "pex", "clkreq", V(0, 0, 0, 0, 1, 0)), 3584e5bc99cSValentin Longchamp MPP_VAR_FUNCTION(0xb, "lcd", "d17", V(0, 0, 0, 0, 1, 0))), 35906763c74SThomas Petazzoni }; 36006763c74SThomas Petazzoni 36106763c74SThomas Petazzoni static struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = { 36206763c74SThomas Petazzoni MPP_REG_CTRL(0, 29), 36306763c74SThomas Petazzoni }; 36406763c74SThomas Petazzoni 36506763c74SThomas Petazzoni static struct pinctrl_gpio_range mv88f6180_gpio_ranges[] = { 36606763c74SThomas Petazzoni MPP_GPIO_RANGE(0, 0, 0, 30), 36706763c74SThomas Petazzoni }; 36806763c74SThomas Petazzoni 36906763c74SThomas Petazzoni static struct mvebu_mpp_ctrl mv88f619x_mpp_controls[] = { 37006763c74SThomas Petazzoni MPP_REG_CTRL(0, 35), 37106763c74SThomas Petazzoni }; 37206763c74SThomas Petazzoni 37306763c74SThomas Petazzoni static struct pinctrl_gpio_range mv88f619x_gpio_ranges[] = { 37406763c74SThomas Petazzoni MPP_GPIO_RANGE(0, 0, 0, 32), 37506763c74SThomas Petazzoni MPP_GPIO_RANGE(1, 32, 32, 4), 37606763c74SThomas Petazzoni }; 37706763c74SThomas Petazzoni 37806763c74SThomas Petazzoni static struct mvebu_mpp_ctrl mv88f628x_mpp_controls[] = { 37906763c74SThomas Petazzoni MPP_REG_CTRL(0, 49), 38006763c74SThomas Petazzoni }; 38106763c74SThomas Petazzoni 38206763c74SThomas Petazzoni static struct pinctrl_gpio_range mv88f628x_gpio_ranges[] = { 38306763c74SThomas Petazzoni MPP_GPIO_RANGE(0, 0, 0, 32), 38406763c74SThomas Petazzoni MPP_GPIO_RANGE(1, 32, 32, 18), 38506763c74SThomas Petazzoni }; 38606763c74SThomas Petazzoni 38706763c74SThomas Petazzoni static struct mvebu_pinctrl_soc_info mv88f6180_info = { 38806763c74SThomas Petazzoni .variant = VARIANT_MV88F6180, 38906763c74SThomas Petazzoni .controls = mv88f6180_mpp_controls, 39006763c74SThomas Petazzoni .ncontrols = ARRAY_SIZE(mv88f6180_mpp_controls), 39106763c74SThomas Petazzoni .modes = mv88f6xxx_mpp_modes, 39206763c74SThomas Petazzoni .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 39306763c74SThomas Petazzoni .gpioranges = mv88f6180_gpio_ranges, 39406763c74SThomas Petazzoni .ngpioranges = ARRAY_SIZE(mv88f6180_gpio_ranges), 39506763c74SThomas Petazzoni }; 39606763c74SThomas Petazzoni 39706763c74SThomas Petazzoni static struct mvebu_pinctrl_soc_info mv88f6190_info = { 39806763c74SThomas Petazzoni .variant = VARIANT_MV88F6190, 39906763c74SThomas Petazzoni .controls = mv88f619x_mpp_controls, 40006763c74SThomas Petazzoni .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), 40106763c74SThomas Petazzoni .modes = mv88f6xxx_mpp_modes, 40206763c74SThomas Petazzoni .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 40306763c74SThomas Petazzoni .gpioranges = mv88f619x_gpio_ranges, 40406763c74SThomas Petazzoni .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), 40506763c74SThomas Petazzoni }; 40606763c74SThomas Petazzoni 40706763c74SThomas Petazzoni static struct mvebu_pinctrl_soc_info mv88f6192_info = { 40806763c74SThomas Petazzoni .variant = VARIANT_MV88F6192, 40906763c74SThomas Petazzoni .controls = mv88f619x_mpp_controls, 41006763c74SThomas Petazzoni .ncontrols = ARRAY_SIZE(mv88f619x_mpp_controls), 41106763c74SThomas Petazzoni .modes = mv88f6xxx_mpp_modes, 41206763c74SThomas Petazzoni .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 41306763c74SThomas Petazzoni .gpioranges = mv88f619x_gpio_ranges, 41406763c74SThomas Petazzoni .ngpioranges = ARRAY_SIZE(mv88f619x_gpio_ranges), 41506763c74SThomas Petazzoni }; 41606763c74SThomas Petazzoni 41706763c74SThomas Petazzoni static struct mvebu_pinctrl_soc_info mv88f6281_info = { 41806763c74SThomas Petazzoni .variant = VARIANT_MV88F6281, 41906763c74SThomas Petazzoni .controls = mv88f628x_mpp_controls, 42006763c74SThomas Petazzoni .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 42106763c74SThomas Petazzoni .modes = mv88f6xxx_mpp_modes, 42206763c74SThomas Petazzoni .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 42306763c74SThomas Petazzoni .gpioranges = mv88f628x_gpio_ranges, 42406763c74SThomas Petazzoni .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 42506763c74SThomas Petazzoni }; 42606763c74SThomas Petazzoni 42706763c74SThomas Petazzoni static struct mvebu_pinctrl_soc_info mv88f6282_info = { 42806763c74SThomas Petazzoni .variant = VARIANT_MV88F6282, 42906763c74SThomas Petazzoni .controls = mv88f628x_mpp_controls, 43006763c74SThomas Petazzoni .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 43106763c74SThomas Petazzoni .modes = mv88f6xxx_mpp_modes, 43206763c74SThomas Petazzoni .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 43306763c74SThomas Petazzoni .gpioranges = mv88f628x_gpio_ranges, 43406763c74SThomas Petazzoni .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 43506763c74SThomas Petazzoni }; 43606763c74SThomas Petazzoni 4374e5bc99cSValentin Longchamp static struct mvebu_pinctrl_soc_info mv98dx4122_info = { 4384e5bc99cSValentin Longchamp .variant = VARIANT_MV98DX4122, 4394e5bc99cSValentin Longchamp .controls = mv88f628x_mpp_controls, 4404e5bc99cSValentin Longchamp .ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls), 4414e5bc99cSValentin Longchamp .modes = mv88f6xxx_mpp_modes, 4424e5bc99cSValentin Longchamp .nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes), 4434e5bc99cSValentin Longchamp .gpioranges = mv88f628x_gpio_ranges, 4444e5bc99cSValentin Longchamp .ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges), 4454e5bc99cSValentin Longchamp }; 4464e5bc99cSValentin Longchamp 447150632b0SGreg Kroah-Hartman static struct of_device_id kirkwood_pinctrl_of_match[] = { 44806763c74SThomas Petazzoni { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info }, 44906763c74SThomas Petazzoni { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info }, 45006763c74SThomas Petazzoni { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info }, 45106763c74SThomas Petazzoni { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info }, 45206763c74SThomas Petazzoni { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info }, 4534e5bc99cSValentin Longchamp { .compatible = "marvell,98dx4122-pinctrl", .data = &mv98dx4122_info }, 45406763c74SThomas Petazzoni { } 45506763c74SThomas Petazzoni }; 45606763c74SThomas Petazzoni 457150632b0SGreg Kroah-Hartman static int kirkwood_pinctrl_probe(struct platform_device *pdev) 45806763c74SThomas Petazzoni { 45906763c74SThomas Petazzoni const struct of_device_id *match = 46006763c74SThomas Petazzoni of_match_device(kirkwood_pinctrl_of_match, &pdev->dev); 46116fa36beSAndrew Lunn pdev->dev.platform_data = (void *)match->data; 46206763c74SThomas Petazzoni return mvebu_pinctrl_probe(pdev); 46306763c74SThomas Petazzoni } 46406763c74SThomas Petazzoni 465150632b0SGreg Kroah-Hartman static int kirkwood_pinctrl_remove(struct platform_device *pdev) 46606763c74SThomas Petazzoni { 46706763c74SThomas Petazzoni return mvebu_pinctrl_remove(pdev); 46806763c74SThomas Petazzoni } 46906763c74SThomas Petazzoni 47006763c74SThomas Petazzoni static struct platform_driver kirkwood_pinctrl_driver = { 47106763c74SThomas Petazzoni .driver = { 47206763c74SThomas Petazzoni .name = "kirkwood-pinctrl", 47306763c74SThomas Petazzoni .owner = THIS_MODULE, 474f2e9394dSSachin Kamat .of_match_table = kirkwood_pinctrl_of_match, 47506763c74SThomas Petazzoni }, 47606763c74SThomas Petazzoni .probe = kirkwood_pinctrl_probe, 477150632b0SGreg Kroah-Hartman .remove = kirkwood_pinctrl_remove, 47806763c74SThomas Petazzoni }; 47906763c74SThomas Petazzoni 48006763c74SThomas Petazzoni module_platform_driver(kirkwood_pinctrl_driver); 48106763c74SThomas Petazzoni 48206763c74SThomas Petazzoni MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); 48306763c74SThomas Petazzoni MODULE_DESCRIPTION("Marvell Kirkwood pinctrl driver"); 48406763c74SThomas Petazzoni MODULE_LICENSE("GPL v2"); 485