162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Marvell Armada CP110 pinctrl driver based on mvebu pinctrl core 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2017 Marvell 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Hanna Hawa <hannah@marvell.com> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include <linux/err.h> 1162306a36Sopenharmony_ci#include <linux/init.h> 1262306a36Sopenharmony_ci#include <linux/io.h> 1362306a36Sopenharmony_ci#include <linux/mfd/syscon.h> 1462306a36Sopenharmony_ci#include <linux/of.h> 1562306a36Sopenharmony_ci#include <linux/of_device.h> 1662306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 1762306a36Sopenharmony_ci#include <linux/platform_device.h> 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#include "pinctrl-mvebu.h" 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* 2262306a36Sopenharmony_ci * Even if the pin controller is the same the MMP available depend on the SoC 2362306a36Sopenharmony_ci * integration. 2462306a36Sopenharmony_ci * - In Armada7K (single CP) almost all the MPPs are available (except the 2562306a36Sopenharmony_ci * MMP 39 to 43) 2662306a36Sopenharmony_ci * - In Armada8K (dual CP) the MPPs are split into 2 parts, MPPs 0-31 from 2762306a36Sopenharmony_ci * CPS, and MPPs 32-62 from CPM, the below flags (V_ARMADA_8K_CPM, 2862306a36Sopenharmony_ci * V_ARMADA_8K_CPS) set which MPP is available to the CPx. 2962306a36Sopenharmony_ci * The x_PLUS enum mean that the MPP available for CPx and for Armada70x0 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_cienum { 3262306a36Sopenharmony_ci V_ARMADA_7K = BIT(0), 3362306a36Sopenharmony_ci V_ARMADA_8K_CPM = BIT(1), 3462306a36Sopenharmony_ci V_ARMADA_8K_CPS = BIT(2), 3562306a36Sopenharmony_ci V_CP115_STANDALONE = BIT(3), 3662306a36Sopenharmony_ci V_ARMADA_7K_8K_CPM = (V_ARMADA_7K | V_ARMADA_8K_CPM), 3762306a36Sopenharmony_ci V_ARMADA_7K_8K_CPS = (V_ARMADA_7K | V_ARMADA_8K_CPS), 3862306a36Sopenharmony_ci}; 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_cistatic struct mvebu_mpp_mode armada_cp110_mpp_modes[] = { 4162306a36Sopenharmony_ci MPP_MODE(0, 4262306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 4362306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ale1"), 4462306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2smclk"), 4562306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd3"), 4662306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 4762306a36Sopenharmony_ci MPP_FUNCTION(6, "ptp", "pulse"), 4862306a36Sopenharmony_ci MPP_FUNCTION(7, "mss_i2c", "sda"), 4962306a36Sopenharmony_ci MPP_FUNCTION(8, "uart0", "rxd"), 5062306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 5162306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio")), 5262306a36Sopenharmony_ci MPP_MODE(1, 5362306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 5462306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ale0"), 5562306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sdo_spdifo"), 5662306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd2"), 5762306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 5862306a36Sopenharmony_ci MPP_FUNCTION(6, "ptp", "clk"), 5962306a36Sopenharmony_ci MPP_FUNCTION(7, "mss_i2c", "sck"), 6062306a36Sopenharmony_ci MPP_FUNCTION(8, "uart0", "txd"), 6162306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 6262306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc")), 6362306a36Sopenharmony_ci MPP_MODE(2, 6462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 6562306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad15"), 6662306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sextclk"), 6762306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd1"), 6862306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 6962306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 7062306a36Sopenharmony_ci MPP_FUNCTION(6, "ptp", "pclk_out"), 7162306a36Sopenharmony_ci MPP_FUNCTION(7, "i2c1", "sck"), 7262306a36Sopenharmony_ci MPP_FUNCTION(8, "uart1", "rxd"), 7362306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 7462306a36Sopenharmony_ci MPP_FUNCTION(10, "xg", "mdc")), 7562306a36Sopenharmony_ci MPP_MODE(3, 7662306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 7762306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad14"), 7862306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2slrclk"), 7962306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxd0"), 8062306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 8162306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 8262306a36Sopenharmony_ci MPP_FUNCTION(6, "pcie", "rstoutn"), 8362306a36Sopenharmony_ci MPP_FUNCTION(7, "i2c1", "sda"), 8462306a36Sopenharmony_ci MPP_FUNCTION(8, "uart1", "txd"), 8562306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 8662306a36Sopenharmony_ci MPP_FUNCTION(10, "xg", "mdio")), 8762306a36Sopenharmony_ci MPP_MODE(4, 8862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 8962306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad13"), 9062306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sbclk"), 9162306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxctl"), 9262306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 9362306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 9462306a36Sopenharmony_ci MPP_FUNCTION(6, "uart1", "cts"), 9562306a36Sopenharmony_ci MPP_FUNCTION(7, "pcie0", "clkreq"), 9662306a36Sopenharmony_ci MPP_FUNCTION(8, "uart3", "rxd"), 9762306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc")), 9862306a36Sopenharmony_ci MPP_MODE(5, 9962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 10062306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad12"), 10162306a36Sopenharmony_ci MPP_FUNCTION(2, "au", "i2sdi"), 10262306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "rxclk"), 10362306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 10462306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 10562306a36Sopenharmony_ci MPP_FUNCTION(6, "uart1", "rts"), 10662306a36Sopenharmony_ci MPP_FUNCTION(7, "pcie1", "clkreq"), 10762306a36Sopenharmony_ci MPP_FUNCTION(8, "uart3", "txd"), 10862306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio")), 10962306a36Sopenharmony_ci MPP_MODE(6, 11062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 11162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad11"), 11262306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd3"), 11362306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn2"), 11462306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 11562306a36Sopenharmony_ci MPP_FUNCTION(6, "sata1", "present_act"), 11662306a36Sopenharmony_ci MPP_FUNCTION(7, "pcie2", "clkreq"), 11762306a36Sopenharmony_ci MPP_FUNCTION(8, "uart0", "rxd"), 11862306a36Sopenharmony_ci MPP_FUNCTION(9, "ptp", "pulse")), 11962306a36Sopenharmony_ci MPP_MODE(7, 12062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 12162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad10"), 12262306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd2"), 12362306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn1"), 12462306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn1"), 12562306a36Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 12662306a36Sopenharmony_ci MPP_FUNCTION(7, "led", "data"), 12762306a36Sopenharmony_ci MPP_FUNCTION(8, "uart0", "txd"), 12862306a36Sopenharmony_ci MPP_FUNCTION(9, "ptp", "clk")), 12962306a36Sopenharmony_ci MPP_MODE(8, 13062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 13162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad9"), 13262306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd1"), 13362306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn0"), 13462306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn0"), 13562306a36Sopenharmony_ci MPP_FUNCTION(6, "uart0", "cts"), 13662306a36Sopenharmony_ci MPP_FUNCTION(7, "led", "stb"), 13762306a36Sopenharmony_ci MPP_FUNCTION(8, "uart2", "rxd"), 13862306a36Sopenharmony_ci MPP_FUNCTION(9, "ptp", "pclk_out"), 13962306a36Sopenharmony_ci MPP_FUNCTION(10, "synce1", "clk")), 14062306a36Sopenharmony_ci MPP_MODE(9, 14162306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 14262306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad8"), 14362306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txd0"), 14462306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "mosi"), 14562306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "mosi"), 14662306a36Sopenharmony_ci MPP_FUNCTION(7, "pcie", "rstoutn"), 14762306a36Sopenharmony_ci MPP_FUNCTION(10, "synce2", "clk")), 14862306a36Sopenharmony_ci MPP_MODE(10, 14962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 15062306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "readyn"), 15162306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txctl"), 15262306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "miso"), 15362306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "miso"), 15462306a36Sopenharmony_ci MPP_FUNCTION(6, "uart0", "cts"), 15562306a36Sopenharmony_ci MPP_FUNCTION(7, "sata1", "present_act")), 15662306a36Sopenharmony_ci MPP_MODE(11, 15762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 15862306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "wen1"), 15962306a36Sopenharmony_ci MPP_FUNCTION(3, "ge0", "txclkout"), 16062306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "clk"), 16162306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "clk"), 16262306a36Sopenharmony_ci MPP_FUNCTION(6, "uart0", "rts"), 16362306a36Sopenharmony_ci MPP_FUNCTION(7, "led", "clk"), 16462306a36Sopenharmony_ci MPP_FUNCTION(8, "uart2", "txd"), 16562306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act")), 16662306a36Sopenharmony_ci MPP_MODE(12, 16762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 16862306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "clk_out"), 16962306a36Sopenharmony_ci MPP_FUNCTION(2, "nf", "rbn1"), 17062306a36Sopenharmony_ci MPP_FUNCTION(3, "spi1", "csn1"), 17162306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxclk")), 17262306a36Sopenharmony_ci MPP_MODE(13, 17362306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 17462306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "burstn"), 17562306a36Sopenharmony_ci MPP_FUNCTION(2, "nf", "rbn0"), 17662306a36Sopenharmony_ci MPP_FUNCTION(3, "spi1", "miso"), 17762306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxctl"), 17862306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "miso")), 17962306a36Sopenharmony_ci MPP_MODE(14, 18062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 18162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "bootcsn"), 18262306a36Sopenharmony_ci MPP_FUNCTION(2, "dev", "csn0"), 18362306a36Sopenharmony_ci MPP_FUNCTION(3, "spi1", "csn0"), 18462306a36Sopenharmony_ci MPP_FUNCTION(4, "spi0", "csn3"), 18562306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 18662306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 18762306a36Sopenharmony_ci MPP_FUNCTION(7, "sata0", "present_act"), 18862306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "csn")), 18962306a36Sopenharmony_ci MPP_MODE(15, 19062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 19162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad7"), 19262306a36Sopenharmony_ci MPP_FUNCTION(3, "spi1", "mosi"), 19362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 19462306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "mosi"), 19562306a36Sopenharmony_ci MPP_FUNCTION(11, "ptp", "pulse_cp2cp")), 19662306a36Sopenharmony_ci MPP_MODE(16, 19762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 19862306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad6"), 19962306a36Sopenharmony_ci MPP_FUNCTION(3, "spi1", "clk"), 20062306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_spi", "clk")), 20162306a36Sopenharmony_ci MPP_MODE(17, 20262306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 20362306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad5"), 20462306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd3")), 20562306a36Sopenharmony_ci MPP_MODE(18, 20662306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 20762306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad4"), 20862306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd2"), 20962306a36Sopenharmony_ci MPP_FUNCTION(11, "ptp", "clk_cp2cp")), 21062306a36Sopenharmony_ci MPP_MODE(19, 21162306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 21262306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad3"), 21362306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd1"), 21462306a36Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "out_cp2cp")), 21562306a36Sopenharmony_ci MPP_MODE(20, 21662306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 21762306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad2"), 21862306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txd0")), 21962306a36Sopenharmony_ci MPP_MODE(21, 22062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 22162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad1"), 22262306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txctl"), 22362306a36Sopenharmony_ci MPP_FUNCTION(11, "sei", "in_cp2cp")), 22462306a36Sopenharmony_ci MPP_MODE(22, 22562306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 22662306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "ad0"), 22762306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "txclkout"), 22862306a36Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "in_cp2cp")), 22962306a36Sopenharmony_ci MPP_MODE(23, 23062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 23162306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "a1"), 23262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 23362306a36Sopenharmony_ci MPP_FUNCTION(11, "link", "rd_in_cp2cp")), 23462306a36Sopenharmony_ci MPP_MODE(24, 23562306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 23662306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "a0"), 23762306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk")), 23862306a36Sopenharmony_ci MPP_MODE(25, 23962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 24062306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "oen"), 24162306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo")), 24262306a36Sopenharmony_ci MPP_MODE(26, 24362306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 24462306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "wen0"), 24562306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk")), 24662306a36Sopenharmony_ci MPP_MODE(27, 24762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 24862306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn0"), 24962306a36Sopenharmony_ci MPP_FUNCTION(2, "spi1", "miso"), 25062306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio4", NULL), 25162306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd3"), 25262306a36Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn4"), 25362306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 25462306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 25562306a36Sopenharmony_ci MPP_FUNCTION(10, "uart0", "rts"), 25662306a36Sopenharmony_ci MPP_FUNCTION(11, "rei", "in_cp2cp")), 25762306a36Sopenharmony_ci MPP_MODE(28, 25862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 25962306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn1"), 26062306a36Sopenharmony_ci MPP_FUNCTION(2, "spi1", "csn0"), 26162306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio5", NULL), 26262306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd2"), 26362306a36Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn5"), 26462306a36Sopenharmony_ci MPP_FUNCTION(6, "pcie2", "clkreq"), 26562306a36Sopenharmony_ci MPP_FUNCTION(7, "ptp", "pulse"), 26662306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 26762306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 26862306a36Sopenharmony_ci MPP_FUNCTION(10, "uart0", "cts"), 26962306a36Sopenharmony_ci MPP_FUNCTION(11, "led", "data")), 27062306a36Sopenharmony_ci MPP_MODE(29, 27162306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 27262306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn2"), 27362306a36Sopenharmony_ci MPP_FUNCTION(2, "spi1", "mosi"), 27462306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio6", NULL), 27562306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd1"), 27662306a36Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn6"), 27762306a36Sopenharmony_ci MPP_FUNCTION(6, "pcie1", "clkreq"), 27862306a36Sopenharmony_ci MPP_FUNCTION(7, "ptp", "clk"), 27962306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_i2c", "sda"), 28062306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 28162306a36Sopenharmony_ci MPP_FUNCTION(10, "uart0", "rxd"), 28262306a36Sopenharmony_ci MPP_FUNCTION(11, "led", "stb")), 28362306a36Sopenharmony_ci MPP_MODE(30, 28462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 28562306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "csn3"), 28662306a36Sopenharmony_ci MPP_FUNCTION(2, "spi1", "clk"), 28762306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio7", NULL), 28862306a36Sopenharmony_ci MPP_FUNCTION(4, "ge0", "rxd0"), 28962306a36Sopenharmony_ci MPP_FUNCTION(5, "spi0", "csn7"), 29062306a36Sopenharmony_ci MPP_FUNCTION(6, "pcie0", "clkreq"), 29162306a36Sopenharmony_ci MPP_FUNCTION(7, "ptp", "pclk_out"), 29262306a36Sopenharmony_ci MPP_FUNCTION(8, "mss_i2c", "sck"), 29362306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 29462306a36Sopenharmony_ci MPP_FUNCTION(10, "uart0", "txd"), 29562306a36Sopenharmony_ci MPP_FUNCTION(11, "led", "clk")), 29662306a36Sopenharmony_ci MPP_MODE(31, 29762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 29862306a36Sopenharmony_ci MPP_FUNCTION(1, "dev", "a2"), 29962306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_gpio4", NULL), 30062306a36Sopenharmony_ci MPP_FUNCTION(6, "pcie", "rstoutn"), 30162306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc")), 30262306a36Sopenharmony_ci MPP_MODE(32, 30362306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 30462306a36Sopenharmony_ci MPP_FUNCTION(1, "mii", "col"), 30562306a36Sopenharmony_ci MPP_FUNCTION(2, "mii", "txerr"), 30662306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "miso"), 30762306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 30862306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 30962306a36Sopenharmony_ci MPP_FUNCTION(6, "au", "i2sdi"), 31062306a36Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdio"), 31162306a36Sopenharmony_ci MPP_FUNCTION(8, "sdio", "v18_en"), 31262306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie1", "clkreq"), 31362306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio0", NULL)), 31462306a36Sopenharmony_ci MPP_MODE(33, 31562306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 31662306a36Sopenharmony_ci MPP_FUNCTION(1, "mii", "txclk"), 31762306a36Sopenharmony_ci MPP_FUNCTION(2, "sdio", "pwr10"), 31862306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "csn"), 31962306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 32062306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 32162306a36Sopenharmony_ci MPP_FUNCTION(6, "sdio", "bus_pwr"), 32262306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 32362306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie2", "clkreq"), 32462306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio1", NULL)), 32562306a36Sopenharmony_ci MPP_MODE(34, 32662306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 32762306a36Sopenharmony_ci MPP_FUNCTION(1, "mii", "rxerr"), 32862306a36Sopenharmony_ci MPP_FUNCTION(2, "sdio", "pwr11"), 32962306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "mosi"), 33062306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 33162306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk"), 33262306a36Sopenharmony_ci MPP_FUNCTION(6, "sdio", "wr_protect"), 33362306a36Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdc"), 33462306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie0", "clkreq"), 33562306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio2", NULL)), 33662306a36Sopenharmony_ci MPP_MODE(35, 33762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 33862306a36Sopenharmony_ci MPP_FUNCTION(1, "sata1", "present_act"), 33962306a36Sopenharmony_ci MPP_FUNCTION(2, "i2c1", "sda"), 34062306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_spi", "clk"), 34162306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 34262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo"), 34362306a36Sopenharmony_ci MPP_FUNCTION(6, "sdio", "card_detect"), 34462306a36Sopenharmony_ci MPP_FUNCTION(7, "xg", "mdio"), 34562306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 34662306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn"), 34762306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio3", NULL)), 34862306a36Sopenharmony_ci MPP_MODE(36, 34962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 35062306a36Sopenharmony_ci MPP_FUNCTION(1, "synce2", "clk"), 35162306a36Sopenharmony_ci MPP_FUNCTION(2, "i2c1", "sck"), 35262306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 35362306a36Sopenharmony_ci MPP_FUNCTION(4, "synce1", "clk"), 35462306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk"), 35562306a36Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 35662306a36Sopenharmony_ci MPP_FUNCTION(7, "xg", "mdc"), 35762306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 35862306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie2", "clkreq"), 35962306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio5", NULL)), 36062306a36Sopenharmony_ci MPP_MODE(37, 36162306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 36262306a36Sopenharmony_ci MPP_FUNCTION(1, "uart2", "rxd"), 36362306a36Sopenharmony_ci MPP_FUNCTION(2, "i2c0", "sck"), 36462306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 36562306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 36662306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_i2c", "sck"), 36762306a36Sopenharmony_ci MPP_FUNCTION(6, "sata1", "present_act"), 36862306a36Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdc"), 36962306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 37062306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie1", "clkreq"), 37162306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio6", NULL), 37262306a36Sopenharmony_ci MPP_FUNCTION(11, "link", "rd_out_cp2cp")), 37362306a36Sopenharmony_ci MPP_MODE(38, 37462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 37562306a36Sopenharmony_ci MPP_FUNCTION(1, "uart2", "txd"), 37662306a36Sopenharmony_ci MPP_FUNCTION(2, "i2c0", "sda"), 37762306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 37862306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 37962306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_i2c", "sda"), 38062306a36Sopenharmony_ci MPP_FUNCTION(6, "sata0", "present_act"), 38162306a36Sopenharmony_ci MPP_FUNCTION(7, "ge", "mdio"), 38262306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 38362306a36Sopenharmony_ci MPP_FUNCTION(9, "au", "i2sextclk"), 38462306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio7", NULL), 38562306a36Sopenharmony_ci MPP_FUNCTION(11, "ptp", "pulse_cp2cp")), 38662306a36Sopenharmony_ci MPP_MODE(39, 38762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 38862306a36Sopenharmony_ci MPP_FUNCTION(1, "sdio", "wr_protect"), 38962306a36Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sbclk"), 39062306a36Sopenharmony_ci MPP_FUNCTION(5, "ptp", "clk"), 39162306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn1"), 39262306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 39362306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio0", NULL)), 39462306a36Sopenharmony_ci MPP_MODE(40, 39562306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 39662306a36Sopenharmony_ci MPP_FUNCTION(1, "sdio", "pwr11"), 39762306a36Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 39862306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_i2c", "sda"), 39962306a36Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sdo_spdifo"), 40062306a36Sopenharmony_ci MPP_FUNCTION(5, "ptp", "pclk_out"), 40162306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "clk"), 40262306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 40362306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 40462306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 40562306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio1", NULL)), 40662306a36Sopenharmony_ci MPP_MODE(41, 40762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 40862306a36Sopenharmony_ci MPP_FUNCTION(1, "sdio", "pwr10"), 40962306a36Sopenharmony_ci MPP_FUNCTION(2, "sdio", "bus_pwr"), 41062306a36Sopenharmony_ci MPP_FUNCTION(3, "mss_i2c", "sck"), 41162306a36Sopenharmony_ci MPP_FUNCTION(4, "au", "i2slrclk"), 41262306a36Sopenharmony_ci MPP_FUNCTION(5, "ptp", "pulse"), 41362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 41462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 41562306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc"), 41662306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 41762306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio2", NULL), 41862306a36Sopenharmony_ci MPP_FUNCTION(11, "rei", "out_cp2cp")), 41962306a36Sopenharmony_ci MPP_MODE(42, 42062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 42162306a36Sopenharmony_ci MPP_FUNCTION(1, "sdio", "v18_en"), 42262306a36Sopenharmony_ci MPP_FUNCTION(2, "sdio", "wr_protect"), 42362306a36Sopenharmony_ci MPP_FUNCTION(3, "synce2", "clk"), 42462306a36Sopenharmony_ci MPP_FUNCTION(4, "au", "i2smclk"), 42562306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "txd"), 42662306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 42762306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 42862306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 42962306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 43062306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio4", NULL)), 43162306a36Sopenharmony_ci MPP_MODE(43, 43262306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 43362306a36Sopenharmony_ci MPP_FUNCTION(1, "sdio", "card_detect"), 43462306a36Sopenharmony_ci MPP_FUNCTION(3, "synce1", "clk"), 43562306a36Sopenharmony_ci MPP_FUNCTION(4, "au", "i2sextclk"), 43662306a36Sopenharmony_ci MPP_FUNCTION(5, "mss_uart", "rxd"), 43762306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn0"), 43862306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rts"), 43962306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 44062306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 44162306a36Sopenharmony_ci MPP_FUNCTION(10, "mss_gpio5", NULL), 44262306a36Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "out_cp2cp")), 44362306a36Sopenharmony_ci MPP_MODE(44, 44462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 44562306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd2"), 44662306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rts"), 44762306a36Sopenharmony_ci MPP_FUNCTION(11, "ptp", "clk_cp2cp")), 44862306a36Sopenharmony_ci MPP_MODE(45, 44962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 45062306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd3"), 45162306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "txd"), 45262306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn")), 45362306a36Sopenharmony_ci MPP_MODE(46, 45462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 45562306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd1"), 45662306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rts")), 45762306a36Sopenharmony_ci MPP_MODE(47, 45862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 45962306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txd0"), 46062306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "clk"), 46162306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 46262306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdc")), 46362306a36Sopenharmony_ci MPP_MODE(48, 46462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 46562306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txctl_txen"), 46662306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "mosi"), 46762306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdc"), 46862306a36Sopenharmony_ci MPP_FUNCTION(11, "wakeup", "in_cp2cp")), 46962306a36Sopenharmony_ci MPP_MODE(49, 47062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 47162306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "txclkout"), 47262306a36Sopenharmony_ci MPP_FUNCTION(2, "mii", "crs"), 47362306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "miso"), 47462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 47562306a36Sopenharmony_ci MPP_FUNCTION(8, "ge", "mdio"), 47662306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie0", "clkreq"), 47762306a36Sopenharmony_ci MPP_FUNCTION(10, "sdio", "v18_en"), 47862306a36Sopenharmony_ci MPP_FUNCTION(11, "sei", "out_cp2cp")), 47962306a36Sopenharmony_ci MPP_MODE(50, 48062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 48162306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxclk"), 48262306a36Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sda"), 48362306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn0"), 48462306a36Sopenharmony_ci MPP_FUNCTION(6, "uart2", "txd"), 48562306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rxd"), 48662306a36Sopenharmony_ci MPP_FUNCTION(8, "xg", "mdio"), 48762306a36Sopenharmony_ci MPP_FUNCTION(10, "sdio", "pwr11")), 48862306a36Sopenharmony_ci MPP_MODE(51, 48962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 49062306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd0"), 49162306a36Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sck"), 49262306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn1"), 49362306a36Sopenharmony_ci MPP_FUNCTION(6, "uart2", "rxd"), 49462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "cts"), 49562306a36Sopenharmony_ci MPP_FUNCTION(10, "sdio", "pwr10")), 49662306a36Sopenharmony_ci MPP_MODE(52, 49762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 49862306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd1"), 49962306a36Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 50062306a36Sopenharmony_ci MPP_FUNCTION(4, "synce2", "clk"), 50162306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn2"), 50262306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 50362306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "clk"), 50462306a36Sopenharmony_ci MPP_FUNCTION(9, "pcie", "rstoutn"), 50562306a36Sopenharmony_ci MPP_FUNCTION(10, "pcie0", "clkreq")), 50662306a36Sopenharmony_ci MPP_MODE(53, 50762306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 50862306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd2"), 50962306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 51062306a36Sopenharmony_ci MPP_FUNCTION(5, "spi1", "csn3"), 51162306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 51262306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "stb"), 51362306a36Sopenharmony_ci MPP_FUNCTION(11, "sdio", "led")), 51462306a36Sopenharmony_ci MPP_MODE(54, 51562306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 51662306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxd3"), 51762306a36Sopenharmony_ci MPP_FUNCTION(2, "synce2", "clk"), 51862306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 51962306a36Sopenharmony_ci MPP_FUNCTION(4, "synce1", "clk"), 52062306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "data"), 52162306a36Sopenharmony_ci MPP_FUNCTION(10, "sdio", "hw_rst"), 52262306a36Sopenharmony_ci MPP_FUNCTION(11, "sdio_wp", "wr_protect")), 52362306a36Sopenharmony_ci MPP_MODE(55, 52462306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 52562306a36Sopenharmony_ci MPP_FUNCTION(1, "ge1", "rxctl_rxdv"), 52662306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 52762306a36Sopenharmony_ci MPP_FUNCTION(10, "sdio", "led"), 52862306a36Sopenharmony_ci MPP_FUNCTION(11, "sdio_cd", "card_detect")), 52962306a36Sopenharmony_ci MPP_MODE(56, 53062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 53162306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "drx"), 53262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdo_spdifo"), 53362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "clk"), 53462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "rxd"), 53562306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 53662306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "clk")), 53762306a36Sopenharmony_ci MPP_MODE(57, 53862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 53962306a36Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sda"), 54062306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 54162306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "intn"), 54262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sbclk"), 54362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "mosi"), 54462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "txd"), 54562306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 54662306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "cmd")), 54762306a36Sopenharmony_ci MPP_MODE(58, 54862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 54962306a36Sopenharmony_ci MPP_FUNCTION(2, "mss_i2c", "sck"), 55062306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 55162306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "rstn"), 55262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sdi"), 55362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "miso"), 55462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart1", "cts"), 55562306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "clk"), 55662306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d0")), 55762306a36Sopenharmony_ci MPP_MODE(59, 55862306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 55962306a36Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio7", NULL), 56062306a36Sopenharmony_ci MPP_FUNCTION(2, "synce2", "clk"), 56162306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "fsync"), 56262306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2slrclk"), 56362306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn0"), 56462306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "cts"), 56562306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "stb"), 56662306a36Sopenharmony_ci MPP_FUNCTION(9, "uart1", "txd"), 56762306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d1")), 56862306a36Sopenharmony_ci MPP_MODE(60, 56962306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 57062306a36Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio6", NULL), 57162306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pulse"), 57262306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "dtx"), 57362306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2smclk"), 57462306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn1"), 57562306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rts"), 57662306a36Sopenharmony_ci MPP_FUNCTION(8, "led", "data"), 57762306a36Sopenharmony_ci MPP_FUNCTION(9, "uart1", "rxd"), 57862306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d2")), 57962306a36Sopenharmony_ci MPP_MODE(61, 58062306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 58162306a36Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio5", NULL), 58262306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "clk"), 58362306a36Sopenharmony_ci MPP_FUNCTION(4, "tdm", "pclk"), 58462306a36Sopenharmony_ci MPP_FUNCTION(5, "au", "i2sextclk"), 58562306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn2"), 58662306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "txd"), 58762306a36Sopenharmony_ci MPP_FUNCTION(8, "uart2", "txd"), 58862306a36Sopenharmony_ci MPP_FUNCTION(9, "sata1", "present_act"), 58962306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdio"), 59062306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "d3")), 59162306a36Sopenharmony_ci MPP_MODE(62, 59262306a36Sopenharmony_ci MPP_FUNCTION(0, "gpio", NULL), 59362306a36Sopenharmony_ci MPP_FUNCTION(1, "mss_gpio4", NULL), 59462306a36Sopenharmony_ci MPP_FUNCTION(2, "synce1", "clk"), 59562306a36Sopenharmony_ci MPP_FUNCTION(3, "ptp", "pclk_out"), 59662306a36Sopenharmony_ci MPP_FUNCTION(5, "sata1", "present_act"), 59762306a36Sopenharmony_ci MPP_FUNCTION(6, "spi0", "csn3"), 59862306a36Sopenharmony_ci MPP_FUNCTION(7, "uart0", "rxd"), 59962306a36Sopenharmony_ci MPP_FUNCTION(8, "uart2", "rxd"), 60062306a36Sopenharmony_ci MPP_FUNCTION(9, "sata0", "present_act"), 60162306a36Sopenharmony_ci MPP_FUNCTION(10, "ge", "mdc"), 60262306a36Sopenharmony_ci MPP_FUNCTION(14, "sdio", "ds")), 60362306a36Sopenharmony_ci}; 60462306a36Sopenharmony_ci 60562306a36Sopenharmony_cistatic const struct of_device_id armada_cp110_pinctrl_of_match[] = { 60662306a36Sopenharmony_ci { 60762306a36Sopenharmony_ci .compatible = "marvell,armada-7k-pinctrl", 60862306a36Sopenharmony_ci .data = (void *) V_ARMADA_7K, 60962306a36Sopenharmony_ci }, 61062306a36Sopenharmony_ci { 61162306a36Sopenharmony_ci .compatible = "marvell,armada-8k-cpm-pinctrl", 61262306a36Sopenharmony_ci .data = (void *) V_ARMADA_8K_CPM, 61362306a36Sopenharmony_ci }, 61462306a36Sopenharmony_ci { 61562306a36Sopenharmony_ci .compatible = "marvell,armada-8k-cps-pinctrl", 61662306a36Sopenharmony_ci .data = (void *) V_ARMADA_8K_CPS, 61762306a36Sopenharmony_ci }, 61862306a36Sopenharmony_ci { 61962306a36Sopenharmony_ci .compatible = "marvell,cp115-standalone-pinctrl", 62062306a36Sopenharmony_ci .data = (void *) V_CP115_STANDALONE, 62162306a36Sopenharmony_ci }, 62262306a36Sopenharmony_ci { }, 62362306a36Sopenharmony_ci}; 62462306a36Sopenharmony_ci 62562306a36Sopenharmony_cistatic const struct mvebu_mpp_ctrl armada_cp110_mpp_controls[] = { 62662306a36Sopenharmony_ci MPP_FUNC_CTRL(0, 62, NULL, mvebu_regmap_mpp_ctrl), 62762306a36Sopenharmony_ci}; 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_cistatic void mvebu_pinctrl_assign_variant(struct mvebu_mpp_mode *m, 63062306a36Sopenharmony_ci u8 variant) 63162306a36Sopenharmony_ci{ 63262306a36Sopenharmony_ci struct mvebu_mpp_ctrl_setting *s; 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ci for (s = m->settings ; s->name ; s++) 63562306a36Sopenharmony_ci s->variant = variant; 63662306a36Sopenharmony_ci} 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_cistatic int armada_cp110_pinctrl_probe(struct platform_device *pdev) 63962306a36Sopenharmony_ci{ 64062306a36Sopenharmony_ci struct mvebu_pinctrl_soc_info *soc; 64162306a36Sopenharmony_ci const struct of_device_id *match = 64262306a36Sopenharmony_ci of_match_device(armada_cp110_pinctrl_of_match, &pdev->dev); 64362306a36Sopenharmony_ci int i; 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_ci if (!pdev->dev.parent) 64662306a36Sopenharmony_ci return -ENODEV; 64762306a36Sopenharmony_ci 64862306a36Sopenharmony_ci soc = devm_kzalloc(&pdev->dev, 64962306a36Sopenharmony_ci sizeof(struct mvebu_pinctrl_soc_info), GFP_KERNEL); 65062306a36Sopenharmony_ci if (!soc) 65162306a36Sopenharmony_ci return -ENOMEM; 65262306a36Sopenharmony_ci 65362306a36Sopenharmony_ci soc->variant = (unsigned long) match->data & 0xff; 65462306a36Sopenharmony_ci soc->controls = armada_cp110_mpp_controls; 65562306a36Sopenharmony_ci soc->ncontrols = ARRAY_SIZE(armada_cp110_mpp_controls); 65662306a36Sopenharmony_ci soc->modes = armada_cp110_mpp_modes; 65762306a36Sopenharmony_ci soc->nmodes = ARRAY_SIZE(armada_cp110_mpp_modes); 65862306a36Sopenharmony_ci for (i = 0; i < ARRAY_SIZE(armada_cp110_mpp_modes); i++) { 65962306a36Sopenharmony_ci struct mvebu_mpp_mode *m = &armada_cp110_mpp_modes[i]; 66062306a36Sopenharmony_ci 66162306a36Sopenharmony_ci switch (i) { 66262306a36Sopenharmony_ci case 0 ... 31: 66362306a36Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPS | 66462306a36Sopenharmony_ci V_CP115_STANDALONE)); 66562306a36Sopenharmony_ci break; 66662306a36Sopenharmony_ci case 32 ... 38: 66762306a36Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPM | 66862306a36Sopenharmony_ci V_CP115_STANDALONE)); 66962306a36Sopenharmony_ci break; 67062306a36Sopenharmony_ci case 39 ... 43: 67162306a36Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_8K_CPM | 67262306a36Sopenharmony_ci V_CP115_STANDALONE)); 67362306a36Sopenharmony_ci break; 67462306a36Sopenharmony_ci case 44 ... 62: 67562306a36Sopenharmony_ci mvebu_pinctrl_assign_variant(m, (V_ARMADA_7K_8K_CPM | 67662306a36Sopenharmony_ci V_CP115_STANDALONE)); 67762306a36Sopenharmony_ci break; 67862306a36Sopenharmony_ci } 67962306a36Sopenharmony_ci } 68062306a36Sopenharmony_ci pdev->dev.platform_data = soc; 68162306a36Sopenharmony_ci 68262306a36Sopenharmony_ci return mvebu_pinctrl_simple_regmap_probe(pdev, pdev->dev.parent, 0); 68362306a36Sopenharmony_ci} 68462306a36Sopenharmony_ci 68562306a36Sopenharmony_cistatic struct platform_driver armada_cp110_pinctrl_driver = { 68662306a36Sopenharmony_ci .driver = { 68762306a36Sopenharmony_ci .name = "armada-cp110-pinctrl", 68862306a36Sopenharmony_ci .of_match_table = of_match_ptr(armada_cp110_pinctrl_of_match), 68962306a36Sopenharmony_ci }, 69062306a36Sopenharmony_ci .probe = armada_cp110_pinctrl_probe, 69162306a36Sopenharmony_ci}; 69262306a36Sopenharmony_ci 69362306a36Sopenharmony_cibuiltin_platform_driver(armada_cp110_pinctrl_driver); 694