1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PINCTRL_MTK_MT6397_H
3 #define __PINCTRL_MTK_MT6397_H
5 #include <linux/pinctrl/pinctrl.h>
6 #include "pinctrl-mtk-common.h"
8 static const struct mtk_desc_pin mtk_pins_mt6397
[] = {
9 MTK_PIN(PINCTRL_PIN(0, "INT"),
11 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
12 MTK_FUNCTION(0, "GPIO0"),
13 MTK_FUNCTION(1, "INT")
15 MTK_PIN(PINCTRL_PIN(1, "SRCVOLTEN"),
17 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
18 MTK_FUNCTION(0, "GPIO1"),
19 MTK_FUNCTION(1, "SRCVOLTEN"),
20 MTK_FUNCTION(6, "TEST_CK1")
22 MTK_PIN(PINCTRL_PIN(2, "SRCLKEN_PERI"),
24 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
25 MTK_FUNCTION(0, "GPIO2"),
26 MTK_FUNCTION(1, "SRCLKEN_PERI"),
27 MTK_FUNCTION(6, "TEST_CK2")
29 MTK_PIN(PINCTRL_PIN(3, "RTC_32K1V8"),
31 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
32 MTK_FUNCTION(0, "GPIO3"),
33 MTK_FUNCTION(1, "RTC_32K1V8"),
34 MTK_FUNCTION(6, "TEST_CK3")
36 MTK_PIN(PINCTRL_PIN(4, "WRAP_EVENT"),
38 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
39 MTK_FUNCTION(0, "GPIO4"),
40 MTK_FUNCTION(1, "WRAP_EVENT")
42 MTK_PIN(PINCTRL_PIN(5, "SPI_CLK"),
44 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
45 MTK_FUNCTION(0, "GPIO5"),
46 MTK_FUNCTION(1, "SPI_CLK")
48 MTK_PIN(PINCTRL_PIN(6, "SPI_CSN"),
50 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
51 MTK_FUNCTION(0, "GPIO6"),
52 MTK_FUNCTION(1, "SPI_CSN")
54 MTK_PIN(PINCTRL_PIN(7, "SPI_MOSI"),
56 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
57 MTK_FUNCTION(0, "GPIO7"),
58 MTK_FUNCTION(1, "SPI_MOSI")
60 MTK_PIN(PINCTRL_PIN(8, "SPI_MISO"),
62 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
63 MTK_FUNCTION(0, "GPIO8"),
64 MTK_FUNCTION(1, "SPI_MISO")
66 MTK_PIN(PINCTRL_PIN(9, "AUD_CLK_MOSI"),
68 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
69 MTK_FUNCTION(0, "GPIO9"),
70 MTK_FUNCTION(1, "AUD_CLK"),
71 MTK_FUNCTION(6, "TEST_IN0"),
72 MTK_FUNCTION(7, "TEST_OUT0")
74 MTK_PIN(PINCTRL_PIN(10, "AUD_DAT_MISO"),
76 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
77 MTK_FUNCTION(0, "GPIO10"),
78 MTK_FUNCTION(1, "AUD_MISO"),
79 MTK_FUNCTION(6, "TEST_IN1"),
80 MTK_FUNCTION(7, "TEST_OUT1")
82 MTK_PIN(PINCTRL_PIN(11, "AUD_DAT_MOSI"),
84 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
85 MTK_FUNCTION(0, "GPIO11"),
86 MTK_FUNCTION(1, "AUD_MOSI"),
87 MTK_FUNCTION(6, "TEST_IN2"),
88 MTK_FUNCTION(7, "TEST_OUT2")
90 MTK_PIN(PINCTRL_PIN(12, "COL0"),
92 MTK_EINT_FUNCTION(2, 10),
93 MTK_FUNCTION(0, "GPIO12"),
94 MTK_FUNCTION(1, "COL0_USBDL"),
95 MTK_FUNCTION(2, "EINT10_1X"),
96 MTK_FUNCTION(3, "PWM1_3X"),
97 MTK_FUNCTION(6, "TEST_IN3"),
98 MTK_FUNCTION(7, "TEST_OUT3")
100 MTK_PIN(PINCTRL_PIN(13, "COL1"),
102 MTK_EINT_FUNCTION(2, 11),
103 MTK_FUNCTION(0, "GPIO13"),
104 MTK_FUNCTION(1, "COL1"),
105 MTK_FUNCTION(2, "EINT11_1X"),
106 MTK_FUNCTION(3, "SCL0_2X"),
107 MTK_FUNCTION(6, "TEST_IN4"),
108 MTK_FUNCTION(7, "TEST_OUT4")
110 MTK_PIN(PINCTRL_PIN(14, "COL2"),
112 MTK_EINT_FUNCTION(2, 12),
113 MTK_FUNCTION(0, "GPIO14"),
114 MTK_FUNCTION(1, "COL2"),
115 MTK_FUNCTION(2, "EINT12_1X"),
116 MTK_FUNCTION(3, "SDA0_2X"),
117 MTK_FUNCTION(6, "TEST_IN5"),
118 MTK_FUNCTION(7, "TEST_OUT5")
120 MTK_PIN(PINCTRL_PIN(15, "COL3"),
122 MTK_EINT_FUNCTION(2, 13),
123 MTK_FUNCTION(0, "GPIO15"),
124 MTK_FUNCTION(1, "COL3"),
125 MTK_FUNCTION(2, "EINT13_1X"),
126 MTK_FUNCTION(3, "SCL1_2X"),
127 MTK_FUNCTION(6, "TEST_IN6"),
128 MTK_FUNCTION(7, "TEST_OUT6")
130 MTK_PIN(PINCTRL_PIN(16, "COL4"),
132 MTK_EINT_FUNCTION(2, 14),
133 MTK_FUNCTION(0, "GPIO16"),
134 MTK_FUNCTION(1, "COL4"),
135 MTK_FUNCTION(2, "EINT14_1X"),
136 MTK_FUNCTION(3, "SDA1_2X"),
137 MTK_FUNCTION(6, "TEST_IN7"),
138 MTK_FUNCTION(7, "TEST_OUT7")
140 MTK_PIN(PINCTRL_PIN(17, "COL5"),
142 MTK_EINT_FUNCTION(2, 15),
143 MTK_FUNCTION(0, "GPIO17"),
144 MTK_FUNCTION(1, "COL5"),
145 MTK_FUNCTION(2, "EINT15_1X"),
146 MTK_FUNCTION(3, "SCL2_2X"),
147 MTK_FUNCTION(6, "TEST_IN8"),
148 MTK_FUNCTION(7, "TEST_OUT8")
150 MTK_PIN(PINCTRL_PIN(18, "COL6"),
152 MTK_EINT_FUNCTION(2, 16),
153 MTK_FUNCTION(0, "GPIO18"),
154 MTK_FUNCTION(1, "COL6"),
155 MTK_FUNCTION(2, "EINT16_1X"),
156 MTK_FUNCTION(3, "SDA2_2X"),
157 MTK_FUNCTION(4, "GPIO32K_0"),
158 MTK_FUNCTION(5, "GPIO26M_0"),
159 MTK_FUNCTION(6, "TEST_IN9"),
160 MTK_FUNCTION(7, "TEST_OUT9")
162 MTK_PIN(PINCTRL_PIN(19, "COL7"),
164 MTK_EINT_FUNCTION(2, 17),
165 MTK_FUNCTION(0, "GPIO19"),
166 MTK_FUNCTION(1, "COL7"),
167 MTK_FUNCTION(2, "EINT17_1X"),
168 MTK_FUNCTION(3, "PWM2_3X"),
169 MTK_FUNCTION(4, "GPIO32K_1"),
170 MTK_FUNCTION(5, "GPIO26M_1"),
171 MTK_FUNCTION(6, "TEST_IN10"),
172 MTK_FUNCTION(7, "TEST_OUT10")
174 MTK_PIN(PINCTRL_PIN(20, "ROW0"),
176 MTK_EINT_FUNCTION(2, 18),
177 MTK_FUNCTION(0, "GPIO20"),
178 MTK_FUNCTION(1, "ROW0"),
179 MTK_FUNCTION(2, "EINT18_1X"),
180 MTK_FUNCTION(3, "SCL0_3X"),
181 MTK_FUNCTION(6, "TEST_IN11"),
182 MTK_FUNCTION(7, "TEST_OUT11")
184 MTK_PIN(PINCTRL_PIN(21, "ROW1"),
186 MTK_EINT_FUNCTION(2, 19),
187 MTK_FUNCTION(0, "GPIO21"),
188 MTK_FUNCTION(1, "ROW1"),
189 MTK_FUNCTION(2, "EINT19_1X"),
190 MTK_FUNCTION(3, "SDA0_3X"),
191 MTK_FUNCTION(4, "AUD_TSTCK"),
192 MTK_FUNCTION(6, "TEST_IN12"),
193 MTK_FUNCTION(7, "TEST_OUT12")
195 MTK_PIN(PINCTRL_PIN(22, "ROW2"),
197 MTK_EINT_FUNCTION(2, 20),
198 MTK_FUNCTION(0, "GPIO22"),
199 MTK_FUNCTION(1, "ROW2"),
200 MTK_FUNCTION(2, "EINT20_1X"),
201 MTK_FUNCTION(3, "SCL1_3X"),
202 MTK_FUNCTION(6, "TEST_IN13"),
203 MTK_FUNCTION(7, "TEST_OUT13")
205 MTK_PIN(PINCTRL_PIN(23, "ROW3"),
207 MTK_EINT_FUNCTION(2, 21),
208 MTK_FUNCTION(0, "GPIO23"),
209 MTK_FUNCTION(1, "ROW3"),
210 MTK_FUNCTION(2, "EINT21_1X"),
211 MTK_FUNCTION(3, "SDA1_3X"),
212 MTK_FUNCTION(6, "TEST_IN14"),
213 MTK_FUNCTION(7, "TEST_OUT14")
215 MTK_PIN(PINCTRL_PIN(24, "ROW4"),
217 MTK_EINT_FUNCTION(2, 22),
218 MTK_FUNCTION(0, "GPIO24"),
219 MTK_FUNCTION(1, "ROW4"),
220 MTK_FUNCTION(2, "EINT22_1X"),
221 MTK_FUNCTION(3, "SCL2_3X"),
222 MTK_FUNCTION(6, "TEST_IN15"),
223 MTK_FUNCTION(7, "TEST_OUT15")
225 MTK_PIN(PINCTRL_PIN(25, "ROW5"),
227 MTK_EINT_FUNCTION(2, 23),
228 MTK_FUNCTION(0, "GPIO25"),
229 MTK_FUNCTION(1, "ROW5"),
230 MTK_FUNCTION(2, "EINT23_1X"),
231 MTK_FUNCTION(3, "SDA2_3X"),
232 MTK_FUNCTION(6, "TEST_IN16"),
233 MTK_FUNCTION(7, "TEST_OUT16")
235 MTK_PIN(PINCTRL_PIN(26, "ROW6"),
237 MTK_EINT_FUNCTION(2, 24),
238 MTK_FUNCTION(0, "GPIO26"),
239 MTK_FUNCTION(1, "ROW6"),
240 MTK_FUNCTION(2, "EINT24_1X"),
241 MTK_FUNCTION(3, "PWM3_3X"),
242 MTK_FUNCTION(4, "GPIO32K_2"),
243 MTK_FUNCTION(5, "GPIO26M_2"),
244 MTK_FUNCTION(6, "TEST_IN17"),
245 MTK_FUNCTION(7, "TEST_OUT17")
247 MTK_PIN(PINCTRL_PIN(27, "ROW7"),
249 MTK_EINT_FUNCTION(2, 3),
250 MTK_FUNCTION(0, "GPIO27"),
251 MTK_FUNCTION(1, "ROW7"),
252 MTK_FUNCTION(2, "EINT3_1X"),
253 MTK_FUNCTION(3, "CBUS"),
254 MTK_FUNCTION(4, "GPIO32K_3"),
255 MTK_FUNCTION(5, "GPIO26M_3"),
256 MTK_FUNCTION(6, "TEST_IN18"),
257 MTK_FUNCTION(7, "TEST_OUT18")
259 MTK_PIN(PINCTRL_PIN(28, "PWM1(VMSEL1)"),
261 MTK_EINT_FUNCTION(2, 4),
262 MTK_FUNCTION(0, "GPIO28"),
263 MTK_FUNCTION(1, "PWM1"),
264 MTK_FUNCTION(2, "EINT4_1X"),
265 MTK_FUNCTION(4, "GPIO32K_4"),
266 MTK_FUNCTION(5, "GPIO26M_4"),
267 MTK_FUNCTION(6, "TEST_IN19"),
268 MTK_FUNCTION(7, "TEST_OUT19")
270 MTK_PIN(PINCTRL_PIN(29, "PWM2(VMSEL2)"),
272 MTK_EINT_FUNCTION(2, 5),
273 MTK_FUNCTION(0, "GPIO29"),
274 MTK_FUNCTION(1, "PWM2"),
275 MTK_FUNCTION(2, "EINT5_1X"),
276 MTK_FUNCTION(4, "GPIO32K_5"),
277 MTK_FUNCTION(5, "GPIO26M_5"),
278 MTK_FUNCTION(6, "TEST_IN20"),
279 MTK_FUNCTION(7, "TEST_OUT20")
281 MTK_PIN(PINCTRL_PIN(30, "PWM3(PWM)"),
283 MTK_EINT_FUNCTION(2, 6),
284 MTK_FUNCTION(0, "GPIO30"),
285 MTK_FUNCTION(1, "PWM3"),
286 MTK_FUNCTION(2, "EINT6_1X"),
287 MTK_FUNCTION(3, "COL0"),
288 MTK_FUNCTION(4, "GPIO32K_6"),
289 MTK_FUNCTION(5, "GPIO26M_6"),
290 MTK_FUNCTION(6, "TEST_IN21"),
291 MTK_FUNCTION(7, "TEST_OUT21")
293 MTK_PIN(PINCTRL_PIN(31, "SCL0"),
295 MTK_EINT_FUNCTION(2, 7),
296 MTK_FUNCTION(0, "GPIO31"),
297 MTK_FUNCTION(1, "SCL0"),
298 MTK_FUNCTION(2, "EINT7_1X"),
299 MTK_FUNCTION(3, "PWM1_2X"),
300 MTK_FUNCTION(6, "TEST_IN22"),
301 MTK_FUNCTION(7, "TEST_OUT22")
303 MTK_PIN(PINCTRL_PIN(32, "SDA0"),
305 MTK_EINT_FUNCTION(2, 8),
306 MTK_FUNCTION(0, "GPIO32"),
307 MTK_FUNCTION(1, "SDA0"),
308 MTK_FUNCTION(2, "EINT8_1X"),
309 MTK_FUNCTION(6, "TEST_IN23"),
310 MTK_FUNCTION(7, "TEST_OUT23")
312 MTK_PIN(PINCTRL_PIN(33, "SCL1"),
314 MTK_EINT_FUNCTION(2, 9),
315 MTK_FUNCTION(0, "GPIO33"),
316 MTK_FUNCTION(1, "SCL1"),
317 MTK_FUNCTION(2, "EINT9_1X"),
318 MTK_FUNCTION(3, "PWM2_2X"),
319 MTK_FUNCTION(6, "TEST_IN24"),
320 MTK_FUNCTION(7, "TEST_OUT24")
322 MTK_PIN(PINCTRL_PIN(34, "SDA1"),
324 MTK_EINT_FUNCTION(2, 0),
325 MTK_FUNCTION(0, "GPIO34"),
326 MTK_FUNCTION(1, "SDA1"),
327 MTK_FUNCTION(2, "EINT0_1X"),
328 MTK_FUNCTION(6, "TEST_IN25"),
329 MTK_FUNCTION(7, "TEST_OUT25")
331 MTK_PIN(PINCTRL_PIN(35, "SCL2"),
333 MTK_EINT_FUNCTION(2, 1),
334 MTK_FUNCTION(0, "GPIO35"),
335 MTK_FUNCTION(1, "SCL2"),
336 MTK_FUNCTION(2, "EINT1_1X"),
337 MTK_FUNCTION(3, "PWM3_2X"),
338 MTK_FUNCTION(6, "TEST_IN26"),
339 MTK_FUNCTION(7, "TEST_OUT26")
341 MTK_PIN(PINCTRL_PIN(36, "SDA2"),
343 MTK_EINT_FUNCTION(2, 2),
344 MTK_FUNCTION(0, "GPIO36"),
345 MTK_FUNCTION(1, "SDA2"),
346 MTK_FUNCTION(2, "EINT2_1X"),
347 MTK_FUNCTION(6, "TEST_IN27"),
348 MTK_FUNCTION(7, "TEST_OUT27")
350 MTK_PIN(PINCTRL_PIN(37, "HDMISD"),
352 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
353 MTK_FUNCTION(0, "GPIO37"),
354 MTK_FUNCTION(1, "HDMISD"),
355 MTK_FUNCTION(6, "TEST_IN28"),
356 MTK_FUNCTION(7, "TEST_OUT28")
358 MTK_PIN(PINCTRL_PIN(38, "HDMISCK"),
360 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
361 MTK_FUNCTION(0, "GPIO38"),
362 MTK_FUNCTION(1, "HDMISCK"),
363 MTK_FUNCTION(6, "TEST_IN29"),
364 MTK_FUNCTION(7, "TEST_OUT29")
366 MTK_PIN(PINCTRL_PIN(39, "HTPLG"),
368 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
369 MTK_FUNCTION(0, "GPIO39"),
370 MTK_FUNCTION(1, "HTPLG"),
371 MTK_FUNCTION(6, "TEST_IN30"),
372 MTK_FUNCTION(7, "TEST_OUT30")
374 MTK_PIN(PINCTRL_PIN(40, "CEC"),
376 MTK_EINT_FUNCTION(NO_EINT_SUPPORT
, NO_EINT_SUPPORT
),
377 MTK_FUNCTION(0, "GPIO40"),
378 MTK_FUNCTION(1, "CEC"),
379 MTK_FUNCTION(6, "TEST_IN31"),
380 MTK_FUNCTION(7, "TEST_OUT31")
384 #endif /* __PINCTRL_MTK_MT6397_H */