162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci//
362306a36Sopenharmony_ci// Freescale imx6sx pinctrl driver
462306a36Sopenharmony_ci//
562306a36Sopenharmony_ci// Author: Anson Huang <Anson.Huang@freescale.com>
662306a36Sopenharmony_ci// Copyright (C) 2014 Freescale Semiconductor, Inc.
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#include <linux/err.h>
962306a36Sopenharmony_ci#include <linux/init.h>
1062306a36Sopenharmony_ci#include <linux/io.h>
1162306a36Sopenharmony_ci#include <linux/mod_devicetable.h>
1262306a36Sopenharmony_ci#include <linux/platform_device.h>
1362306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#include "pinctrl-imx.h"
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_cienum imx6sx_pads {
1862306a36Sopenharmony_ci	MX6Sx_PAD_RESERVE0 = 0,
1962306a36Sopenharmony_ci	MX6Sx_PAD_RESERVE1 = 1,
2062306a36Sopenharmony_ci	MX6Sx_PAD_RESERVE2 = 2,
2162306a36Sopenharmony_ci	MX6Sx_PAD_RESERVE3 = 3,
2262306a36Sopenharmony_ci	MX6Sx_PAD_RESERVE4 = 4,
2362306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO00 = 5,
2462306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO01 = 6,
2562306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO02 = 7,
2662306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO03 = 8,
2762306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO04 = 9,
2862306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO05 = 10,
2962306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO06 = 11,
3062306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO07 = 12,
3162306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO08 = 13,
3262306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO09 = 14,
3362306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO10 = 15,
3462306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO11 = 16,
3562306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO12 = 17,
3662306a36Sopenharmony_ci	MX6SX_PAD_GPIO1_IO13 = 18,
3762306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA00 = 19,
3862306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA01 = 20,
3962306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA02 = 21,
4062306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA03 = 22,
4162306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA04 = 23,
4262306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA05 = 24,
4362306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA06 = 25,
4462306a36Sopenharmony_ci	MX6SX_PAD_CSI_DATA07 = 26,
4562306a36Sopenharmony_ci	MX6SX_PAD_CSI_HSYNC = 27,
4662306a36Sopenharmony_ci	MX6SX_PAD_CSI_MCLK = 28,
4762306a36Sopenharmony_ci	MX6SX_PAD_CSI_PIXCLK = 29,
4862306a36Sopenharmony_ci	MX6SX_PAD_CSI_VSYNC = 30,
4962306a36Sopenharmony_ci	MX6SX_PAD_ENET1_COL = 31,
5062306a36Sopenharmony_ci	MX6SX_PAD_ENET1_CRS = 32,
5162306a36Sopenharmony_ci	MX6SX_PAD_ENET1_MDC = 33,
5262306a36Sopenharmony_ci	MX6SX_PAD_ENET1_MDIO = 34,
5362306a36Sopenharmony_ci	MX6SX_PAD_ENET1_RX_CLK = 35,
5462306a36Sopenharmony_ci	MX6SX_PAD_ENET1_TX_CLK = 36,
5562306a36Sopenharmony_ci	MX6SX_PAD_ENET2_COL = 37,
5662306a36Sopenharmony_ci	MX6SX_PAD_ENET2_CRS = 38,
5762306a36Sopenharmony_ci	MX6SX_PAD_ENET2_RX_CLK = 39,
5862306a36Sopenharmony_ci	MX6SX_PAD_ENET2_TX_CLK = 40,
5962306a36Sopenharmony_ci	MX6SX_PAD_KEY_COL0 = 41,
6062306a36Sopenharmony_ci	MX6SX_PAD_KEY_COL1 = 42,
6162306a36Sopenharmony_ci	MX6SX_PAD_KEY_COL2 = 43,
6262306a36Sopenharmony_ci	MX6SX_PAD_KEY_COL3 = 44,
6362306a36Sopenharmony_ci	MX6SX_PAD_KEY_COL4 = 45,
6462306a36Sopenharmony_ci	MX6SX_PAD_KEY_ROW0 = 46,
6562306a36Sopenharmony_ci	MX6SX_PAD_KEY_ROW1 = 47,
6662306a36Sopenharmony_ci	MX6SX_PAD_KEY_ROW2 = 48,
6762306a36Sopenharmony_ci	MX6SX_PAD_KEY_ROW3 = 49,
6862306a36Sopenharmony_ci	MX6SX_PAD_KEY_ROW4 = 50,
6962306a36Sopenharmony_ci	MX6SX_PAD_LCD1_CLK = 51,
7062306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA00 = 52,
7162306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA01 = 53,
7262306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA02 = 54,
7362306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA03 = 55,
7462306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA04 = 56,
7562306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA05 = 57,
7662306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA06 = 58,
7762306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA07 = 59,
7862306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA08 = 60,
7962306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA09 = 61,
8062306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA10 = 62,
8162306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA11 = 63,
8262306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA12 = 64,
8362306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA13 = 65,
8462306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA14 = 66,
8562306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA15 = 67,
8662306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA16 = 68,
8762306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA17 = 69,
8862306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA18 = 70,
8962306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA19 = 71,
9062306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA20 = 72,
9162306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA21 = 73,
9262306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA22 = 74,
9362306a36Sopenharmony_ci	MX6SX_PAD_LCD1_DATA23 = 75,
9462306a36Sopenharmony_ci	MX6SX_PAD_LCD1_ENABLE = 76,
9562306a36Sopenharmony_ci	MX6SX_PAD_LCD1_HSYNC = 77,
9662306a36Sopenharmony_ci	MX6SX_PAD_LCD1_RESET = 78,
9762306a36Sopenharmony_ci	MX6SX_PAD_LCD1_VSYNC = 79,
9862306a36Sopenharmony_ci	MX6SX_PAD_NAND_ALE = 80,
9962306a36Sopenharmony_ci	MX6SX_PAD_NAND_CE0_B = 81,
10062306a36Sopenharmony_ci	MX6SX_PAD_NAND_CE1_B = 82,
10162306a36Sopenharmony_ci	MX6SX_PAD_NAND_CLE = 83,
10262306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA00 = 84 ,
10362306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA01 = 85,
10462306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA02 = 86,
10562306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA03 = 87,
10662306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA04 = 88,
10762306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA05 = 89,
10862306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA06 = 90,
10962306a36Sopenharmony_ci	MX6SX_PAD_NAND_DATA07 = 91,
11062306a36Sopenharmony_ci	MX6SX_PAD_NAND_RE_B = 92,
11162306a36Sopenharmony_ci	MX6SX_PAD_NAND_READY_B = 93,
11262306a36Sopenharmony_ci	MX6SX_PAD_NAND_WE_B = 94,
11362306a36Sopenharmony_ci	MX6SX_PAD_NAND_WP_B = 95,
11462306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_DATA0 = 96,
11562306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_DATA1 = 97,
11662306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_DATA2 = 98,
11762306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_DATA3 = 99,
11862306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_DQS = 100,
11962306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_SCLK = 101,
12062306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_SS0_B = 102,
12162306a36Sopenharmony_ci	MX6SX_PAD_QSPI1A_SS1_B = 103,
12262306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_DATA0 = 104,
12362306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_DATA1 = 105,
12462306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_DATA2 = 106,
12562306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_DATA3 = 107,
12662306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_DQS = 108,
12762306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_SCLK = 109,
12862306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_SS0_B = 110,
12962306a36Sopenharmony_ci	MX6SX_PAD_QSPI1B_SS1_B = 111,
13062306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RD0 = 112,
13162306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RD1 = 113,
13262306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RD2 = 114,
13362306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RD3 = 115,
13462306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RX_CTL = 116,
13562306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_RXC = 117,
13662306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TD0 = 118,
13762306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TD1 = 119,
13862306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TD2 = 120,
13962306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TD3 = 121,
14062306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TX_CTL = 122,
14162306a36Sopenharmony_ci	MX6SX_PAD_RGMII1_TXC = 123,
14262306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RD0 = 124,
14362306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RD1 = 125,
14462306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RD2 = 126,
14562306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RD3 = 127,
14662306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RX_CTL = 128,
14762306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_RXC = 129,
14862306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TD0 = 130,
14962306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TD1 = 131,
15062306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TD2 = 132,
15162306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TD3 = 133,
15262306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TX_CTL = 134,
15362306a36Sopenharmony_ci	MX6SX_PAD_RGMII2_TXC = 135,
15462306a36Sopenharmony_ci	MX6SX_PAD_SD1_CLK = 136,
15562306a36Sopenharmony_ci	MX6SX_PAD_SD1_CMD = 137,
15662306a36Sopenharmony_ci	MX6SX_PAD_SD1_DATA0 = 138,
15762306a36Sopenharmony_ci	MX6SX_PAD_SD1_DATA1 = 139,
15862306a36Sopenharmony_ci	MX6SX_PAD_SD1_DATA2 = 140,
15962306a36Sopenharmony_ci	MX6SX_PAD_SD1_DATA3 = 141,
16062306a36Sopenharmony_ci	MX6SX_PAD_SD2_CLK = 142,
16162306a36Sopenharmony_ci	MX6SX_PAD_SD2_CMD = 143,
16262306a36Sopenharmony_ci	MX6SX_PAD_SD2_DATA0 = 144,
16362306a36Sopenharmony_ci	MX6SX_PAD_SD2_DATA1 = 145,
16462306a36Sopenharmony_ci	MX6SX_PAD_SD2_DATA2 = 146,
16562306a36Sopenharmony_ci	MX6SX_PAD_SD2_DATA3 = 147,
16662306a36Sopenharmony_ci	MX6SX_PAD_SD3_CLK = 148,
16762306a36Sopenharmony_ci	MX6SX_PAD_SD3_CMD = 149,
16862306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA0 = 150,
16962306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA1 = 151,
17062306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA2 = 152,
17162306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA3 = 153,
17262306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA4 = 154,
17362306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA5 = 155,
17462306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA6 = 156,
17562306a36Sopenharmony_ci	MX6SX_PAD_SD3_DATA7 = 157,
17662306a36Sopenharmony_ci	MX6SX_PAD_SD4_CLK = 158,
17762306a36Sopenharmony_ci	MX6SX_PAD_SD4_CMD = 159,
17862306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA0 = 160,
17962306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA1 = 161,
18062306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA2 = 162,
18162306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA3 = 163,
18262306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA4 = 164,
18362306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA5 = 165,
18462306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA6 = 166,
18562306a36Sopenharmony_ci	MX6SX_PAD_SD4_DATA7 = 167,
18662306a36Sopenharmony_ci	MX6SX_PAD_SD4_RESET_B = 168,
18762306a36Sopenharmony_ci	MX6SX_PAD_USB_H_DATA = 169,
18862306a36Sopenharmony_ci	MX6SX_PAD_USB_H_STROBE = 170,
18962306a36Sopenharmony_ci};
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci/* Pad names for the pinmux subsystem */
19262306a36Sopenharmony_cistatic const struct pinctrl_pin_desc imx6sx_pinctrl_pads[] = {
19362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE0),
19462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE1),
19562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE2),
19662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE3),
19762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6Sx_PAD_RESERVE4),
19862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO00),
19962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO01),
20062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO02),
20162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO03),
20262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO04),
20362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO05),
20462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO06),
20562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO07),
20662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO08),
20762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO09),
20862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO10),
20962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO11),
21062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO12),
21162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_GPIO1_IO13),
21262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA00),
21362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA01),
21462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA02),
21562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA03),
21662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA04),
21762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA05),
21862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA06),
21962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_DATA07),
22062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_HSYNC),
22162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_MCLK),
22262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_PIXCLK),
22362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_CSI_VSYNC),
22462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_COL),
22562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_CRS),
22662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDC),
22762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_MDIO),
22862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_RX_CLK),
22962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET1_TX_CLK),
23062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_COL),
23162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_CRS),
23262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_RX_CLK),
23362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_ENET2_TX_CLK),
23462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL0),
23562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL1),
23662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL2),
23762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL3),
23862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_COL4),
23962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW0),
24062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW1),
24162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW2),
24262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW3),
24362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_KEY_ROW4),
24462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_CLK),
24562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA00),
24662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA01),
24762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA02),
24862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA03),
24962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA04),
25062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA05),
25162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA06),
25262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA07),
25362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA08),
25462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA09),
25562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA10),
25662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA11),
25762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA12),
25862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA13),
25962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA14),
26062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA15),
26162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA16),
26262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA17),
26362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA18),
26462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA19),
26562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA20),
26662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA21),
26762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA22),
26862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_DATA23),
26962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_ENABLE),
27062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_HSYNC),
27162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_RESET),
27262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_LCD1_VSYNC),
27362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_ALE),
27462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE0_B),
27562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CE1_B),
27662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_CLE),
27762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA00),
27862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA01),
27962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA02),
28062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA03),
28162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA04),
28262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA05),
28362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA06),
28462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_DATA07),
28562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_RE_B),
28662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_READY_B),
28762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WE_B),
28862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_NAND_WP_B),
28962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA0),
29062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA1),
29162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA2),
29262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DATA3),
29362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_DQS),
29462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SCLK),
29562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS0_B),
29662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1A_SS1_B),
29762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA0),
29862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA1),
29962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA2),
30062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DATA3),
30162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_DQS),
30262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SCLK),
30362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS0_B),
30462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_QSPI1B_SS1_B),
30562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD0),
30662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD1),
30762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD2),
30862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RD3),
30962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RX_CTL),
31062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_RXC),
31162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD0),
31262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD1),
31362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD2),
31462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TD3),
31562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TX_CTL),
31662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII1_TXC),
31762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD0),
31862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD1),
31962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD2),
32062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RD3),
32162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RX_CTL),
32262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_RXC),
32362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD0),
32462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD1),
32562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD2),
32662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TD3),
32762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TX_CTL),
32862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_RGMII2_TXC),
32962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CLK),
33062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_CMD),
33162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA0),
33262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA1),
33362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA2),
33462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD1_DATA3),
33562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CLK),
33662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_CMD),
33762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA0),
33862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA1),
33962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA2),
34062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD2_DATA3),
34162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CLK),
34262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_CMD),
34362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA0),
34462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA1),
34562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA2),
34662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA3),
34762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA4),
34862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA5),
34962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA6),
35062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD3_DATA7),
35162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CLK),
35262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_CMD),
35362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA0),
35462306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA1),
35562306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA2),
35662306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA3),
35762306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA4),
35862306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA5),
35962306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA6),
36062306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_DATA7),
36162306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_SD4_RESET_B),
36262306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_DATA),
36362306a36Sopenharmony_ci	IMX_PINCTRL_PIN(MX6SX_PAD_USB_H_STROBE),
36462306a36Sopenharmony_ci};
36562306a36Sopenharmony_ci
36662306a36Sopenharmony_cistatic const struct imx_pinctrl_soc_info imx6sx_pinctrl_info = {
36762306a36Sopenharmony_ci	.pins = imx6sx_pinctrl_pads,
36862306a36Sopenharmony_ci	.npins = ARRAY_SIZE(imx6sx_pinctrl_pads),
36962306a36Sopenharmony_ci	.gpr_compatible = "fsl,imx6sx-iomuxc-gpr",
37062306a36Sopenharmony_ci};
37162306a36Sopenharmony_ci
37262306a36Sopenharmony_cistatic const struct of_device_id imx6sx_pinctrl_of_match[] = {
37362306a36Sopenharmony_ci	{ .compatible = "fsl,imx6sx-iomuxc", },
37462306a36Sopenharmony_ci	{ /* sentinel */ }
37562306a36Sopenharmony_ci};
37662306a36Sopenharmony_ci
37762306a36Sopenharmony_cistatic int imx6sx_pinctrl_probe(struct platform_device *pdev)
37862306a36Sopenharmony_ci{
37962306a36Sopenharmony_ci	return imx_pinctrl_probe(pdev, &imx6sx_pinctrl_info);
38062306a36Sopenharmony_ci}
38162306a36Sopenharmony_ci
38262306a36Sopenharmony_cistatic struct platform_driver imx6sx_pinctrl_driver = {
38362306a36Sopenharmony_ci	.driver = {
38462306a36Sopenharmony_ci		.name = "imx6sx-pinctrl",
38562306a36Sopenharmony_ci		.of_match_table = imx6sx_pinctrl_of_match,
38662306a36Sopenharmony_ci		.suppress_bind_attrs = true,
38762306a36Sopenharmony_ci	},
38862306a36Sopenharmony_ci	.probe = imx6sx_pinctrl_probe,
38962306a36Sopenharmony_ci};
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_cistatic int __init imx6sx_pinctrl_init(void)
39262306a36Sopenharmony_ci{
39362306a36Sopenharmony_ci	return platform_driver_register(&imx6sx_pinctrl_driver);
39462306a36Sopenharmony_ci}
39562306a36Sopenharmony_ciarch_initcall(imx6sx_pinctrl_init);
396