1 #ifndef __PINCTRL_MTK_MT6397_H
2 #define __PINCTRL_MTK_MT6397_H
4 #include <linux/pinctrl/pinctrl.h>
5 #include "pinctrl-mtk-common.h"
7 static const struct mtk_desc_pin mtk_pins_mt6397[] = {
11 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
12 MTK_FUNCTION(0, "GPIO0"),
13 MTK_FUNCTION(1, "INT")
16 PINCTRL_PIN(1, "SRCVOLTEN"),
18 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
19 MTK_FUNCTION(0, "GPIO1"),
20 MTK_FUNCTION(1, "SRCVOLTEN"),
21 MTK_FUNCTION(6, "TEST_CK1")
24 PINCTRL_PIN(2, "SRCLKEN_PERI"),
26 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
27 MTK_FUNCTION(0, "GPIO2"),
28 MTK_FUNCTION(1, "SRCLKEN_PERI"),
29 MTK_FUNCTION(6, "TEST_CK2")
32 PINCTRL_PIN(3, "RTC_32K1V8"),
34 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
35 MTK_FUNCTION(0, "GPIO3"),
36 MTK_FUNCTION(1, "RTC_32K1V8"),
37 MTK_FUNCTION(6, "TEST_CK3")
40 PINCTRL_PIN(4, "WRAP_EVENT"),
42 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
43 MTK_FUNCTION(0, "GPIO4"),
44 MTK_FUNCTION(1, "WRAP_EVENT")
47 PINCTRL_PIN(5, "SPI_CLK"),
49 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
50 MTK_FUNCTION(0, "GPIO5"),
51 MTK_FUNCTION(1, "SPI_CLK")
54 PINCTRL_PIN(6, "SPI_CSN"),
56 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
57 MTK_FUNCTION(0, "GPIO6"),
58 MTK_FUNCTION(1, "SPI_CSN")
61 PINCTRL_PIN(7, "SPI_MOSI"),
63 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
64 MTK_FUNCTION(0, "GPIO7"),
65 MTK_FUNCTION(1, "SPI_MOSI")
68 PINCTRL_PIN(8, "SPI_MISO"),
70 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
71 MTK_FUNCTION(0, "GPIO8"),
72 MTK_FUNCTION(1, "SPI_MISO")
75 PINCTRL_PIN(9, "AUD_CLK_MOSI"),
77 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
78 MTK_FUNCTION(0, "GPIO9"),
79 MTK_FUNCTION(1, "AUD_CLK"),
80 MTK_FUNCTION(6, "TEST_IN0"),
81 MTK_FUNCTION(7, "TEST_OUT0")
84 PINCTRL_PIN(10, "AUD_DAT_MISO"),
86 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
87 MTK_FUNCTION(0, "GPIO10"),
88 MTK_FUNCTION(1, "AUD_MISO"),
89 MTK_FUNCTION(6, "TEST_IN1"),
90 MTK_FUNCTION(7, "TEST_OUT1")
93 PINCTRL_PIN(11, "AUD_DAT_MOSI"),
95 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
96 MTK_FUNCTION(0, "GPIO11"),
97 MTK_FUNCTION(1, "AUD_MOSI"),
98 MTK_FUNCTION(6, "TEST_IN2"),
99 MTK_FUNCTION(7, "TEST_OUT2")
102 PINCTRL_PIN(12, "COL0"),
104 MTK_EINT_FUNCTION(2, 10),
105 MTK_FUNCTION(0, "GPIO12"),
106 MTK_FUNCTION(1, "COL0_USBDL"),
107 MTK_FUNCTION(2, "EINT10_1X"),
108 MTK_FUNCTION(3, "PWM1_3X"),
109 MTK_FUNCTION(6, "TEST_IN3"),
110 MTK_FUNCTION(7, "TEST_OUT3")
113 PINCTRL_PIN(13, "COL1"),
115 MTK_EINT_FUNCTION(2, 11),
116 MTK_FUNCTION(0, "GPIO13"),
117 MTK_FUNCTION(1, "COL1"),
118 MTK_FUNCTION(2, "EINT11_1X"),
119 MTK_FUNCTION(3, "SCL0_2X"),
120 MTK_FUNCTION(6, "TEST_IN4"),
121 MTK_FUNCTION(7, "TEST_OUT4")
124 PINCTRL_PIN(14, "COL2"),
126 MTK_EINT_FUNCTION(2, 12),
127 MTK_FUNCTION(0, "GPIO14"),
128 MTK_FUNCTION(1, "COL2"),
129 MTK_FUNCTION(2, "EINT12_1X"),
130 MTK_FUNCTION(3, "SDA0_2X"),
131 MTK_FUNCTION(6, "TEST_IN5"),
132 MTK_FUNCTION(7, "TEST_OUT5")
135 PINCTRL_PIN(15, "COL3"),
137 MTK_EINT_FUNCTION(2, 13),
138 MTK_FUNCTION(0, "GPIO15"),
139 MTK_FUNCTION(1, "COL3"),
140 MTK_FUNCTION(2, "EINT13_1X"),
141 MTK_FUNCTION(3, "SCL1_2X"),
142 MTK_FUNCTION(6, "TEST_IN6"),
143 MTK_FUNCTION(7, "TEST_OUT6")
146 PINCTRL_PIN(16, "COL4"),
148 MTK_EINT_FUNCTION(2, 14),
149 MTK_FUNCTION(0, "GPIO16"),
150 MTK_FUNCTION(1, "COL4"),
151 MTK_FUNCTION(2, "EINT14_1X"),
152 MTK_FUNCTION(3, "SDA1_2X"),
153 MTK_FUNCTION(6, "TEST_IN7"),
154 MTK_FUNCTION(7, "TEST_OUT7")
157 PINCTRL_PIN(17, "COL5"),
159 MTK_EINT_FUNCTION(2, 15),
160 MTK_FUNCTION(0, "GPIO17"),
161 MTK_FUNCTION(1, "COL5"),
162 MTK_FUNCTION(2, "EINT15_1X"),
163 MTK_FUNCTION(3, "SCL2_2X"),
164 MTK_FUNCTION(6, "TEST_IN8"),
165 MTK_FUNCTION(7, "TEST_OUT8")
168 PINCTRL_PIN(18, "COL6"),
170 MTK_EINT_FUNCTION(2, 16),
171 MTK_FUNCTION(0, "GPIO18"),
172 MTK_FUNCTION(1, "COL6"),
173 MTK_FUNCTION(2, "EINT16_1X"),
174 MTK_FUNCTION(3, "SDA2_2X"),
175 MTK_FUNCTION(4, "GPIO32K_0"),
176 MTK_FUNCTION(5, "GPIO26M_0"),
177 MTK_FUNCTION(6, "TEST_IN9"),
178 MTK_FUNCTION(7, "TEST_OUT9")
181 PINCTRL_PIN(19, "COL7"),
183 MTK_EINT_FUNCTION(2, 17),
184 MTK_FUNCTION(0, "GPIO19"),
185 MTK_FUNCTION(1, "COL7"),
186 MTK_FUNCTION(2, "EINT17_1X"),
187 MTK_FUNCTION(3, "PWM2_3X"),
188 MTK_FUNCTION(4, "GPIO32K_1"),
189 MTK_FUNCTION(5, "GPIO26M_1"),
190 MTK_FUNCTION(6, "TEST_IN10"),
191 MTK_FUNCTION(7, "TEST_OUT10")
194 PINCTRL_PIN(20, "ROW0"),
196 MTK_EINT_FUNCTION(2, 18),
197 MTK_FUNCTION(0, "GPIO20"),
198 MTK_FUNCTION(1, "ROW0"),
199 MTK_FUNCTION(2, "EINT18_1X"),
200 MTK_FUNCTION(3, "SCL0_3X"),
201 MTK_FUNCTION(6, "TEST_IN11"),
202 MTK_FUNCTION(7, "TEST_OUT11")
205 PINCTRL_PIN(21, "ROW1"),
207 MTK_EINT_FUNCTION(2, 19),
208 MTK_FUNCTION(0, "GPIO21"),
209 MTK_FUNCTION(1, "ROW1"),
210 MTK_FUNCTION(2, "EINT19_1X"),
211 MTK_FUNCTION(3, "SDA0_3X"),
212 MTK_FUNCTION(4, "AUD_TSTCK"),
213 MTK_FUNCTION(6, "TEST_IN12"),
214 MTK_FUNCTION(7, "TEST_OUT12")
217 PINCTRL_PIN(22, "ROW2"),
219 MTK_EINT_FUNCTION(2, 20),
220 MTK_FUNCTION(0, "GPIO22"),
221 MTK_FUNCTION(1, "ROW2"),
222 MTK_FUNCTION(2, "EINT20_1X"),
223 MTK_FUNCTION(3, "SCL1_3X"),
224 MTK_FUNCTION(6, "TEST_IN13"),
225 MTK_FUNCTION(7, "TEST_OUT13")
228 PINCTRL_PIN(23, "ROW3"),
230 MTK_EINT_FUNCTION(2, 21),
231 MTK_FUNCTION(0, "GPIO23"),
232 MTK_FUNCTION(1, "ROW3"),
233 MTK_FUNCTION(2, "EINT21_1X"),
234 MTK_FUNCTION(3, "SDA1_3X"),
235 MTK_FUNCTION(6, "TEST_IN14"),
236 MTK_FUNCTION(7, "TEST_OUT14")
239 PINCTRL_PIN(24, "ROW4"),
241 MTK_EINT_FUNCTION(2, 22),
242 MTK_FUNCTION(0, "GPIO24"),
243 MTK_FUNCTION(1, "ROW4"),
244 MTK_FUNCTION(2, "EINT22_1X"),
245 MTK_FUNCTION(3, "SCL2_3X"),
246 MTK_FUNCTION(6, "TEST_IN15"),
247 MTK_FUNCTION(7, "TEST_OUT15")
250 PINCTRL_PIN(25, "ROW5"),
252 MTK_EINT_FUNCTION(2, 23),
253 MTK_FUNCTION(0, "GPIO25"),
254 MTK_FUNCTION(1, "ROW5"),
255 MTK_FUNCTION(2, "EINT23_1X"),
256 MTK_FUNCTION(3, "SDA2_3X"),
257 MTK_FUNCTION(6, "TEST_IN16"),
258 MTK_FUNCTION(7, "TEST_OUT16")
261 PINCTRL_PIN(26, "ROW6"),
263 MTK_EINT_FUNCTION(2, 24),
264 MTK_FUNCTION(0, "GPIO26"),
265 MTK_FUNCTION(1, "ROW6"),
266 MTK_FUNCTION(2, "EINT24_1X"),
267 MTK_FUNCTION(3, "PWM3_3X"),
268 MTK_FUNCTION(4, "GPIO32K_2"),
269 MTK_FUNCTION(5, "GPIO26M_2"),
270 MTK_FUNCTION(6, "TEST_IN17"),
271 MTK_FUNCTION(7, "TEST_OUT17")
274 PINCTRL_PIN(27, "ROW7"),
276 MTK_EINT_FUNCTION(2, 3),
277 MTK_FUNCTION(0, "GPIO27"),
278 MTK_FUNCTION(1, "ROW7"),
279 MTK_FUNCTION(2, "EINT3_1X"),
280 MTK_FUNCTION(3, "CBUS"),
281 MTK_FUNCTION(4, "GPIO32K_3"),
282 MTK_FUNCTION(5, "GPIO26M_3"),
283 MTK_FUNCTION(6, "TEST_IN18"),
284 MTK_FUNCTION(7, "TEST_OUT18")
287 PINCTRL_PIN(28, "PWM1(VMSEL1)"),
289 MTK_EINT_FUNCTION(2, 4),
290 MTK_FUNCTION(0, "GPIO28"),
291 MTK_FUNCTION(1, "PWM1"),
292 MTK_FUNCTION(2, "EINT4_1X"),
293 MTK_FUNCTION(4, "GPIO32K_4"),
294 MTK_FUNCTION(5, "GPIO26M_4"),
295 MTK_FUNCTION(6, "TEST_IN19"),
296 MTK_FUNCTION(7, "TEST_OUT19")
299 PINCTRL_PIN(29, "PWM2(VMSEL2)"),
301 MTK_EINT_FUNCTION(2, 5),
302 MTK_FUNCTION(0, "GPIO29"),
303 MTK_FUNCTION(1, "PWM2"),
304 MTK_FUNCTION(2, "EINT5_1X"),
305 MTK_FUNCTION(4, "GPIO32K_5"),
306 MTK_FUNCTION(5, "GPIO26M_5"),
307 MTK_FUNCTION(6, "TEST_IN20"),
308 MTK_FUNCTION(7, "TEST_OUT20")
311 PINCTRL_PIN(30, "PWM3(PWM)"),
313 MTK_EINT_FUNCTION(2, 6),
314 MTK_FUNCTION(0, "GPIO30"),
315 MTK_FUNCTION(1, "PWM3"),
316 MTK_FUNCTION(2, "EINT6_1X"),
317 MTK_FUNCTION(3, "COL0"),
318 MTK_FUNCTION(4, "GPIO32K_6"),
319 MTK_FUNCTION(5, "GPIO26M_6"),
320 MTK_FUNCTION(6, "TEST_IN21"),
321 MTK_FUNCTION(7, "TEST_OUT21")
324 PINCTRL_PIN(31, "SCL0"),
326 MTK_EINT_FUNCTION(2, 7),
327 MTK_FUNCTION(0, "GPIO31"),
328 MTK_FUNCTION(1, "SCL0"),
329 MTK_FUNCTION(2, "EINT7_1X"),
330 MTK_FUNCTION(3, "PWM1_2X"),
331 MTK_FUNCTION(6, "TEST_IN22"),
332 MTK_FUNCTION(7, "TEST_OUT22")
335 PINCTRL_PIN(32, "SDA0"),
337 MTK_EINT_FUNCTION(2, 8),
338 MTK_FUNCTION(0, "GPIO32"),
339 MTK_FUNCTION(1, "SDA0"),
340 MTK_FUNCTION(2, "EINT8_1X"),
341 MTK_FUNCTION(6, "TEST_IN23"),
342 MTK_FUNCTION(7, "TEST_OUT23")
345 PINCTRL_PIN(33, "SCL1"),
347 MTK_EINT_FUNCTION(2, 9),
348 MTK_FUNCTION(0, "GPIO33"),
349 MTK_FUNCTION(1, "SCL1"),
350 MTK_FUNCTION(2, "EINT9_1X"),
351 MTK_FUNCTION(3, "PWM2_2X"),
352 MTK_FUNCTION(6, "TEST_IN24"),
353 MTK_FUNCTION(7, "TEST_OUT24")
356 PINCTRL_PIN(34, "SDA1"),
358 MTK_EINT_FUNCTION(2, 0),
359 MTK_FUNCTION(0, "GPIO34"),
360 MTK_FUNCTION(1, "SDA1"),
361 MTK_FUNCTION(2, "EINT0_1X"),
362 MTK_FUNCTION(6, "TEST_IN25"),
363 MTK_FUNCTION(7, "TEST_OUT25")
366 PINCTRL_PIN(35, "SCL2"),
368 MTK_EINT_FUNCTION(2, 1),
369 MTK_FUNCTION(0, "GPIO35"),
370 MTK_FUNCTION(1, "SCL2"),
371 MTK_FUNCTION(2, "EINT1_1X"),
372 MTK_FUNCTION(3, "PWM3_2X"),
373 MTK_FUNCTION(6, "TEST_IN26"),
374 MTK_FUNCTION(7, "TEST_OUT26")
377 PINCTRL_PIN(36, "SDA2"),
379 MTK_EINT_FUNCTION(2, 2),
380 MTK_FUNCTION(0, "GPIO36"),
381 MTK_FUNCTION(1, "SDA2"),
382 MTK_FUNCTION(2, "EINT2_1X"),
383 MTK_FUNCTION(6, "TEST_IN27"),
384 MTK_FUNCTION(7, "TEST_OUT27")
387 PINCTRL_PIN(37, "HDMISD"),
389 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
390 MTK_FUNCTION(0, "GPIO37"),
391 MTK_FUNCTION(1, "HDMISD"),
392 MTK_FUNCTION(6, "TEST_IN28"),
393 MTK_FUNCTION(7, "TEST_OUT28")
396 PINCTRL_PIN(38, "HDMISCK"),
398 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
399 MTK_FUNCTION(0, "GPIO38"),
400 MTK_FUNCTION(1, "HDMISCK"),
401 MTK_FUNCTION(6, "TEST_IN29"),
402 MTK_FUNCTION(7, "TEST_OUT29")
405 PINCTRL_PIN(39, "HTPLG"),
407 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
408 MTK_FUNCTION(0, "GPIO39"),
409 MTK_FUNCTION(1, "HTPLG"),
410 MTK_FUNCTION(6, "TEST_IN30"),
411 MTK_FUNCTION(7, "TEST_OUT30")
414 PINCTRL_PIN(40, "CEC"),
416 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
417 MTK_FUNCTION(0, "GPIO40"),
418 MTK_FUNCTION(1, "CEC"),
419 MTK_FUNCTION(6, "TEST_IN31"),
420 MTK_FUNCTION(7, "TEST_OUT31")
424 #endif /* __PINCTRL_MTK_MT6397_H */