162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 2019 NXP
462306a36Sopenharmony_ci */
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#include <linux/err.h>
762306a36Sopenharmony_ci#include <linux/init.h>
862306a36Sopenharmony_ci#include <linux/module.h>
962306a36Sopenharmony_ci#include <linux/of.h>
1062306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
1162306a36Sopenharmony_ci#include <linux/platform_device.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include "pinctrl-imx.h"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cienum imx8mp_pads {
1662306a36Sopenharmony_ci	MX8MP_IOMUXC_RESERVE0 = 0,
1762306a36Sopenharmony_ci	MX8MP_IOMUXC_RESERVE1 = 1,
1862306a36Sopenharmony_ci	MX8MP_IOMUXC_RESERVE2 = 2,
1962306a36Sopenharmony_ci	MX8MP_IOMUXC_RESERVE3 = 3,
2062306a36Sopenharmony_ci	MX8MP_IOMUXC_RESERVE4 = 4,
2162306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO00 = 5,
2262306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO01 = 6,
2362306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO02 = 7,
2462306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO03 = 8,
2562306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO04 = 9,
2662306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO05 = 10,
2762306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO06 = 11,
2862306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO07 = 12,
2962306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO08 = 13,
3062306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO09 = 14,
3162306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO10 = 15,
3262306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO11 = 16,
3362306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO12 = 17,
3462306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO13 = 18,
3562306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO14 = 19,
3662306a36Sopenharmony_ci	MX8MP_IOMUXC_GPIO1_IO15 = 20,
3762306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_MDC = 21,
3862306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_MDIO = 22,
3962306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TD3 = 23,
4062306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TD2 = 24,
4162306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TD1 = 25,
4262306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TD0 = 26,
4362306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TX_CTL = 27,
4462306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_TXC = 28,
4562306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RX_CTL = 29,
4662306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RXC = 30,
4762306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RD0 = 31,
4862306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RD1 = 32,
4962306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RD2 = 33,
5062306a36Sopenharmony_ci	MX8MP_IOMUXC_ENET_RD3 = 34,
5162306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_CLK = 35,
5262306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_CMD = 36,
5362306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA0 = 37,
5462306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA1 = 38,
5562306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA2 = 39,
5662306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA3 = 40,
5762306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA4 = 41,
5862306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA5 = 42,
5962306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA6 = 43,
6062306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_DATA7 = 44,
6162306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_RESET_B = 45,
6262306a36Sopenharmony_ci	MX8MP_IOMUXC_SD1_STROBE = 46,
6362306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_CD_B = 47,
6462306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_CLK = 48,
6562306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_CMD = 49,
6662306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_DATA0 = 50,
6762306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_DATA1 = 51,
6862306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_DATA2 = 52,
6962306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_DATA3 = 53,
7062306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_RESET_B = 54,
7162306a36Sopenharmony_ci	MX8MP_IOMUXC_SD2_WP = 55,
7262306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_ALE = 56,
7362306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_CE0_B = 57,
7462306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_CE1_B = 58,
7562306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_CE2_B = 59,
7662306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_CE3_B = 60,
7762306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_CLE = 61,
7862306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA00 = 62,
7962306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA01 = 63,
8062306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA02 = 64,
8162306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA03 = 65,
8262306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA04 = 66,
8362306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA05 = 67,
8462306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA06 = 68,
8562306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DATA07 = 69,
8662306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_DQS = 70,
8762306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_RE_B = 71,
8862306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_READY_B = 72,
8962306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_WE_B = 73,
9062306a36Sopenharmony_ci	MX8MP_IOMUXC_NAND_WP_B = 74,
9162306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXFS = 75,
9262306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXC = 76,
9362306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXD0 = 77,
9462306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXD1 = 78,
9562306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXD2 = 79,
9662306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_RXD3 = 80,
9762306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI5_MCLK = 81,
9862306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXFS = 82,
9962306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXC = 83,
10062306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD0 = 84,
10162306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD1 = 85,
10262306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD2 = 86,
10362306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD3 = 87,
10462306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD4 = 88,
10562306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD5 = 89,
10662306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD6 = 90,
10762306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_RXD7 = 91,
10862306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXFS = 92,
10962306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXC = 93,
11062306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD0 = 94,
11162306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD1 = 95,
11262306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD2 = 96,
11362306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD3 = 97,
11462306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD4 = 98,
11562306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD5 = 99,
11662306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD6 = 100,
11762306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_TXD7 = 101,
11862306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI1_MCLK = 102,
11962306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_RXFS = 103,
12062306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_RXC = 104,
12162306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_RXD0 = 105,
12262306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_TXFS = 106,
12362306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_TXC = 107,
12462306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_TXD0 = 108,
12562306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI2_MCLK = 109,
12662306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_RXFS = 110,
12762306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_RXC = 111,
12862306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_RXD = 112,
12962306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_TXFS = 113,
13062306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_TXC = 114,
13162306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_TXD = 115,
13262306a36Sopenharmony_ci	MX8MP_IOMUXC_SAI3_MCLK = 116,
13362306a36Sopenharmony_ci	MX8MP_IOMUXC_SPDIF_TX = 117,
13462306a36Sopenharmony_ci	MX8MP_IOMUXC_SPDIF_RX = 118,
13562306a36Sopenharmony_ci	MX8MP_IOMUXC_SPDIF_EXT_CLK = 119,
13662306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI1_SCLK = 120,
13762306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI1_MOSI = 121,
13862306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI1_MISO = 122,
13962306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI1_SS0 = 123,
14062306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI2_SCLK = 124,
14162306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI2_MOSI = 125,
14262306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI2_MISO = 126,
14362306a36Sopenharmony_ci	MX8MP_IOMUXC_ECSPI2_SS0 = 127,
14462306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C1_SCL = 128,
14562306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C1_SDA = 129,
14662306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C2_SCL = 130,
14762306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C2_SDA = 131,
14862306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C3_SCL = 132,
14962306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C3_SDA = 133,
15062306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C4_SCL = 134,
15162306a36Sopenharmony_ci	MX8MP_IOMUXC_I2C4_SDA = 135,
15262306a36Sopenharmony_ci	MX8MP_IOMUXC_UART1_RXD = 136,
15362306a36Sopenharmony_ci	MX8MP_IOMUXC_UART1_TXD = 137,
15462306a36Sopenharmony_ci	MX8MP_IOMUXC_UART2_RXD = 138,
15562306a36Sopenharmony_ci	MX8MP_IOMUXC_UART2_TXD = 139,
15662306a36Sopenharmony_ci	MX8MP_IOMUXC_UART3_RXD = 140,
15762306a36Sopenharmony_ci	MX8MP_IOMUXC_UART3_TXD = 141,
15862306a36Sopenharmony_ci	MX8MP_IOMUXC_UART4_RXD = 142,
15962306a36Sopenharmony_ci	MX8MP_IOMUXC_UART4_TXD = 143,
16062306a36Sopenharmony_ci	MX8MP_IOMUXC_HDMI_DDC_SCL = 144,
16162306a36Sopenharmony_ci	MX8MP_IOMUXC_HDMI_DDC_SDA = 145,
16262306a36Sopenharmony_ci	MX8MP_IOMUXC_HDMI_CEC = 146,
16362306a36Sopenharmony_ci	MX8MP_IOMUXC_HDMI_HPD = 147,
16462306a36Sopenharmony_ci};
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci/* Pad names for the pinmux subsystem */
16762306a36Sopenharmony_cistatic const struct pinctrl_pin_desc imx8mp_pinctrl_pads[] = {
16862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE0),
16962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE1),
17062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE2),
17162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE3),
17262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_RESERVE4),
17362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO00),
17462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO01),
17562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO02),
17662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO03),
17762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO04),
17862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO05),
17962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO06),
18062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO07),
18162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO08),
18262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO09),
18362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO10),
18462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO11),
18562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO12),
18662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO13),
18762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO14),
18862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_GPIO1_IO15),
18962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_MDC),
19062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_MDIO),
19162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD3),
19262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD2),
19362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD1),
19462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TD0),
19562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TX_CTL),
19662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_TXC),
19762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RX_CTL),
19862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RXC),
19962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD0),
20062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD1),
20162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD2),
20262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ENET_RD3),
20362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_CLK),
20462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_CMD),
20562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA0),
20662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA1),
20762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA2),
20862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA3),
20962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA4),
21062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA5),
21162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA6),
21262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_DATA7),
21362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_RESET_B),
21462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD1_STROBE),
21562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CD_B),
21662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CLK),
21762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_CMD),
21862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA0),
21962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA1),
22062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA2),
22162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_DATA3),
22262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_RESET_B),
22362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SD2_WP),
22462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_ALE),
22562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE0_B),
22662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE1_B),
22762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE2_B),
22862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CE3_B),
22962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_CLE),
23062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA00),
23162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA01),
23262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA02),
23362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA03),
23462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA04),
23562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA05),
23662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA06),
23762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DATA07),
23862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_DQS),
23962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_RE_B),
24062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_READY_B),
24162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_WE_B),
24262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_NAND_WP_B),
24362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXFS),
24462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXC),
24562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD0),
24662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD1),
24762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD2),
24862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_RXD3),
24962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI5_MCLK),
25062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXFS),
25162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXC),
25262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD0),
25362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD1),
25462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD2),
25562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD3),
25662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD4),
25762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD5),
25862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD6),
25962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_RXD7),
26062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXFS),
26162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXC),
26262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD0),
26362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD1),
26462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD2),
26562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD3),
26662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD4),
26762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD5),
26862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD6),
26962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_TXD7),
27062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI1_MCLK),
27162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXFS),
27262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXC),
27362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_RXD0),
27462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXFS),
27562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXC),
27662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_TXD0),
27762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI2_MCLK),
27862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXFS),
27962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXC),
28062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_RXD),
28162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXFS),
28262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXC),
28362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_TXD),
28462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SAI3_MCLK),
28562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_TX),
28662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_RX),
28762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_SPDIF_EXT_CLK),
28862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_SCLK),
28962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_MOSI),
29062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_MISO),
29162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI1_SS0),
29262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_SCLK),
29362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_MOSI),
29462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_MISO),
29562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_ECSPI2_SS0),
29662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C1_SCL),
29762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C1_SDA),
29862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C2_SCL),
29962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C2_SDA),
30062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C3_SCL),
30162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C3_SDA),
30262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C4_SCL),
30362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_I2C4_SDA),
30462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART1_RXD),
30562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART1_TXD),
30662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART2_RXD),
30762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART2_TXD),
30862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART3_RXD),
30962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART3_TXD),
31062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART4_RXD),
31162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_UART4_TXD),
31262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_DDC_SCL),
31362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_DDC_SDA),
31462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_CEC),
31562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX8MP_IOMUXC_HDMI_HPD),
31662306a36Sopenharmony_ci};
31762306a36Sopenharmony_ci
31862306a36Sopenharmony_cistatic const struct imx_pinctrl_soc_info imx8mp_pinctrl_info = {
31962306a36Sopenharmony_ci	.pins = imx8mp_pinctrl_pads,
32062306a36Sopenharmony_ci	.npins = ARRAY_SIZE(imx8mp_pinctrl_pads),
32162306a36Sopenharmony_ci	.gpr_compatible = "fsl,imx8mp-iomuxc-gpr",
32262306a36Sopenharmony_ci};
32362306a36Sopenharmony_ci
32462306a36Sopenharmony_cistatic const struct of_device_id imx8mp_pinctrl_of_match[] = {
32562306a36Sopenharmony_ci	{ .compatible = "fsl,imx8mp-iomuxc", .data = &imx8mp_pinctrl_info, },
32662306a36Sopenharmony_ci	{ /* sentinel */ }
32762306a36Sopenharmony_ci};
32862306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, imx8mp_pinctrl_of_match);
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_cistatic int imx8mp_pinctrl_probe(struct platform_device *pdev)
33162306a36Sopenharmony_ci{
33262306a36Sopenharmony_ci	return imx_pinctrl_probe(pdev, &imx8mp_pinctrl_info);
33362306a36Sopenharmony_ci}
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_cistatic struct platform_driver imx8mp_pinctrl_driver = {
33662306a36Sopenharmony_ci	.driver = {
33762306a36Sopenharmony_ci		.name = "imx8mp-pinctrl",
33862306a36Sopenharmony_ci		.of_match_table = imx8mp_pinctrl_of_match,
33962306a36Sopenharmony_ci		.suppress_bind_attrs = true,
34062306a36Sopenharmony_ci	},
34162306a36Sopenharmony_ci	.probe = imx8mp_pinctrl_probe,
34262306a36Sopenharmony_ci};
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_cistatic int __init imx8mp_pinctrl_init(void)
34562306a36Sopenharmony_ci{
34662306a36Sopenharmony_ci	return platform_driver_register(&imx8mp_pinctrl_driver);
34762306a36Sopenharmony_ci}
34862306a36Sopenharmony_ciarch_initcall(imx8mp_pinctrl_init);
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ciMODULE_AUTHOR("Anson Huang <Anson.Huang@nxp.com>");
35162306a36Sopenharmony_ciMODULE_DESCRIPTION("NXP i.MX8MP pinctrl driver");
35262306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
353