145b85fcaSLucas Stach // SPDX-License-Identifier: GPL-2.0 245b85fcaSLucas Stach /* 345b85fcaSLucas Stach * Copyright (C) 2016 Freescale Semiconductor, Inc. 445b85fcaSLucas Stach * Copyright 2017-2018 NXP 545b85fcaSLucas Stach * Copyright (C) 2018 Pengutronix, Lucas Stach <kernel@pengutronix.de> 645b85fcaSLucas Stach */ 745b85fcaSLucas Stach 845b85fcaSLucas Stach #include <linux/err.h> 945b85fcaSLucas Stach #include <linux/init.h> 1045b85fcaSLucas Stach #include <linux/io.h> 1145b85fcaSLucas Stach #include <linux/of.h> 1245b85fcaSLucas Stach #include <linux/of_device.h> 1345b85fcaSLucas Stach #include <linux/pinctrl/pinctrl.h> 1445b85fcaSLucas Stach 1545b85fcaSLucas Stach #include "pinctrl-imx.h" 1645b85fcaSLucas Stach 1745b85fcaSLucas Stach enum imx8mq_pads { 1845b85fcaSLucas Stach MX8MQ_PAD_RESERVE0 = 0, 1945b85fcaSLucas Stach MX8MQ_PAD_RESERVE1 = 1, 2045b85fcaSLucas Stach MX8MQ_PAD_RESERVE2 = 2, 2145b85fcaSLucas Stach MX8MQ_PAD_RESERVE3 = 3, 2245b85fcaSLucas Stach MX8MQ_PAD_RESERVE4 = 4, 2345b85fcaSLucas Stach MX8MQ_IOMUXC_PMIC_STBY_REQ_CCMSRCGPCMIX = 5, 2445b85fcaSLucas Stach MX8MQ_IOMUXC_PMIC_ON_REQ_SNVSMIX = 6, 2545b85fcaSLucas Stach MX8MQ_IOMUXC_ONOFF_SNVSMIX = 7, 2645b85fcaSLucas Stach MX8MQ_IOMUXC_POR_B_SNVSMIX = 8, 2745b85fcaSLucas Stach MX8MQ_IOMUXC_RTC_RESET_B_SNVSMIX = 9, 2845b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO00 = 10, 2945b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO01 = 11, 3045b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO02 = 12, 3145b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO03 = 13, 3245b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO04 = 14, 3345b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO05 = 15, 3445b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO06 = 16, 3545b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO07 = 17, 3645b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO08 = 18, 3745b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO09 = 19, 3845b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO10 = 20, 3945b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO11 = 21, 4045b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO12 = 22, 4145b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO13 = 23, 4245b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO14 = 24, 4345b85fcaSLucas Stach MX8MQ_IOMUXC_GPIO1_IO15 = 25, 4445b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_MDC = 26, 4545b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_MDIO = 27, 4645b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TD3 = 28, 4745b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TD2 = 29, 4845b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TD1 = 30, 4945b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TD0 = 31, 5045b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TX_CTL = 32, 5145b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_TXC = 33, 5245b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RX_CTL = 34, 5345b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RXC = 35, 5445b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RD0 = 36, 5545b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RD1 = 37, 5645b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RD2 = 38, 5745b85fcaSLucas Stach MX8MQ_IOMUXC_ENET_RD3 = 39, 5845b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_CLK = 40, 5945b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_CMD = 41, 6045b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA0 = 42, 6145b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA1 = 43, 6245b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA2 = 44, 6345b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA3 = 45, 6445b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA4 = 46, 6545b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA5 = 47, 6645b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA6 = 48, 6745b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_DATA7 = 49, 6845b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_RESET_B = 50, 6945b85fcaSLucas Stach MX8MQ_IOMUXC_SD1_STROBE = 51, 7045b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_CD_B = 52, 7145b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_CLK = 53, 7245b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_CMD = 54, 7345b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_DATA0 = 55, 7445b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_DATA1 = 56, 7545b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_DATA2 = 57, 7645b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_DATA3 = 58, 7745b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_RESET_B = 59, 7845b85fcaSLucas Stach MX8MQ_IOMUXC_SD2_WP = 60, 7945b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_ALE = 61, 8045b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_CE0_B = 62, 8145b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_CE1_B = 63, 8245b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_CE2_B = 64, 8345b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_CE3_B = 65, 8445b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_CLE = 66, 8545b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA00 = 67, 8645b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA01 = 68, 8745b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA02 = 69, 8845b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA03 = 70, 8945b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA04 = 71, 9045b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA05 = 72, 9145b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA06 = 73, 9245b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DATA07 = 74, 9345b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_DQS = 75, 9445b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_RE_B = 76, 9545b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_READY_B = 77, 9645b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_WE_B = 78, 9745b85fcaSLucas Stach MX8MQ_IOMUXC_NAND_WP_B = 79, 9845b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXFS = 80, 9945b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXC = 81, 10045b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXD0 = 82, 10145b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXD1 = 83, 10245b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXD2 = 84, 10345b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_RXD3 = 85, 10445b85fcaSLucas Stach MX8MQ_IOMUXC_SAI5_MCLK = 86, 10545b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXFS = 87, 10645b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXC = 88, 10745b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD0 = 89, 10845b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD1 = 90, 10945b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD2 = 91, 11045b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD3 = 92, 11145b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD4 = 93, 11245b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD5 = 94, 11345b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD6 = 95, 11445b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_RXD7 = 96, 11545b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXFS = 97, 11645b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXC = 98, 11745b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD0 = 99, 11845b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD1 = 100, 11945b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD2 = 101, 12045b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD3 = 102, 12145b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD4 = 103, 12245b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD5 = 104, 12345b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD6 = 105, 12445b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_TXD7 = 106, 12545b85fcaSLucas Stach MX8MQ_IOMUXC_SAI1_MCLK = 107, 12645b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_RXFS = 108, 12745b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_RXC = 109, 12845b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_RXD0 = 110, 12945b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_TXFS = 111, 13045b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_TXC = 112, 13145b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_TXD0 = 113, 13245b85fcaSLucas Stach MX8MQ_IOMUXC_SAI2_MCLK = 114, 13345b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_RXFS = 115, 13445b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_RXC = 116, 13545b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_RXD = 117, 13645b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_TXFS = 118, 13745b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_TXC = 119, 13845b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_TXD = 120, 13945b85fcaSLucas Stach MX8MQ_IOMUXC_SAI3_MCLK = 121, 14045b85fcaSLucas Stach MX8MQ_IOMUXC_SPDIF_TX = 122, 14145b85fcaSLucas Stach MX8MQ_IOMUXC_SPDIF_RX = 123, 14245b85fcaSLucas Stach MX8MQ_IOMUXC_SPDIF_EXT_CLK = 124, 14345b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI1_SCLK = 125, 14445b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI1_MOSI = 126, 14545b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI1_MISO = 127, 14645b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI1_SS0 = 128, 14745b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI2_SCLK = 129, 14845b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI2_MOSI = 130, 14945b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI2_MISO = 131, 15045b85fcaSLucas Stach MX8MQ_IOMUXC_ECSPI2_SS0 = 132, 15145b85fcaSLucas Stach MX8MQ_IOMUXC_I2C1_SCL = 133, 15245b85fcaSLucas Stach MX8MQ_IOMUXC_I2C1_SDA = 134, 15345b85fcaSLucas Stach MX8MQ_IOMUXC_I2C2_SCL = 135, 15445b85fcaSLucas Stach MX8MQ_IOMUXC_I2C2_SDA = 136, 15545b85fcaSLucas Stach MX8MQ_IOMUXC_I2C3_SCL = 137, 15645b85fcaSLucas Stach MX8MQ_IOMUXC_I2C3_SDA = 138, 15745b85fcaSLucas Stach MX8MQ_IOMUXC_I2C4_SCL = 139, 15845b85fcaSLucas Stach MX8MQ_IOMUXC_I2C4_SDA = 140, 15945b85fcaSLucas Stach MX8MQ_IOMUXC_UART1_RXD = 141, 16045b85fcaSLucas Stach MX8MQ_IOMUXC_UART1_TXD = 142, 16145b85fcaSLucas Stach MX8MQ_IOMUXC_UART2_RXD = 143, 16245b85fcaSLucas Stach MX8MQ_IOMUXC_UART2_TXD = 144, 16345b85fcaSLucas Stach MX8MQ_IOMUXC_UART3_RXD = 145, 16445b85fcaSLucas Stach MX8MQ_IOMUXC_UART3_TXD = 146, 16545b85fcaSLucas Stach MX8MQ_IOMUXC_UART4_RXD = 147, 16645b85fcaSLucas Stach MX8MQ_IOMUXC_UART4_TXD = 148, 16745b85fcaSLucas Stach }; 16845b85fcaSLucas Stach 16945b85fcaSLucas Stach /* Pad names for the pinmux subsystem */ 17045b85fcaSLucas Stach static const struct pinctrl_pin_desc imx8mq_pinctrl_pads[] = { 17145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_PAD_RESERVE0), 17245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_PAD_RESERVE1), 17345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_PAD_RESERVE2), 17445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_PAD_RESERVE3), 17545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_PAD_RESERVE4), 17645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_PMIC_STBY_REQ_CCMSRCGPCMIX), 17745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_PMIC_ON_REQ_SNVSMIX), 17845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ONOFF_SNVSMIX), 17945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_POR_B_SNVSMIX), 18045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_RTC_RESET_B_SNVSMIX), 18145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO00), 18245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO01), 18345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO02), 18445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO03), 18545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO04), 18645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO05), 18745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO06), 18845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO07), 18945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO08), 19045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO09), 19145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO10), 19245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO11), 19345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO12), 19445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO13), 19545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO14), 19645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_GPIO1_IO15), 19745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_MDC), 19845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_MDIO), 19945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TD3), 20045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TD2), 20145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TD1), 20245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TD0), 20345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TX_CTL), 20445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_TXC), 20545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RX_CTL), 20645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RXC), 20745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RD0), 20845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RD1), 20945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RD2), 21045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ENET_RD3), 21145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_CLK), 21245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_CMD), 21345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA0), 21445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA1), 21545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA2), 21645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA3), 21745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA4), 21845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA5), 21945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA6), 22045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_DATA7), 22145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_RESET_B), 22245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD1_STROBE), 22345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_CD_B), 22445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_CLK), 22545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_CMD), 22645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_DATA0), 22745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_DATA1), 22845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_DATA2), 22945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_DATA3), 23045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_RESET_B), 23145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SD2_WP), 23245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_ALE), 23345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_CE0_B), 23445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_CE1_B), 23545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_CE2_B), 23645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_CE3_B), 23745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_CLE), 23845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA00), 23945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA01), 24045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA02), 24145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA03), 24245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA04), 24345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA05), 24445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA06), 24545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DATA07), 24645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_DQS), 24745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_RE_B), 24845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_READY_B), 24945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_WE_B), 25045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_NAND_WP_B), 25145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXFS), 25245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXC), 25345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXD0), 25445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXD1), 25545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXD2), 25645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_RXD3), 25745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI5_MCLK), 25845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXFS), 25945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXC), 26045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD0), 26145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD1), 26245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD2), 26345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD3), 26445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD4), 26545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD5), 26645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD6), 26745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_RXD7), 26845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXFS), 26945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXC), 27045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD0), 27145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD1), 27245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD2), 27345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD3), 27445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD4), 27545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD5), 27645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD6), 27745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_TXD7), 27845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI1_MCLK), 27945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_RXFS), 28045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_RXC), 28145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_RXD0), 28245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_TXFS), 28345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_TXC), 28445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_TXD0), 28545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI2_MCLK), 28645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_RXFS), 28745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_RXC), 28845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_RXD), 28945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_TXFS), 29045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_TXC), 29145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_TXD), 29245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SAI3_MCLK), 29345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SPDIF_TX), 29445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SPDIF_RX), 29545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_SPDIF_EXT_CLK), 29645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI1_SCLK), 29745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI1_MOSI), 29845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI1_MISO), 29945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI1_SS0), 30045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI2_SCLK), 30145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI2_MOSI), 30245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI2_MISO), 30345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_ECSPI2_SS0), 30445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C1_SCL), 30545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C1_SDA), 30645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C2_SCL), 30745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C2_SDA), 30845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C3_SCL), 30945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C3_SDA), 31045b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C4_SCL), 31145b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_I2C4_SDA), 31245b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART1_RXD), 31345b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART1_TXD), 31445b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART2_RXD), 31545b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART2_TXD), 31645b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART3_RXD), 31745b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART3_TXD), 31845b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART4_RXD), 31945b85fcaSLucas Stach IMX_PINCTRL_PIN(MX8MQ_IOMUXC_UART4_TXD), 32045b85fcaSLucas Stach }; 32145b85fcaSLucas Stach 32245b85fcaSLucas Stach static const struct imx_pinctrl_soc_info imx8mq_pinctrl_info = { 32345b85fcaSLucas Stach .pins = imx8mq_pinctrl_pads, 32445b85fcaSLucas Stach .npins = ARRAY_SIZE(imx8mq_pinctrl_pads), 32545b85fcaSLucas Stach .gpr_compatible = "fsl,imx8mq-iomuxc-gpr", 32645b85fcaSLucas Stach }; 32745b85fcaSLucas Stach 32845b85fcaSLucas Stach static const struct of_device_id imx8mq_pinctrl_of_match[] = { 32945b85fcaSLucas Stach { .compatible = "fsl,imx8mq-iomuxc", .data = &imx8mq_pinctrl_info, }, 33045b85fcaSLucas Stach { /* sentinel */ } 33145b85fcaSLucas Stach }; 33245b85fcaSLucas Stach 33345b85fcaSLucas Stach static int imx8mq_pinctrl_probe(struct platform_device *pdev) 33445b85fcaSLucas Stach { 33545b85fcaSLucas Stach return imx_pinctrl_probe(pdev, &imx8mq_pinctrl_info); 33645b85fcaSLucas Stach } 33745b85fcaSLucas Stach 33845b85fcaSLucas Stach static struct platform_driver imx8mq_pinctrl_driver = { 33945b85fcaSLucas Stach .driver = { 34045b85fcaSLucas Stach .name = "imx8mq-pinctrl", 34145b85fcaSLucas Stach .of_match_table = of_match_ptr(imx8mq_pinctrl_of_match), 342*855811eaSAbel Vesa .pm = &imx_pinctrl_pm_ops, 34345b85fcaSLucas Stach .suppress_bind_attrs = true, 34445b85fcaSLucas Stach }, 34545b85fcaSLucas Stach .probe = imx8mq_pinctrl_probe, 34645b85fcaSLucas Stach }; 34745b85fcaSLucas Stach 34845b85fcaSLucas Stach static int __init imx8mq_pinctrl_init(void) 34945b85fcaSLucas Stach { 35045b85fcaSLucas Stach return platform_driver_register(&imx8mq_pinctrl_driver); 35145b85fcaSLucas Stach } 35245b85fcaSLucas Stach arch_initcall(imx8mq_pinctrl_init); 353