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