18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright 2019 NXP 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <linux/err.h> 78c2ecf20Sopenharmony_ci#include <linux/init.h> 88c2ecf20Sopenharmony_ci#include <linux/module.h> 98c2ecf20Sopenharmony_ci#include <linux/of.h> 108c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 118c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include "pinctrl-imx.h" 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cienum imx8mp_pads { 168c2ecf20Sopenharmony_ci MX8MP_IOMUXC_RESERVE0 = 0, 178c2ecf20Sopenharmony_ci MX8MP_IOMUXC_RESERVE1 = 1, 188c2ecf20Sopenharmony_ci MX8MP_IOMUXC_RESERVE2 = 2, 198c2ecf20Sopenharmony_ci MX8MP_IOMUXC_RESERVE3 = 3, 208c2ecf20Sopenharmony_ci MX8MP_IOMUXC_RESERVE4 = 4, 218c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO00 = 5, 228c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO01 = 6, 238c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO02 = 7, 248c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO03 = 8, 258c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO04 = 9, 268c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO05 = 10, 278c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO06 = 11, 288c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO07 = 12, 298c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO08 = 13, 308c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO09 = 14, 318c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO10 = 15, 328c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO11 = 16, 338c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO12 = 17, 348c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO13 = 18, 358c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO14 = 19, 368c2ecf20Sopenharmony_ci MX8MP_IOMUXC_GPIO1_IO15 = 20, 378c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_MDC = 21, 388c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_MDIO = 22, 398c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TD3 = 23, 408c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TD2 = 24, 418c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TD1 = 25, 428c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TD0 = 26, 438c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TX_CTL = 27, 448c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_TXC = 28, 458c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RX_CTL = 29, 468c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RXC = 30, 478c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RD0 = 31, 488c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RD1 = 32, 498c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RD2 = 33, 508c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ENET_RD3 = 34, 518c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_CLK = 35, 528c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_CMD = 36, 538c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA0 = 37, 548c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA1 = 38, 558c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA2 = 39, 568c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA3 = 40, 578c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA4 = 41, 588c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA5 = 42, 598c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA6 = 43, 608c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_DATA7 = 44, 618c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_RESET_B = 45, 628c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD1_STROBE = 46, 638c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_CD_B = 47, 648c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_CLK = 48, 658c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_CMD = 49, 668c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_DATA0 = 50, 678c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_DATA1 = 51, 688c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_DATA2 = 52, 698c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_DATA3 = 53, 708c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_RESET_B = 54, 718c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SD2_WP = 55, 728c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_ALE = 56, 738c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_CE0_B = 57, 748c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_CE1_B = 58, 758c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_CE2_B = 59, 768c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_CE3_B = 60, 778c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_CLE = 61, 788c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA00 = 62, 798c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA01 = 63, 808c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA02 = 64, 818c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA03 = 65, 828c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA04 = 66, 838c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA05 = 67, 848c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA06 = 68, 858c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DATA07 = 69, 868c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_DQS = 70, 878c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_RE_B = 71, 888c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_READY_B = 72, 898c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_WE_B = 73, 908c2ecf20Sopenharmony_ci MX8MP_IOMUXC_NAND_WP_B = 74, 918c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXFS = 75, 928c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXC = 76, 938c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXD0 = 77, 948c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXD1 = 78, 958c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXD2 = 79, 968c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_RXD3 = 80, 978c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI5_MCLK = 81, 988c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXFS = 82, 998c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXC = 83, 1008c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD0 = 84, 1018c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD1 = 85, 1028c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD2 = 86, 1038c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD3 = 87, 1048c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD4 = 88, 1058c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD5 = 89, 1068c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD6 = 90, 1078c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_RXD7 = 91, 1088c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXFS = 92, 1098c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXC = 93, 1108c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD0 = 94, 1118c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD1 = 95, 1128c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD2 = 96, 1138c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD3 = 97, 1148c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD4 = 98, 1158c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD5 = 99, 1168c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD6 = 100, 1178c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_TXD7 = 101, 1188c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI1_MCLK = 102, 1198c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_RXFS = 103, 1208c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_RXC = 104, 1218c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_RXD0 = 105, 1228c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_TXFS = 106, 1238c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_TXC = 107, 1248c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_TXD0 = 108, 1258c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI2_MCLK = 109, 1268c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_RXFS = 110, 1278c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_RXC = 111, 1288c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_RXD = 112, 1298c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_TXFS = 113, 1308c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_TXC = 114, 1318c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_TXD = 115, 1328c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SAI3_MCLK = 116, 1338c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SPDIF_TX = 117, 1348c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SPDIF_RX = 118, 1358c2ecf20Sopenharmony_ci MX8MP_IOMUXC_SPDIF_EXT_CLK = 119, 1368c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI1_SCLK = 120, 1378c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI1_MOSI = 121, 1388c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI1_MISO = 122, 1398c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI1_SS0 = 123, 1408c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI2_SCLK = 124, 1418c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI2_MOSI = 125, 1428c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI2_MISO = 126, 1438c2ecf20Sopenharmony_ci MX8MP_IOMUXC_ECSPI2_SS0 = 127, 1448c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C1_SCL = 128, 1458c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C1_SDA = 129, 1468c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C2_SCL = 130, 1478c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C2_SDA = 131, 1488c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C3_SCL = 132, 1498c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C3_SDA = 133, 1508c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C4_SCL = 134, 1518c2ecf20Sopenharmony_ci MX8MP_IOMUXC_I2C4_SDA = 135, 1528c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART1_RXD = 136, 1538c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART1_TXD = 137, 1548c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART2_RXD = 138, 1558c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART2_TXD = 139, 1568c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART3_RXD = 140, 1578c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART3_TXD = 141, 1588c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART4_RXD = 142, 1598c2ecf20Sopenharmony_ci MX8MP_IOMUXC_UART4_TXD = 143, 1608c2ecf20Sopenharmony_ci MX8MP_IOMUXC_HDMI_DDC_SCL = 144, 1618c2ecf20Sopenharmony_ci MX8MP_IOMUXC_HDMI_DDC_SDA = 145, 1628c2ecf20Sopenharmony_ci MX8MP_IOMUXC_HDMI_CEC = 146, 1638c2ecf20Sopenharmony_ci MX8MP_IOMUXC_HDMI_HPD = 147, 1648c2ecf20Sopenharmony_ci}; 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci/* Pad names for the pinmux subsystem */ 1678c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc imx8mp_pinctrl_pads[] = { 1688c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE0), 1698c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE1), 1708c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE2), 1718c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE3), 1728c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE4), 1738c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO00), 1748c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO01), 1758c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO02), 1768c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO03), 1778c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO04), 1788c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO05), 1798c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO06), 1808c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO07), 1818c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO08), 1828c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO09), 1838c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO10), 1848c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO11), 1858c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO12), 1868c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO13), 1878c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO14), 1888c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO15), 1898c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_MDC), 1908c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_MDIO), 1918c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD3), 1928c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD2), 1938c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD1), 1948c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD0), 1958c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TX_CTL), 1968c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TXC), 1978c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RX_CTL), 1988c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RXC), 1998c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD0), 2008c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD1), 2018c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD2), 2028c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD3), 2038c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_CLK), 2048c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_CMD), 2058c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA0), 2068c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA1), 2078c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA2), 2088c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA3), 2098c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA4), 2108c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA5), 2118c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA6), 2128c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA7), 2138c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_RESET_B), 2148c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_STROBE), 2158c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CD_B), 2168c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CLK), 2178c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CMD), 2188c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA0), 2198c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA1), 2208c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA2), 2218c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA3), 2228c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_RESET_B), 2238c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_WP), 2248c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_ALE), 2258c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE0_B), 2268c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE1_B), 2278c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE2_B), 2288c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE3_B), 2298c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CLE), 2308c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA00), 2318c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA01), 2328c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA02), 2338c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA03), 2348c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA04), 2358c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA05), 2368c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA06), 2378c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA07), 2388c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DQS), 2398c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_RE_B), 2408c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_READY_B), 2418c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_WE_B), 2428c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_WP_B), 2438c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXFS), 2448c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXC), 2458c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD0), 2468c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD1), 2478c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD2), 2488c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD3), 2498c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_MCLK), 2508c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXFS), 2518c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXC), 2528c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD0), 2538c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD1), 2548c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD2), 2558c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD3), 2568c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD4), 2578c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD5), 2588c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD6), 2598c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD7), 2608c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXFS), 2618c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXC), 2628c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD0), 2638c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD1), 2648c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD2), 2658c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD3), 2668c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD4), 2678c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD5), 2688c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD6), 2698c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD7), 2708c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_MCLK), 2718c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXFS), 2728c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXC), 2738c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXD0), 2748c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXFS), 2758c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXC), 2768c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXD0), 2778c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_MCLK), 2788c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXFS), 2798c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXC), 2808c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXD), 2818c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXFS), 2828c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXC), 2838c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXD), 2848c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_MCLK), 2858c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_TX), 2868c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_RX), 2878c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_EXT_CLK), 2888c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_SCLK), 2898c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_MOSI), 2908c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_MISO), 2918c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_SS0), 2928c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_SCLK), 2938c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_MOSI), 2948c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_MISO), 2958c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_SS0), 2968c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C1_SCL), 2978c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C1_SDA), 2988c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C2_SCL), 2998c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C2_SDA), 3008c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C3_SCL), 3018c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C3_SDA), 3028c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C4_SCL), 3038c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C4_SDA), 3048c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART1_RXD), 3058c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART1_TXD), 3068c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART2_RXD), 3078c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART2_TXD), 3088c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART3_RXD), 3098c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART3_TXD), 3108c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART4_RXD), 3118c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART4_TXD), 3128c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_DDC_SCL), 3138c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_DDC_SDA), 3148c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_CEC), 3158c2ecf20Sopenharmony_ci IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_HPD), 3168c2ecf20Sopenharmony_ci}; 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_cistatic const struct imx_pinctrl_soc_info imx8mp_pinctrl_info = { 3198c2ecf20Sopenharmony_ci .pins = imx8mp_pinctrl_pads, 3208c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(imx8mp_pinctrl_pads), 3218c2ecf20Sopenharmony_ci .gpr_compatible = "fsl,imx8mp-iomuxc-gpr", 3228c2ecf20Sopenharmony_ci}; 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_cistatic const struct of_device_id imx8mp_pinctrl_of_match[] = { 3258c2ecf20Sopenharmony_ci { .compatible = "fsl,imx8mp-iomuxc", .data = &imx8mp_pinctrl_info, }, 3268c2ecf20Sopenharmony_ci { /* sentinel */ } 3278c2ecf20Sopenharmony_ci}; 3288c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, imx8mp_pinctrl_of_match); 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_cistatic int imx8mp_pinctrl_probe(struct platform_device *pdev) 3318c2ecf20Sopenharmony_ci{ 3328c2ecf20Sopenharmony_ci return imx_pinctrl_probe(pdev, &imx8mp_pinctrl_info); 3338c2ecf20Sopenharmony_ci} 3348c2ecf20Sopenharmony_ci 3358c2ecf20Sopenharmony_cistatic struct platform_driver imx8mp_pinctrl_driver = { 3368c2ecf20Sopenharmony_ci .driver = { 3378c2ecf20Sopenharmony_ci .name = "imx8mp-pinctrl", 3388c2ecf20Sopenharmony_ci .of_match_table = of_match_ptr(imx8mp_pinctrl_of_match), 3398c2ecf20Sopenharmony_ci }, 3408c2ecf20Sopenharmony_ci .probe = imx8mp_pinctrl_probe, 3418c2ecf20Sopenharmony_ci}; 3428c2ecf20Sopenharmony_ci 3438c2ecf20Sopenharmony_cistatic int __init imx8mp_pinctrl_init(void) 3448c2ecf20Sopenharmony_ci{ 3458c2ecf20Sopenharmony_ci return platform_driver_register(&imx8mp_pinctrl_driver); 3468c2ecf20Sopenharmony_ci} 3478c2ecf20Sopenharmony_ciarch_initcall(imx8mp_pinctrl_init); 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ciMODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>"); 3508c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("NXP i.MX8MP pinctrl driver"); 3518c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 352