xref: /linux/drivers/pinctrl/freescale/pinctrl-imx28.c (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1c2b39decSFabio Estevam // SPDX-License-Identifier: GPL-2.0+
2c2b39decSFabio Estevam //
3c2b39decSFabio Estevam // Freescale i.MX28 pinctrl driver
4c2b39decSFabio Estevam //
5c2b39decSFabio Estevam // Author: Shawn Guo <shawn.guo@linaro.org>
6c2b39decSFabio Estevam // Copyright 2012 Freescale Semiconductor, Inc.
7edad3b2aSLinus Walleij 
8edad3b2aSLinus Walleij #include <linux/init.h>
9*060f03e9SRob Herring #include <linux/mod_devicetable.h>
10*060f03e9SRob Herring #include <linux/platform_device.h>
11edad3b2aSLinus Walleij #include <linux/pinctrl/pinctrl.h>
12edad3b2aSLinus Walleij #include "pinctrl-mxs.h"
13edad3b2aSLinus Walleij 
14edad3b2aSLinus Walleij enum imx28_pin_enum {
15edad3b2aSLinus Walleij 	GPMI_D00	= PINID(0, 0),
16edad3b2aSLinus Walleij 	GPMI_D01	= PINID(0, 1),
17edad3b2aSLinus Walleij 	GPMI_D02	= PINID(0, 2),
18edad3b2aSLinus Walleij 	GPMI_D03	= PINID(0, 3),
19edad3b2aSLinus Walleij 	GPMI_D04	= PINID(0, 4),
20edad3b2aSLinus Walleij 	GPMI_D05	= PINID(0, 5),
21edad3b2aSLinus Walleij 	GPMI_D06	= PINID(0, 6),
22edad3b2aSLinus Walleij 	GPMI_D07	= PINID(0, 7),
23edad3b2aSLinus Walleij 	GPMI_CE0N	= PINID(0, 16),
24edad3b2aSLinus Walleij 	GPMI_CE1N	= PINID(0, 17),
25edad3b2aSLinus Walleij 	GPMI_CE2N	= PINID(0, 18),
26edad3b2aSLinus Walleij 	GPMI_CE3N	= PINID(0, 19),
27edad3b2aSLinus Walleij 	GPMI_RDY0	= PINID(0, 20),
28edad3b2aSLinus Walleij 	GPMI_RDY1	= PINID(0, 21),
29edad3b2aSLinus Walleij 	GPMI_RDY2	= PINID(0, 22),
30edad3b2aSLinus Walleij 	GPMI_RDY3	= PINID(0, 23),
31edad3b2aSLinus Walleij 	GPMI_RDN	= PINID(0, 24),
32edad3b2aSLinus Walleij 	GPMI_WRN	= PINID(0, 25),
33edad3b2aSLinus Walleij 	GPMI_ALE	= PINID(0, 26),
34edad3b2aSLinus Walleij 	GPMI_CLE	= PINID(0, 27),
35edad3b2aSLinus Walleij 	GPMI_RESETN	= PINID(0, 28),
36edad3b2aSLinus Walleij 	LCD_D00		= PINID(1, 0),
37edad3b2aSLinus Walleij 	LCD_D01		= PINID(1, 1),
38edad3b2aSLinus Walleij 	LCD_D02		= PINID(1, 2),
39edad3b2aSLinus Walleij 	LCD_D03		= PINID(1, 3),
40edad3b2aSLinus Walleij 	LCD_D04		= PINID(1, 4),
41edad3b2aSLinus Walleij 	LCD_D05		= PINID(1, 5),
42edad3b2aSLinus Walleij 	LCD_D06		= PINID(1, 6),
43edad3b2aSLinus Walleij 	LCD_D07		= PINID(1, 7),
44edad3b2aSLinus Walleij 	LCD_D08		= PINID(1, 8),
45edad3b2aSLinus Walleij 	LCD_D09		= PINID(1, 9),
46edad3b2aSLinus Walleij 	LCD_D10		= PINID(1, 10),
47edad3b2aSLinus Walleij 	LCD_D11		= PINID(1, 11),
48edad3b2aSLinus Walleij 	LCD_D12		= PINID(1, 12),
49edad3b2aSLinus Walleij 	LCD_D13		= PINID(1, 13),
50edad3b2aSLinus Walleij 	LCD_D14		= PINID(1, 14),
51edad3b2aSLinus Walleij 	LCD_D15		= PINID(1, 15),
52edad3b2aSLinus Walleij 	LCD_D16		= PINID(1, 16),
53edad3b2aSLinus Walleij 	LCD_D17		= PINID(1, 17),
54edad3b2aSLinus Walleij 	LCD_D18		= PINID(1, 18),
55edad3b2aSLinus Walleij 	LCD_D19		= PINID(1, 19),
56edad3b2aSLinus Walleij 	LCD_D20		= PINID(1, 20),
57edad3b2aSLinus Walleij 	LCD_D21		= PINID(1, 21),
58edad3b2aSLinus Walleij 	LCD_D22		= PINID(1, 22),
59edad3b2aSLinus Walleij 	LCD_D23		= PINID(1, 23),
60edad3b2aSLinus Walleij 	LCD_RD_E	= PINID(1, 24),
61edad3b2aSLinus Walleij 	LCD_WR_RWN	= PINID(1, 25),
62edad3b2aSLinus Walleij 	LCD_RS		= PINID(1, 26),
63edad3b2aSLinus Walleij 	LCD_CS		= PINID(1, 27),
64edad3b2aSLinus Walleij 	LCD_VSYNC	= PINID(1, 28),
65edad3b2aSLinus Walleij 	LCD_HSYNC	= PINID(1, 29),
66edad3b2aSLinus Walleij 	LCD_DOTCLK	= PINID(1, 30),
67edad3b2aSLinus Walleij 	LCD_ENABLE	= PINID(1, 31),
68edad3b2aSLinus Walleij 	SSP0_DATA0	= PINID(2, 0),
69edad3b2aSLinus Walleij 	SSP0_DATA1	= PINID(2, 1),
70edad3b2aSLinus Walleij 	SSP0_DATA2	= PINID(2, 2),
71edad3b2aSLinus Walleij 	SSP0_DATA3	= PINID(2, 3),
72edad3b2aSLinus Walleij 	SSP0_DATA4	= PINID(2, 4),
73edad3b2aSLinus Walleij 	SSP0_DATA5	= PINID(2, 5),
74edad3b2aSLinus Walleij 	SSP0_DATA6	= PINID(2, 6),
75edad3b2aSLinus Walleij 	SSP0_DATA7	= PINID(2, 7),
76edad3b2aSLinus Walleij 	SSP0_CMD	= PINID(2, 8),
77edad3b2aSLinus Walleij 	SSP0_DETECT	= PINID(2, 9),
78edad3b2aSLinus Walleij 	SSP0_SCK	= PINID(2, 10),
79edad3b2aSLinus Walleij 	SSP1_SCK	= PINID(2, 12),
80edad3b2aSLinus Walleij 	SSP1_CMD	= PINID(2, 13),
81edad3b2aSLinus Walleij 	SSP1_DATA0	= PINID(2, 14),
82edad3b2aSLinus Walleij 	SSP1_DATA3	= PINID(2, 15),
83edad3b2aSLinus Walleij 	SSP2_SCK	= PINID(2, 16),
84edad3b2aSLinus Walleij 	SSP2_MOSI	= PINID(2, 17),
85edad3b2aSLinus Walleij 	SSP2_MISO	= PINID(2, 18),
86edad3b2aSLinus Walleij 	SSP2_SS0	= PINID(2, 19),
87edad3b2aSLinus Walleij 	SSP2_SS1	= PINID(2, 20),
88edad3b2aSLinus Walleij 	SSP2_SS2	= PINID(2, 21),
89edad3b2aSLinus Walleij 	SSP3_SCK	= PINID(2, 24),
90edad3b2aSLinus Walleij 	SSP3_MOSI	= PINID(2, 25),
91edad3b2aSLinus Walleij 	SSP3_MISO	= PINID(2, 26),
92edad3b2aSLinus Walleij 	SSP3_SS0	= PINID(2, 27),
93edad3b2aSLinus Walleij 	AUART0_RX	= PINID(3, 0),
94edad3b2aSLinus Walleij 	AUART0_TX	= PINID(3, 1),
95edad3b2aSLinus Walleij 	AUART0_CTS	= PINID(3, 2),
96edad3b2aSLinus Walleij 	AUART0_RTS	= PINID(3, 3),
97edad3b2aSLinus Walleij 	AUART1_RX	= PINID(3, 4),
98edad3b2aSLinus Walleij 	AUART1_TX	= PINID(3, 5),
99edad3b2aSLinus Walleij 	AUART1_CTS	= PINID(3, 6),
100edad3b2aSLinus Walleij 	AUART1_RTS	= PINID(3, 7),
101edad3b2aSLinus Walleij 	AUART2_RX	= PINID(3, 8),
102edad3b2aSLinus Walleij 	AUART2_TX	= PINID(3, 9),
103edad3b2aSLinus Walleij 	AUART2_CTS	= PINID(3, 10),
104edad3b2aSLinus Walleij 	AUART2_RTS	= PINID(3, 11),
105edad3b2aSLinus Walleij 	AUART3_RX	= PINID(3, 12),
106edad3b2aSLinus Walleij 	AUART3_TX	= PINID(3, 13),
107edad3b2aSLinus Walleij 	AUART3_CTS	= PINID(3, 14),
108edad3b2aSLinus Walleij 	AUART3_RTS	= PINID(3, 15),
109edad3b2aSLinus Walleij 	PWM0		= PINID(3, 16),
110edad3b2aSLinus Walleij 	PWM1		= PINID(3, 17),
111edad3b2aSLinus Walleij 	PWM2		= PINID(3, 18),
112edad3b2aSLinus Walleij 	SAIF0_MCLK	= PINID(3, 20),
113edad3b2aSLinus Walleij 	SAIF0_LRCLK	= PINID(3, 21),
114edad3b2aSLinus Walleij 	SAIF0_BITCLK	= PINID(3, 22),
115edad3b2aSLinus Walleij 	SAIF0_SDATA0	= PINID(3, 23),
116edad3b2aSLinus Walleij 	I2C0_SCL	= PINID(3, 24),
117edad3b2aSLinus Walleij 	I2C0_SDA	= PINID(3, 25),
118edad3b2aSLinus Walleij 	SAIF1_SDATA0	= PINID(3, 26),
119edad3b2aSLinus Walleij 	SPDIF		= PINID(3, 27),
120edad3b2aSLinus Walleij 	PWM3		= PINID(3, 28),
121edad3b2aSLinus Walleij 	PWM4		= PINID(3, 29),
122edad3b2aSLinus Walleij 	LCD_RESET	= PINID(3, 30),
123edad3b2aSLinus Walleij 	ENET0_MDC	= PINID(4, 0),
124edad3b2aSLinus Walleij 	ENET0_MDIO	= PINID(4, 1),
125edad3b2aSLinus Walleij 	ENET0_RX_EN	= PINID(4, 2),
126edad3b2aSLinus Walleij 	ENET0_RXD0	= PINID(4, 3),
127edad3b2aSLinus Walleij 	ENET0_RXD1	= PINID(4, 4),
128edad3b2aSLinus Walleij 	ENET0_TX_CLK	= PINID(4, 5),
129edad3b2aSLinus Walleij 	ENET0_TX_EN	= PINID(4, 6),
130edad3b2aSLinus Walleij 	ENET0_TXD0	= PINID(4, 7),
131edad3b2aSLinus Walleij 	ENET0_TXD1	= PINID(4, 8),
132edad3b2aSLinus Walleij 	ENET0_RXD2	= PINID(4, 9),
133edad3b2aSLinus Walleij 	ENET0_RXD3	= PINID(4, 10),
134edad3b2aSLinus Walleij 	ENET0_TXD2	= PINID(4, 11),
135edad3b2aSLinus Walleij 	ENET0_TXD3	= PINID(4, 12),
136edad3b2aSLinus Walleij 	ENET0_RX_CLK	= PINID(4, 13),
137edad3b2aSLinus Walleij 	ENET0_COL	= PINID(4, 14),
138edad3b2aSLinus Walleij 	ENET0_CRS	= PINID(4, 15),
139edad3b2aSLinus Walleij 	ENET_CLK	= PINID(4, 16),
140edad3b2aSLinus Walleij 	JTAG_RTCK	= PINID(4, 20),
141edad3b2aSLinus Walleij 	EMI_D00		= PINID(5, 0),
142edad3b2aSLinus Walleij 	EMI_D01		= PINID(5, 1),
143edad3b2aSLinus Walleij 	EMI_D02		= PINID(5, 2),
144edad3b2aSLinus Walleij 	EMI_D03		= PINID(5, 3),
145edad3b2aSLinus Walleij 	EMI_D04		= PINID(5, 4),
146edad3b2aSLinus Walleij 	EMI_D05		= PINID(5, 5),
147edad3b2aSLinus Walleij 	EMI_D06		= PINID(5, 6),
148edad3b2aSLinus Walleij 	EMI_D07		= PINID(5, 7),
149edad3b2aSLinus Walleij 	EMI_D08		= PINID(5, 8),
150edad3b2aSLinus Walleij 	EMI_D09		= PINID(5, 9),
151edad3b2aSLinus Walleij 	EMI_D10		= PINID(5, 10),
152edad3b2aSLinus Walleij 	EMI_D11		= PINID(5, 11),
153edad3b2aSLinus Walleij 	EMI_D12		= PINID(5, 12),
154edad3b2aSLinus Walleij 	EMI_D13		= PINID(5, 13),
155edad3b2aSLinus Walleij 	EMI_D14		= PINID(5, 14),
156edad3b2aSLinus Walleij 	EMI_D15		= PINID(5, 15),
157edad3b2aSLinus Walleij 	EMI_ODT0	= PINID(5, 16),
158edad3b2aSLinus Walleij 	EMI_DQM0	= PINID(5, 17),
159edad3b2aSLinus Walleij 	EMI_ODT1	= PINID(5, 18),
160edad3b2aSLinus Walleij 	EMI_DQM1	= PINID(5, 19),
161edad3b2aSLinus Walleij 	EMI_DDR_OPEN_FB	= PINID(5, 20),
162edad3b2aSLinus Walleij 	EMI_CLK		= PINID(5, 21),
163edad3b2aSLinus Walleij 	EMI_DQS0	= PINID(5, 22),
164edad3b2aSLinus Walleij 	EMI_DQS1	= PINID(5, 23),
165edad3b2aSLinus Walleij 	EMI_DDR_OPEN	= PINID(5, 26),
166edad3b2aSLinus Walleij 	EMI_A00		= PINID(6, 0),
167edad3b2aSLinus Walleij 	EMI_A01		= PINID(6, 1),
168edad3b2aSLinus Walleij 	EMI_A02		= PINID(6, 2),
169edad3b2aSLinus Walleij 	EMI_A03		= PINID(6, 3),
170edad3b2aSLinus Walleij 	EMI_A04		= PINID(6, 4),
171edad3b2aSLinus Walleij 	EMI_A05		= PINID(6, 5),
172edad3b2aSLinus Walleij 	EMI_A06		= PINID(6, 6),
173edad3b2aSLinus Walleij 	EMI_A07		= PINID(6, 7),
174edad3b2aSLinus Walleij 	EMI_A08		= PINID(6, 8),
175edad3b2aSLinus Walleij 	EMI_A09		= PINID(6, 9),
176edad3b2aSLinus Walleij 	EMI_A10		= PINID(6, 10),
177edad3b2aSLinus Walleij 	EMI_A11		= PINID(6, 11),
178edad3b2aSLinus Walleij 	EMI_A12		= PINID(6, 12),
179edad3b2aSLinus Walleij 	EMI_A13		= PINID(6, 13),
180edad3b2aSLinus Walleij 	EMI_A14		= PINID(6, 14),
181edad3b2aSLinus Walleij 	EMI_BA0		= PINID(6, 16),
182edad3b2aSLinus Walleij 	EMI_BA1		= PINID(6, 17),
183edad3b2aSLinus Walleij 	EMI_BA2		= PINID(6, 18),
184edad3b2aSLinus Walleij 	EMI_CASN	= PINID(6, 19),
185edad3b2aSLinus Walleij 	EMI_RASN	= PINID(6, 20),
186edad3b2aSLinus Walleij 	EMI_WEN		= PINID(6, 21),
187edad3b2aSLinus Walleij 	EMI_CE0N	= PINID(6, 22),
188edad3b2aSLinus Walleij 	EMI_CE1N	= PINID(6, 23),
189edad3b2aSLinus Walleij 	EMI_CKE		= PINID(6, 24),
190edad3b2aSLinus Walleij };
191edad3b2aSLinus Walleij 
192edad3b2aSLinus Walleij static const struct pinctrl_pin_desc imx28_pins[] = {
193edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D00),
194edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D01),
195edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D02),
196edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D03),
197edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D04),
198edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D05),
199edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D06),
200edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_D07),
201edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE0N),
202edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE1N),
203edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE2N),
204edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CE3N),
205edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY0),
206edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY1),
207edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY2),
208edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDY3),
209edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RDN),
210edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_WRN),
211edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_ALE),
212edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_CLE),
213edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(GPMI_RESETN),
214edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D00),
215edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D01),
216edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D02),
217edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D03),
218edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D04),
219edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D05),
220edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D06),
221edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D07),
222edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D08),
223edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D09),
224edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D10),
225edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D11),
226edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D12),
227edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D13),
228edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D14),
229edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D15),
230edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D16),
231edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D17),
232edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D18),
233edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D19),
234edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D20),
235edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D21),
236edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D22),
237edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_D23),
238edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_RD_E),
239edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_WR_RWN),
240edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_RS),
241edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_CS),
242edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_VSYNC),
243edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_HSYNC),
244edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_DOTCLK),
245edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_ENABLE),
246edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA0),
247edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA1),
248edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA2),
249edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA3),
250edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA4),
251edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA5),
252edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA6),
253edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DATA7),
254edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_CMD),
255edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_DETECT),
256edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP0_SCK),
257edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_SCK),
258edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_CMD),
259edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA0),
260edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP1_DATA3),
261edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_SCK),
262edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_MOSI),
263edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_MISO),
264edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_SS0),
265edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_SS1),
266edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP2_SS2),
267edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP3_SCK),
268edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP3_MOSI),
269edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP3_MISO),
270edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SSP3_SS0),
271edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART0_RX),
272edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART0_TX),
273edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART0_CTS),
274edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART0_RTS),
275edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_RX),
276edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_TX),
277edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_CTS),
278edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART1_RTS),
279edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART2_RX),
280edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART2_TX),
281edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART2_CTS),
282edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART2_RTS),
283edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART3_RX),
284edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART3_TX),
285edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART3_CTS),
286edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(AUART3_RTS),
287edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM0),
288edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM1),
289edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM2),
290edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SAIF0_MCLK),
291edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SAIF0_LRCLK),
292edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SAIF0_BITCLK),
293edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SAIF0_SDATA0),
294edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(I2C0_SCL),
295edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(I2C0_SDA),
296edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SAIF1_SDATA0),
297edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(SPDIF),
298edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM3),
299edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(PWM4),
300edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(LCD_RESET),
301edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_MDC),
302edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_MDIO),
303edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RX_EN),
304edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RXD0),
305edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RXD1),
306edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TX_CLK),
307edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TX_EN),
308edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TXD0),
309edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TXD1),
310edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RXD2),
311edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RXD3),
312edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TXD2),
313edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_TXD3),
314edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_RX_CLK),
315edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_COL),
316edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET0_CRS),
317edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(ENET_CLK),
318edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(JTAG_RTCK),
319edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D00),
320edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D01),
321edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D02),
322edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D03),
323edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D04),
324edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D05),
325edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D06),
326edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D07),
327edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D08),
328edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D09),
329edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D10),
330edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D11),
331edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D12),
332edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D13),
333edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D14),
334edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_D15),
335edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_ODT0),
336edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQM0),
337edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_ODT1),
338edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQM1),
339edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DDR_OPEN_FB),
340edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CLK),
341edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQS0),
342edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DQS1),
343edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_DDR_OPEN),
344edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A00),
345edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A01),
346edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A02),
347edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A03),
348edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A04),
349edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A05),
350edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A06),
351edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A07),
352edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A08),
353edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A09),
354edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A10),
355edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A11),
356edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A12),
357edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A13),
358edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_A14),
359edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_BA0),
360edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_BA1),
361edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_BA2),
362edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CASN),
363edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_RASN),
364edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_WEN),
365edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CE0N),
366edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CE1N),
367edad3b2aSLinus Walleij 	MXS_PINCTRL_PIN(EMI_CKE),
368edad3b2aSLinus Walleij };
369edad3b2aSLinus Walleij 
370ae9d7f83SBhumika Goyal static const struct mxs_regs imx28_regs = {
371edad3b2aSLinus Walleij 	.muxsel = 0x100,
372edad3b2aSLinus Walleij 	.drive = 0x300,
373edad3b2aSLinus Walleij 	.pull = 0x600,
374edad3b2aSLinus Walleij };
375edad3b2aSLinus Walleij 
376edad3b2aSLinus Walleij static struct mxs_pinctrl_soc_data imx28_pinctrl_data = {
377edad3b2aSLinus Walleij 	.regs = &imx28_regs,
378edad3b2aSLinus Walleij 	.pins = imx28_pins,
379edad3b2aSLinus Walleij 	.npins = ARRAY_SIZE(imx28_pins),
380edad3b2aSLinus Walleij };
381edad3b2aSLinus Walleij 
imx28_pinctrl_probe(struct platform_device * pdev)382edad3b2aSLinus Walleij static int imx28_pinctrl_probe(struct platform_device *pdev)
383edad3b2aSLinus Walleij {
384edad3b2aSLinus Walleij 	return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data);
385edad3b2aSLinus Walleij }
386edad3b2aSLinus Walleij 
387edad3b2aSLinus Walleij static const struct of_device_id imx28_pinctrl_of_match[] = {
388edad3b2aSLinus Walleij 	{ .compatible = "fsl,imx28-pinctrl", },
389edad3b2aSLinus Walleij 	{ /* sentinel */ }
390edad3b2aSLinus Walleij };
391edad3b2aSLinus Walleij 
392edad3b2aSLinus Walleij static struct platform_driver imx28_pinctrl_driver = {
393edad3b2aSLinus Walleij 	.driver = {
394edad3b2aSLinus Walleij 		.name = "imx28-pinctrl",
39537824c12SPaul Gortmaker 		.suppress_bind_attrs = true,
396edad3b2aSLinus Walleij 		.of_match_table = imx28_pinctrl_of_match,
397edad3b2aSLinus Walleij 	},
398edad3b2aSLinus Walleij 	.probe = imx28_pinctrl_probe,
399edad3b2aSLinus Walleij };
400edad3b2aSLinus Walleij 
imx28_pinctrl_init(void)401edad3b2aSLinus Walleij static int __init imx28_pinctrl_init(void)
402edad3b2aSLinus Walleij {
403edad3b2aSLinus Walleij 	return platform_driver_register(&imx28_pinctrl_driver);
404edad3b2aSLinus Walleij }
405edad3b2aSLinus Walleij postcore_initcall(imx28_pinctrl_init);
406