at commit c03c1a14

1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4 */
5
6 #include <linux/module.h>
7 #include <linux/of.h>
8 #include <linux/platform_device.h>
9
10 #include "pinctrl-msm.h"
11
12 #define REG_SIZE 0x1000
13 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
14 { \
15 .grp = PINCTRL_PINGROUP("gpio" #id, \
16 gpio##id##_pins, \
17 ARRAY_SIZE(gpio##id##_pins)), \
18 .ctl_reg = REG_SIZE * id, \
19 .io_reg = 0x4 + REG_SIZE * id, \
20 .intr_cfg_reg = 0x8 + REG_SIZE * id, \
21 .intr_status_reg = 0xc + REG_SIZE * id, \
22 .mux_bit = 2, \
23 .pull_bit = 0, \
24 .drv_bit = 6, \
25 .egpio_enable = 12, \
26 .egpio_present = 11, \
27 .oe_bit = 9, \
28 .in_bit = 0, \
29 .out_bit = 1, \
30 .intr_enable_bit = 0, \
31 .intr_status_bit = 0, \
32 .intr_wakeup_present_bit = 6, \
33 .intr_wakeup_enable_bit = 7, \
34 .intr_target_bit = 8, \
35 .intr_target_width = 4, \
36 .intr_target_kpss_val = 3, \
37 .intr_raw_status_bit = 4, \
38 .intr_polarity_bit = 1, \
39 .intr_detection_bit = 2, \
40 .intr_detection_width = 2, \
41 .funcs = (int[]){ \
42 msm_mux_gpio, /* gpio mode */ \
43 msm_mux_##f1, \
44 msm_mux_##f2, \
45 msm_mux_##f3, \
46 msm_mux_##f4, \
47 msm_mux_##f5, \
48 msm_mux_##f6, \
49 msm_mux_##f7, \
50 msm_mux_##f8, \
51 msm_mux_##f9, \
52 msm_mux_##f10, \
53 msm_mux_##f11 /* egpio mode */ \
54 }, \
55 .nfuncs = 12, \
56 }
57
58 #define UFS_RESET(pg_name, ctl, io) \
59 { \
60 .grp = PINCTRL_PINGROUP(#pg_name, \
61 pg_name##_pins, \
62 ARRAY_SIZE(pg_name##_pins)), \
63 .ctl_reg = ctl, \
64 .io_reg = io, \
65 .intr_cfg_reg = 0, \
66 .intr_status_reg = 0, \
67 .mux_bit = -1, \
68 .pull_bit = 3, \
69 .drv_bit = 0, \
70 .oe_bit = -1, \
71 .in_bit = -1, \
72 .out_bit = 0, \
73 .intr_enable_bit = -1, \
74 .intr_status_bit = -1, \
75 .intr_target_bit = -1, \
76 .intr_raw_status_bit = -1, \
77 .intr_polarity_bit = -1, \
78 .intr_detection_bit = -1, \
79 .intr_detection_width = -1, \
80 }
81
82 static const struct pinctrl_pin_desc nord_pins[] = {
83 PINCTRL_PIN(0, "GPIO_0"),
84 PINCTRL_PIN(1, "GPIO_1"),
85 PINCTRL_PIN(2, "GPIO_2"),
86 PINCTRL_PIN(3, "GPIO_3"),
87 PINCTRL_PIN(4, "GPIO_4"),
88 PINCTRL_PIN(5, "GPIO_5"),
89 PINCTRL_PIN(6, "GPIO_6"),
90 PINCTRL_PIN(7, "GPIO_7"),
91 PINCTRL_PIN(8, "GPIO_8"),
92 PINCTRL_PIN(9, "GPIO_9"),
93 PINCTRL_PIN(10, "GPIO_10"),
94 PINCTRL_PIN(11, "GPIO_11"),
95 PINCTRL_PIN(12, "GPIO_12"),
96 PINCTRL_PIN(13, "GPIO_13"),
97 PINCTRL_PIN(14, "GPIO_14"),
98 PINCTRL_PIN(15, "GPIO_15"),
99 PINCTRL_PIN(16, "GPIO_16"),
100 PINCTRL_PIN(17, "GPIO_17"),
101 PINCTRL_PIN(18, "GPIO_18"),
102 PINCTRL_PIN(19, "GPIO_19"),
103 PINCTRL_PIN(20, "GPIO_20"),
104 PINCTRL_PIN(21, "GPIO_21"),
105 PINCTRL_PIN(22, "GPIO_22"),
106 PINCTRL_PIN(23, "GPIO_23"),
107 PINCTRL_PIN(24, "GPIO_24"),
108 PINCTRL_PIN(25, "GPIO_25"),
109 PINCTRL_PIN(26, "GPIO_26"),
110 PINCTRL_PIN(27, "GPIO_27"),
111 PINCTRL_PIN(28, "GPIO_28"),
112 PINCTRL_PIN(29, "GPIO_29"),
113 PINCTRL_PIN(30, "GPIO_30"),
114 PINCTRL_PIN(31, "GPIO_31"),
115 PINCTRL_PIN(32, "GPIO_32"),
116 PINCTRL_PIN(33, "GPIO_33"),
117 PINCTRL_PIN(34, "GPIO_34"),
118 PINCTRL_PIN(35, "GPIO_35"),
119 PINCTRL_PIN(36, "GPIO_36"),
120 PINCTRL_PIN(37, "GPIO_37"),
121 PINCTRL_PIN(38, "GPIO_38"),
122 PINCTRL_PIN(39, "GPIO_39"),
123 PINCTRL_PIN(40, "GPIO_40"),
124 PINCTRL_PIN(41, "GPIO_41"),
125 PINCTRL_PIN(42, "GPIO_42"),
126 PINCTRL_PIN(43, "GPIO_43"),
127 PINCTRL_PIN(44, "GPIO_44"),
128 PINCTRL_PIN(45, "GPIO_45"),
129 PINCTRL_PIN(46, "GPIO_46"),
130 PINCTRL_PIN(47, "GPIO_47"),
131 PINCTRL_PIN(48, "GPIO_48"),
132 PINCTRL_PIN(49, "GPIO_49"),
133 PINCTRL_PIN(50, "GPIO_50"),
134 PINCTRL_PIN(51, "GPIO_51"),
135 PINCTRL_PIN(52, "GPIO_52"),
136 PINCTRL_PIN(53, "GPIO_53"),
137 PINCTRL_PIN(54, "GPIO_54"),
138 PINCTRL_PIN(55, "GPIO_55"),
139 PINCTRL_PIN(56, "GPIO_56"),
140 PINCTRL_PIN(57, "GPIO_57"),
141 PINCTRL_PIN(58, "GPIO_58"),
142 PINCTRL_PIN(59, "GPIO_59"),
143 PINCTRL_PIN(60, "GPIO_60"),
144 PINCTRL_PIN(61, "GPIO_61"),
145 PINCTRL_PIN(62, "GPIO_62"),
146 PINCTRL_PIN(63, "GPIO_63"),
147 PINCTRL_PIN(64, "GPIO_64"),
148 PINCTRL_PIN(65, "GPIO_65"),
149 PINCTRL_PIN(66, "GPIO_66"),
150 PINCTRL_PIN(67, "GPIO_67"),
151 PINCTRL_PIN(68, "GPIO_68"),
152 PINCTRL_PIN(69, "GPIO_69"),
153 PINCTRL_PIN(70, "GPIO_70"),
154 PINCTRL_PIN(71, "GPIO_71"),
155 PINCTRL_PIN(72, "GPIO_72"),
156 PINCTRL_PIN(73, "GPIO_73"),
157 PINCTRL_PIN(74, "GPIO_74"),
158 PINCTRL_PIN(75, "GPIO_75"),
159 PINCTRL_PIN(76, "GPIO_76"),
160 PINCTRL_PIN(77, "GPIO_77"),
161 PINCTRL_PIN(78, "GPIO_78"),
162 PINCTRL_PIN(79, "GPIO_79"),
163 PINCTRL_PIN(80, "GPIO_80"),
164 PINCTRL_PIN(81, "GPIO_81"),
165 PINCTRL_PIN(82, "GPIO_82"),
166 PINCTRL_PIN(83, "GPIO_83"),
167 PINCTRL_PIN(84, "GPIO_84"),
168 PINCTRL_PIN(85, "GPIO_85"),
169 PINCTRL_PIN(86, "GPIO_86"),
170 PINCTRL_PIN(87, "GPIO_87"),
171 PINCTRL_PIN(88, "GPIO_88"),
172 PINCTRL_PIN(89, "GPIO_89"),
173 PINCTRL_PIN(90, "GPIO_90"),
174 PINCTRL_PIN(91, "GPIO_91"),
175 PINCTRL_PIN(92, "GPIO_92"),
176 PINCTRL_PIN(93, "GPIO_93"),
177 PINCTRL_PIN(94, "GPIO_94"),
178 PINCTRL_PIN(95, "GPIO_95"),
179 PINCTRL_PIN(96, "GPIO_96"),
180 PINCTRL_PIN(97, "GPIO_97"),
181 PINCTRL_PIN(98, "GPIO_98"),
182 PINCTRL_PIN(99, "GPIO_99"),
183 PINCTRL_PIN(100, "GPIO_100"),
184 PINCTRL_PIN(101, "GPIO_101"),
185 PINCTRL_PIN(102, "GPIO_102"),
186 PINCTRL_PIN(103, "GPIO_103"),
187 PINCTRL_PIN(104, "GPIO_104"),
188 PINCTRL_PIN(105, "GPIO_105"),
189 PINCTRL_PIN(106, "GPIO_106"),
190 PINCTRL_PIN(107, "GPIO_107"),
191 PINCTRL_PIN(108, "GPIO_108"),
192 PINCTRL_PIN(109, "GPIO_109"),
193 PINCTRL_PIN(110, "GPIO_110"),
194 PINCTRL_PIN(111, "GPIO_111"),
195 PINCTRL_PIN(112, "GPIO_112"),
196 PINCTRL_PIN(113, "GPIO_113"),
197 PINCTRL_PIN(114, "GPIO_114"),
198 PINCTRL_PIN(115, "GPIO_115"),
199 PINCTRL_PIN(116, "GPIO_116"),
200 PINCTRL_PIN(117, "GPIO_117"),
201 PINCTRL_PIN(118, "GPIO_118"),
202 PINCTRL_PIN(119, "GPIO_119"),
203 PINCTRL_PIN(120, "GPIO_120"),
204 PINCTRL_PIN(121, "GPIO_121"),
205 PINCTRL_PIN(122, "GPIO_122"),
206 PINCTRL_PIN(123, "GPIO_123"),
207 PINCTRL_PIN(124, "GPIO_124"),
208 PINCTRL_PIN(125, "GPIO_125"),
209 PINCTRL_PIN(126, "GPIO_126"),
210 PINCTRL_PIN(127, "GPIO_127"),
211 PINCTRL_PIN(128, "GPIO_128"),
212 PINCTRL_PIN(129, "GPIO_129"),
213 PINCTRL_PIN(130, "GPIO_130"),
214 PINCTRL_PIN(131, "GPIO_131"),
215 PINCTRL_PIN(132, "GPIO_132"),
216 PINCTRL_PIN(133, "GPIO_133"),
217 PINCTRL_PIN(134, "GPIO_134"),
218 PINCTRL_PIN(135, "GPIO_135"),
219 PINCTRL_PIN(136, "GPIO_136"),
220 PINCTRL_PIN(137, "GPIO_137"),
221 PINCTRL_PIN(138, "GPIO_138"),
222 PINCTRL_PIN(139, "GPIO_139"),
223 PINCTRL_PIN(140, "GPIO_140"),
224 PINCTRL_PIN(141, "GPIO_141"),
225 PINCTRL_PIN(142, "GPIO_142"),
226 PINCTRL_PIN(143, "GPIO_143"),
227 PINCTRL_PIN(144, "GPIO_144"),
228 PINCTRL_PIN(145, "GPIO_145"),
229 PINCTRL_PIN(146, "GPIO_146"),
230 PINCTRL_PIN(147, "GPIO_147"),
231 PINCTRL_PIN(148, "GPIO_148"),
232 PINCTRL_PIN(149, "GPIO_149"),
233 PINCTRL_PIN(150, "GPIO_150"),
234 PINCTRL_PIN(151, "GPIO_151"),
235 PINCTRL_PIN(152, "GPIO_152"),
236 PINCTRL_PIN(153, "GPIO_153"),
237 PINCTRL_PIN(154, "GPIO_154"),
238 PINCTRL_PIN(155, "GPIO_155"),
239 PINCTRL_PIN(156, "GPIO_156"),
240 PINCTRL_PIN(157, "GPIO_157"),
241 PINCTRL_PIN(158, "GPIO_158"),
242 PINCTRL_PIN(159, "GPIO_159"),
243 PINCTRL_PIN(160, "GPIO_160"),
244 PINCTRL_PIN(161, "GPIO_161"),
245 PINCTRL_PIN(162, "GPIO_162"),
246 PINCTRL_PIN(163, "GPIO_163"),
247 PINCTRL_PIN(164, "GPIO_164"),
248 PINCTRL_PIN(165, "GPIO_165"),
249 PINCTRL_PIN(166, "GPIO_166"),
250 PINCTRL_PIN(167, "GPIO_167"),
251 PINCTRL_PIN(168, "GPIO_168"),
252 PINCTRL_PIN(169, "GPIO_169"),
253 PINCTRL_PIN(170, "GPIO_170"),
254 PINCTRL_PIN(171, "GPIO_171"),
255 PINCTRL_PIN(172, "GPIO_172"),
256 PINCTRL_PIN(173, "GPIO_173"),
257 PINCTRL_PIN(174, "GPIO_174"),
258 PINCTRL_PIN(175, "GPIO_175"),
259 PINCTRL_PIN(176, "GPIO_176"),
260 PINCTRL_PIN(177, "GPIO_177"),
261 PINCTRL_PIN(178, "GPIO_178"),
262 PINCTRL_PIN(179, "GPIO_179"),
263 PINCTRL_PIN(180, "GPIO_180"),
264 PINCTRL_PIN(181, "UFS_RESET"),
265 };
266
267 #define DECLARE_MSM_GPIO_PINS(pin) \
268 static const unsigned int gpio##pin##_pins[] = { pin }
269 DECLARE_MSM_GPIO_PINS(0);
270 DECLARE_MSM_GPIO_PINS(1);
271 DECLARE_MSM_GPIO_PINS(2);
272 DECLARE_MSM_GPIO_PINS(3);
273 DECLARE_MSM_GPIO_PINS(4);
274 DECLARE_MSM_GPIO_PINS(5);
275 DECLARE_MSM_GPIO_PINS(6);
276 DECLARE_MSM_GPIO_PINS(7);
277 DECLARE_MSM_GPIO_PINS(8);
278 DECLARE_MSM_GPIO_PINS(9);
279 DECLARE_MSM_GPIO_PINS(10);
280 DECLARE_MSM_GPIO_PINS(11);
281 DECLARE_MSM_GPIO_PINS(12);
282 DECLARE_MSM_GPIO_PINS(13);
283 DECLARE_MSM_GPIO_PINS(14);
284 DECLARE_MSM_GPIO_PINS(15);
285 DECLARE_MSM_GPIO_PINS(16);
286 DECLARE_MSM_GPIO_PINS(17);
287 DECLARE_MSM_GPIO_PINS(18);
288 DECLARE_MSM_GPIO_PINS(19);
289 DECLARE_MSM_GPIO_PINS(20);
290 DECLARE_MSM_GPIO_PINS(21);
291 DECLARE_MSM_GPIO_PINS(22);
292 DECLARE_MSM_GPIO_PINS(23);
293 DECLARE_MSM_GPIO_PINS(24);
294 DECLARE_MSM_GPIO_PINS(25);
295 DECLARE_MSM_GPIO_PINS(26);
296 DECLARE_MSM_GPIO_PINS(27);
297 DECLARE_MSM_GPIO_PINS(28);
298 DECLARE_MSM_GPIO_PINS(29);
299 DECLARE_MSM_GPIO_PINS(30);
300 DECLARE_MSM_GPIO_PINS(31);
301 DECLARE_MSM_GPIO_PINS(32);
302 DECLARE_MSM_GPIO_PINS(33);
303 DECLARE_MSM_GPIO_PINS(34);
304 DECLARE_MSM_GPIO_PINS(35);
305 DECLARE_MSM_GPIO_PINS(36);
306 DECLARE_MSM_GPIO_PINS(37);
307 DECLARE_MSM_GPIO_PINS(38);
308 DECLARE_MSM_GPIO_PINS(39);
309 DECLARE_MSM_GPIO_PINS(40);
310 DECLARE_MSM_GPIO_PINS(41);
311 DECLARE_MSM_GPIO_PINS(42);
312 DECLARE_MSM_GPIO_PINS(43);
313 DECLARE_MSM_GPIO_PINS(44);
314 DECLARE_MSM_GPIO_PINS(45);
315 DECLARE_MSM_GPIO_PINS(46);
316 DECLARE_MSM_GPIO_PINS(47);
317 DECLARE_MSM_GPIO_PINS(48);
318 DECLARE_MSM_GPIO_PINS(49);
319 DECLARE_MSM_GPIO_PINS(50);
320 DECLARE_MSM_GPIO_PINS(51);
321 DECLARE_MSM_GPIO_PINS(52);
322 DECLARE_MSM_GPIO_PINS(53);
323 DECLARE_MSM_GPIO_PINS(54);
324 DECLARE_MSM_GPIO_PINS(55);
325 DECLARE_MSM_GPIO_PINS(56);
326 DECLARE_MSM_GPIO_PINS(57);
327 DECLARE_MSM_GPIO_PINS(58);
328 DECLARE_MSM_GPIO_PINS(59);
329 DECLARE_MSM_GPIO_PINS(60);
330 DECLARE_MSM_GPIO_PINS(61);
331 DECLARE_MSM_GPIO_PINS(62);
332 DECLARE_MSM_GPIO_PINS(63);
333 DECLARE_MSM_GPIO_PINS(64);
334 DECLARE_MSM_GPIO_PINS(65);
335 DECLARE_MSM_GPIO_PINS(66);
336 DECLARE_MSM_GPIO_PINS(67);
337 DECLARE_MSM_GPIO_PINS(68);
338 DECLARE_MSM_GPIO_PINS(69);
339 DECLARE_MSM_GPIO_PINS(70);
340 DECLARE_MSM_GPIO_PINS(71);
341 DECLARE_MSM_GPIO_PINS(72);
342 DECLARE_MSM_GPIO_PINS(73);
343 DECLARE_MSM_GPIO_PINS(74);
344 DECLARE_MSM_GPIO_PINS(75);
345 DECLARE_MSM_GPIO_PINS(76);
346 DECLARE_MSM_GPIO_PINS(77);
347 DECLARE_MSM_GPIO_PINS(78);
348 DECLARE_MSM_GPIO_PINS(79);
349 DECLARE_MSM_GPIO_PINS(80);
350 DECLARE_MSM_GPIO_PINS(81);
351 DECLARE_MSM_GPIO_PINS(82);
352 DECLARE_MSM_GPIO_PINS(83);
353 DECLARE_MSM_GPIO_PINS(84);
354 DECLARE_MSM_GPIO_PINS(85);
355 DECLARE_MSM_GPIO_PINS(86);
356 DECLARE_MSM_GPIO_PINS(87);
357 DECLARE_MSM_GPIO_PINS(88);
358 DECLARE_MSM_GPIO_PINS(89);
359 DECLARE_MSM_GPIO_PINS(90);
360 DECLARE_MSM_GPIO_PINS(91);
361 DECLARE_MSM_GPIO_PINS(92);
362 DECLARE_MSM_GPIO_PINS(93);
363 DECLARE_MSM_GPIO_PINS(94);
364 DECLARE_MSM_GPIO_PINS(95);
365 DECLARE_MSM_GPIO_PINS(96);
366 DECLARE_MSM_GPIO_PINS(97);
367 DECLARE_MSM_GPIO_PINS(98);
368 DECLARE_MSM_GPIO_PINS(99);
369 DECLARE_MSM_GPIO_PINS(100);
370 DECLARE_MSM_GPIO_PINS(101);
371 DECLARE_MSM_GPIO_PINS(102);
372 DECLARE_MSM_GPIO_PINS(103);
373 DECLARE_MSM_GPIO_PINS(104);
374 DECLARE_MSM_GPIO_PINS(105);
375 DECLARE_MSM_GPIO_PINS(106);
376 DECLARE_MSM_GPIO_PINS(107);
377 DECLARE_MSM_GPIO_PINS(108);
378 DECLARE_MSM_GPIO_PINS(109);
379 DECLARE_MSM_GPIO_PINS(110);
380 DECLARE_MSM_GPIO_PINS(111);
381 DECLARE_MSM_GPIO_PINS(112);
382 DECLARE_MSM_GPIO_PINS(113);
383 DECLARE_MSM_GPIO_PINS(114);
384 DECLARE_MSM_GPIO_PINS(115);
385 DECLARE_MSM_GPIO_PINS(116);
386 DECLARE_MSM_GPIO_PINS(117);
387 DECLARE_MSM_GPIO_PINS(118);
388 DECLARE_MSM_GPIO_PINS(119);
389 DECLARE_MSM_GPIO_PINS(120);
390 DECLARE_MSM_GPIO_PINS(121);
391 DECLARE_MSM_GPIO_PINS(122);
392 DECLARE_MSM_GPIO_PINS(123);
393 DECLARE_MSM_GPIO_PINS(124);
394 DECLARE_MSM_GPIO_PINS(125);
395 DECLARE_MSM_GPIO_PINS(126);
396 DECLARE_MSM_GPIO_PINS(127);
397 DECLARE_MSM_GPIO_PINS(128);
398 DECLARE_MSM_GPIO_PINS(129);
399 DECLARE_MSM_GPIO_PINS(130);
400 DECLARE_MSM_GPIO_PINS(131);
401 DECLARE_MSM_GPIO_PINS(132);
402 DECLARE_MSM_GPIO_PINS(133);
403 DECLARE_MSM_GPIO_PINS(134);
404 DECLARE_MSM_GPIO_PINS(135);
405 DECLARE_MSM_GPIO_PINS(136);
406 DECLARE_MSM_GPIO_PINS(137);
407 DECLARE_MSM_GPIO_PINS(138);
408 DECLARE_MSM_GPIO_PINS(139);
409 DECLARE_MSM_GPIO_PINS(140);
410 DECLARE_MSM_GPIO_PINS(141);
411 DECLARE_MSM_GPIO_PINS(142);
412 DECLARE_MSM_GPIO_PINS(143);
413 DECLARE_MSM_GPIO_PINS(144);
414 DECLARE_MSM_GPIO_PINS(145);
415 DECLARE_MSM_GPIO_PINS(146);
416 DECLARE_MSM_GPIO_PINS(147);
417 DECLARE_MSM_GPIO_PINS(148);
418 DECLARE_MSM_GPIO_PINS(149);
419 DECLARE_MSM_GPIO_PINS(150);
420 DECLARE_MSM_GPIO_PINS(151);
421 DECLARE_MSM_GPIO_PINS(152);
422 DECLARE_MSM_GPIO_PINS(153);
423 DECLARE_MSM_GPIO_PINS(154);
424 DECLARE_MSM_GPIO_PINS(155);
425 DECLARE_MSM_GPIO_PINS(156);
426 DECLARE_MSM_GPIO_PINS(157);
427 DECLARE_MSM_GPIO_PINS(158);
428 DECLARE_MSM_GPIO_PINS(159);
429 DECLARE_MSM_GPIO_PINS(160);
430 DECLARE_MSM_GPIO_PINS(161);
431 DECLARE_MSM_GPIO_PINS(162);
432 DECLARE_MSM_GPIO_PINS(163);
433 DECLARE_MSM_GPIO_PINS(164);
434 DECLARE_MSM_GPIO_PINS(165);
435 DECLARE_MSM_GPIO_PINS(166);
436 DECLARE_MSM_GPIO_PINS(167);
437 DECLARE_MSM_GPIO_PINS(168);
438 DECLARE_MSM_GPIO_PINS(169);
439 DECLARE_MSM_GPIO_PINS(170);
440 DECLARE_MSM_GPIO_PINS(171);
441 DECLARE_MSM_GPIO_PINS(172);
442 DECLARE_MSM_GPIO_PINS(173);
443 DECLARE_MSM_GPIO_PINS(174);
444 DECLARE_MSM_GPIO_PINS(175);
445 DECLARE_MSM_GPIO_PINS(176);
446 DECLARE_MSM_GPIO_PINS(177);
447 DECLARE_MSM_GPIO_PINS(178);
448 DECLARE_MSM_GPIO_PINS(179);
449 DECLARE_MSM_GPIO_PINS(180);
450
451 static const unsigned int ufs_reset_pins[] = { 181 };
452
453 enum nord_functions {
454 msm_mux_gpio,
455 msm_mux_aoss_cti,
456 msm_mux_atest_char,
457 msm_mux_atest_usb20,
458 msm_mux_atest_usb21,
459 msm_mux_aud_intfc0_clk,
460 msm_mux_aud_intfc0_data,
461 msm_mux_aud_intfc0_ws,
462 msm_mux_aud_intfc10_clk,
463 msm_mux_aud_intfc10_data,
464 msm_mux_aud_intfc10_ws,
465 msm_mux_aud_intfc1_clk,
466 msm_mux_aud_intfc1_data,
467 msm_mux_aud_intfc1_ws,
468 msm_mux_aud_intfc2_clk,
469 msm_mux_aud_intfc2_data,
470 msm_mux_aud_intfc2_ws,
471 msm_mux_aud_intfc3_clk,
472 msm_mux_aud_intfc3_data,
473 msm_mux_aud_intfc3_ws,
474 msm_mux_aud_intfc4_clk,
475 msm_mux_aud_intfc4_data,
476 msm_mux_aud_intfc4_ws,
477 msm_mux_aud_intfc5_clk,
478 msm_mux_aud_intfc5_data,
479 msm_mux_aud_intfc5_ws,
480 msm_mux_aud_intfc6_clk,
481 msm_mux_aud_intfc6_data,
482 msm_mux_aud_intfc6_ws,
483 msm_mux_aud_intfc7_clk,
484 msm_mux_aud_intfc7_data,
485 msm_mux_aud_intfc7_ws,
486 msm_mux_aud_intfc8_clk,
487 msm_mux_aud_intfc8_data,
488 msm_mux_aud_intfc8_ws,
489 msm_mux_aud_intfc9_clk,
490 msm_mux_aud_intfc9_data,
491 msm_mux_aud_intfc9_ws,
492 msm_mux_aud_mclk0_mira,
493 msm_mux_aud_mclk0_mirb,
494 msm_mux_aud_mclk1_mira,
495 msm_mux_aud_mclk1_mirb,
496 msm_mux_aud_mclk2_mira,
497 msm_mux_aud_mclk2_mirb,
498 msm_mux_aud_refclk0,
499 msm_mux_aud_refclk1,
500 msm_mux_bist_done,
501 msm_mux_ccu_async_in,
502 msm_mux_ccu_i2c_scl,
503 msm_mux_ccu_i2c_sda,
504 msm_mux_ccu_timer,
505 msm_mux_clink_debug,
506 msm_mux_dbg_out,
507 msm_mux_dbg_out_clk,
508 msm_mux_ddr_bist_complete,
509 msm_mux_ddr_bist_fail,
510 msm_mux_ddr_bist_start,
511 msm_mux_ddr_bist_stop,
512 msm_mux_ddr_pxi,
513 msm_mux_dp_rx0,
514 msm_mux_dp_rx00,
515 msm_mux_dp_rx01,
516 msm_mux_dp_rx0_mute,
517 msm_mux_dp_rx1,
518 msm_mux_dp_rx10,
519 msm_mux_dp_rx11,
520 msm_mux_dp_rx1_mute,
521 msm_mux_edp0_hot,
522 msm_mux_edp0_lcd,
523 msm_mux_edp1_hot,
524 msm_mux_edp1_lcd,
525 msm_mux_edp2_hot,
526 msm_mux_edp2_lcd,
527 msm_mux_edp3_hot,
528 msm_mux_edp3_lcd,
529 msm_mux_emac0_mcg,
530 msm_mux_emac0_mdc,
531 msm_mux_emac0_mdio,
532 msm_mux_emac0_ptp,
533 msm_mux_emac1_mcg,
534 msm_mux_emac1_mdc,
535 msm_mux_emac1_mdio,
536 msm_mux_emac1_ptp,
537 msm_mux_gcc_gp1_clk,
538 msm_mux_gcc_gp2_clk,
539 msm_mux_gcc_gp3_clk,
540 msm_mux_gcc_gp4_clk,
541 msm_mux_gcc_gp5_clk,
542 msm_mux_gcc_gp6_clk,
543 msm_mux_gcc_gp7_clk,
544 msm_mux_gcc_gp8_clk,
545 msm_mux_jitter_bist,
546 msm_mux_lbist_pass,
547 msm_mux_mbist_pass,
548 msm_mux_mdp0_vsync_out,
549 msm_mux_mdp1_vsync_out,
550 msm_mux_mdp_vsync_e,
551 msm_mux_mdp_vsync_p,
552 msm_mux_mdp_vsync_s,
553 msm_mux_pcie0_clk_req_n,
554 msm_mux_pcie1_clk_req_n,
555 msm_mux_pcie2_clk_req_n,
556 msm_mux_pcie3_clk_req_n,
557 msm_mux_phase_flag,
558 msm_mux_pll_bist_sync,
559 msm_mux_pll_clk_aux,
560 msm_mux_prng_rosc0,
561 msm_mux_prng_rosc1,
562 msm_mux_pwrbrk_i_n,
563 msm_mux_qdss,
564 msm_mux_qdss_cti,
565 msm_mux_qspi,
566 msm_mux_qup0_se0,
567 msm_mux_qup0_se1,
568 msm_mux_qup0_se2,
569 msm_mux_qup0_se3,
570 msm_mux_qup0_se4,
571 msm_mux_qup0_se5,
572 msm_mux_qup1_se0,
573 msm_mux_qup1_se1,
574 msm_mux_qup1_se2_01,
575 msm_mux_qup1_se2_23,
576 msm_mux_qup1_se3_01,
577 msm_mux_qup1_se3_23,
578 msm_mux_qup1_se4,
579 msm_mux_qup1_se5,
580 msm_mux_qup1_se6,
581 msm_mux_qup2_se0,
582 msm_mux_qup2_se1,
583 msm_mux_qup2_se2,
584 msm_mux_qup2_se3,
585 msm_mux_qup2_se4,
586 msm_mux_qup2_se5,
587 msm_mux_qup2_se6,
588 msm_mux_qup3_se0_mira,
589 msm_mux_qup3_se0_mirb,
590 msm_mux_sailss_ospi,
591 msm_mux_sdc4_clk,
592 msm_mux_sdc4_cmd,
593 msm_mux_sdc4_data,
594 msm_mux_smb_alert,
595 msm_mux_smb_alert_n,
596 msm_mux_smb_clk,
597 msm_mux_smb_dat,
598 msm_mux_tb_trig_sdc4,
599 msm_mux_tmess_prng0,
600 msm_mux_tmess_prng1,
601 msm_mux_tsc_timer,
602 msm_mux_tsense_pwm,
603 msm_mux_usb0_hs,
604 msm_mux_usb0_phy_ps,
605 msm_mux_usb1_hs,
606 msm_mux_usb1_phy_ps,
607 msm_mux_usb2_hs,
608 msm_mux_usxgmii0_phy,
609 msm_mux_usxgmii1_phy,
610 msm_mux_vsense_trigger_mirnat,
611 msm_mux_wcn_sw,
612 msm_mux_wcn_sw_ctrl,
613 msm_mux__,
614 };
615
616 static const char *const gpio_groups[] = {
617 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5",
618 "gpio6", "gpio7", "gpio8", "gpio9", "gpio10", "gpio11",
619 "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17",
620 "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", "gpio23",
621 "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
622 "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
623 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41",
624 "gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47",
625 "gpio48", "gpio49", "gpio50", "gpio51", "gpio52", "gpio53",
626 "gpio54", "gpio55", "gpio56", "gpio57", "gpio58", "gpio59",
627 "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65",
628 "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", "gpio71",
629 "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
630 "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83",
631 "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89",
632 "gpio90", "gpio91", "gpio92", "gpio93", "gpio94", "gpio95",
633 "gpio96", "gpio97", "gpio98", "gpio99", "gpio100", "gpio101",
634 "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", "gpio107",
635 "gpio108", "gpio109", "gpio110", "gpio111", "gpio112", "gpio113",
636 "gpio114", "gpio115", "gpio116", "gpio117", "gpio118", "gpio119",
637 "gpio120", "gpio121", "gpio122", "gpio123", "gpio124", "gpio125",
638 "gpio126", "gpio127", "gpio128", "gpio129", "gpio130", "gpio131",
639 "gpio132", "gpio133", "gpio134", "gpio135", "gpio136", "gpio137",
640 "gpio138", "gpio139", "gpio140", "gpio141", "gpio142", "gpio143",
641 "gpio144", "gpio145", "gpio146", "gpio147", "gpio148", "gpio149",
642 "gpio150", "gpio151", "gpio152", "gpio153", "gpio154", "gpio155",
643 "gpio156", "gpio157", "gpio158", "gpio159", "gpio160", "gpio161",
644 "gpio162", "gpio163", "gpio164", "gpio165", "gpio166", "gpio167",
645 "gpio168", "gpio169", "gpio170", "gpio171", "gpio172", "gpio173",
646 "gpio174", "gpio175", "gpio176", "gpio177", "gpio178", "gpio179",
647 "gpio180",
648 };
649
650 static const char *const aoss_cti_groups[] = {
651 "gpio83",
652 "gpio84",
653 "gpio85",
654 "gpio86",
655 };
656
657 static const char *const atest_char_groups[] = {
658 "gpio176", "gpio177", "gpio178", "gpio179", "gpio180",
659 };
660
661 static const char *const atest_usb20_groups[] = {
662 "gpio126",
663 "gpio128",
664 "gpio130",
665 };
666
667 static const char *const atest_usb21_groups[] = {
668 "gpio127",
669 "gpio129",
670 "gpio131",
671 };
672
673 static const char *const aud_intfc0_clk_groups[] = {
674 "gpio57",
675 };
676
677 static const char *const aud_intfc0_data_groups[] = {
678 "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65", "gpio66",
679 };
680
681 static const char *const aud_intfc0_ws_groups[] = {
682 "gpio58",
683 };
684
685 static const char *const aud_intfc10_clk_groups[] = {
686 "gpio61",
687 };
688
689 static const char *const aud_intfc10_data_groups[] = {
690 "gpio81", "gpio82",
691 };
692
693 static const char *const aud_intfc10_ws_groups[] = {
694 "gpio62",
695 };
696
697 static const char *const aud_intfc1_clk_groups[] = {
698 "gpio67",
699 };
700
701 static const char *const aud_intfc1_data_groups[] = {
702 "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76",
703 };
704
705 static const char *const aud_intfc1_ws_groups[] = {
706 "gpio68",
707 };
708
709 static const char *const aud_intfc2_clk_groups[] = {
710 "gpio77",
711 };
712
713 static const char *const aud_intfc2_data_groups[] = {
714 "gpio79", "gpio80", "gpio81", "gpio82",
715 };
716
717 static const char *const aud_intfc2_ws_groups[] = {
718 "gpio78",
719 };
720
721 static const char *const aud_intfc3_clk_groups[] = {
722 "gpio83",
723 };
724
725 static const char *const aud_intfc3_data_groups[] = {
726 "gpio85", "gpio86",
727 };
728
729 static const char *const aud_intfc3_ws_groups[] = {
730 "gpio84",
731 };
732
733 static const char *const aud_intfc4_clk_groups[] = {
734 "gpio87",
735 };
736
737 static const char *const aud_intfc4_data_groups[] = {
738 "gpio89", "gpio90",
739 };
740
741 static const char *const aud_intfc4_ws_groups[] = {
742 "gpio88",
743 };
744
745 static const char *const aud_intfc5_clk_groups[] = {
746 "gpio91",
747 };
748
749 static const char *const aud_intfc5_data_groups[] = {
750 "gpio93", "gpio94",
751 };
752
753 static const char *const aud_intfc5_ws_groups[] = {
754 "gpio92",
755 };
756
757 static const char *const aud_intfc6_clk_groups[] = {
758 "gpio95",
759 };
760
761 static const char *const aud_intfc6_data_groups[] = {
762 "gpio97", "gpio98",
763 };
764
765 static const char *const aud_intfc6_ws_groups[] = {
766 "gpio96",
767 };
768
769 static const char *const aud_intfc7_clk_groups[] = {
770 "gpio63",
771 };
772
773 static const char *const aud_intfc7_data_groups[] = {
774 "gpio65", "gpio66",
775 };
776
777 static const char *const aud_intfc7_ws_groups[] = {
778 "gpio64",
779 };
780
781 static const char *const aud_intfc8_clk_groups[] = {
782 "gpio73",
783 };
784
785 static const char *const aud_intfc8_data_groups[] = {
786 "gpio75", "gpio76",
787 };
788
789 static const char *const aud_intfc8_ws_groups[] = {
790 "gpio74",
791 };
792
793 static const char *const aud_intfc9_clk_groups[] = {
794 "gpio70",
795 };
796
797 static const char *const aud_intfc9_data_groups[] = {
798 "gpio72",
799 };
800
801 static const char *const aud_intfc9_ws_groups[] = {
802 "gpio71",
803 };
804
805 static const char *const aud_mclk0_mira_groups[] = {
806 "gpio99",
807 };
808
809 static const char *const aud_mclk0_mirb_groups[] = {
810 "gpio86",
811 };
812
813 static const char *const aud_mclk1_mira_groups[] = {
814 "gpio100",
815 };
816
817 static const char *const aud_mclk1_mirb_groups[] = {
818 "gpio90",
819 };
820
821 static const char *const aud_mclk2_mira_groups[] = {
822 "gpio101",
823 };
824
825 static const char *const aud_mclk2_mirb_groups[] = {
826 "gpio94",
827 };
828
829 static const char *const aud_refclk0_groups[] = {
830 "gpio100",
831 };
832
833 static const char *const aud_refclk1_groups[] = {
834 "gpio101",
835 };
836
837 static const char *const bist_done_groups[] = {
838 "gpio168",
839 };
840
841 static const char *const ccu_async_in_groups[] = {
842 "gpio45", "gpio176", "gpio177", "gpio178", "gpio179", "gpio180",
843 };
844
845 static const char *const ccu_i2c_scl_groups[] = {
846 "gpio16", "gpio18", "gpio20", "gpio22", "gpio24",
847 "gpio114", "gpio116", "gpio126", "gpio130", "gpio132",
848 };
849
850 static const char *const ccu_i2c_sda_groups[] = {
851 "gpio15", "gpio17", "gpio19", "gpio21", "gpio23",
852 "gpio113", "gpio115", "gpio125", "gpio129", "gpio131",
853 };
854
855 static const char *const ccu_timer_groups[] = {
856 "gpio25", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30",
857 "gpio31", "gpio32", "gpio33", "gpio34", "gpio143", "gpio144",
858 "gpio150", "gpio151", "gpio152", "gpio153",
859 };
860
861 static const char *const clink_debug_groups[] = {
862 "gpio12", "gpio13", "gpio14", "gpio51",
863 "gpio52", "gpio53", "gpio54", "gpio55",
864 };
865
866 static const char *const dbg_out_groups[] = {
867 "gpio113",
868 };
869
870 static const char *const dbg_out_clk_groups[] = {
871 "gpio165",
872 };
873
874 static const char *const ddr_bist_complete_groups[] = {
875 "gpio37",
876 };
877
878 static const char *const ddr_bist_fail_groups[] = {
879 "gpio39",
880 };
881
882 static const char *const ddr_bist_start_groups[] = {
883 "gpio36",
884 };
885
886 static const char *const ddr_bist_stop_groups[] = {
887 "gpio38",
888 };
889
890 static const char *const ddr_pxi_groups[] = {
891 "gpio99", "gpio100", "gpio109", "gpio110", "gpio113", "gpio114",
892 "gpio115", "gpio116", "gpio117", "gpio118", "gpio119", "gpio120",
893 "gpio121", "gpio122", "gpio126", "gpio127", "gpio128", "gpio129",
894 "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", "gpio135",
895 "gpio136", "gpio137", "gpio138", "gpio139", "gpio162", "gpio163",
896 "gpio164", "gpio165",
897 };
898
899 static const char *const dp_rx0_groups[] = {
900 "gpio55", "gpio83", "gpio84", "gpio85", "gpio86",
901 "gpio88", "gpio89", "gpio137", "gpio138",
902 };
903
904 static const char *const dp_rx00_groups[] = {
905 "gpio99",
906 };
907
908 static const char *const dp_rx01_groups[] = {
909 "gpio100",
910 };
911
912 static const char *const dp_rx0_mute_groups[] = {
913 "gpio35",
914 };
915
916 static const char *const dp_rx1_groups[] = {
917 "gpio56", "gpio92", "gpio93", "gpio95", "gpio96",
918 "gpio97", "gpio98", "gpio158", "gpio159",
919 };
920
921 static const char *const dp_rx10_groups[] = {
922 "gpio121",
923 };
924
925 static const char *const dp_rx11_groups[] = {
926 "gpio122",
927 };
928
929 static const char *const dp_rx1_mute_groups[] = {
930 "gpio36",
931 };
932
933 static const char *const edp0_hot_groups[] = {
934 "gpio51",
935 };
936
937 static const char *const edp0_lcd_groups[] = {
938 "gpio47",
939 };
940
941 static const char *const edp1_hot_groups[] = {
942 "gpio52",
943 };
944
945 static const char *const edp1_lcd_groups[] = {
946 "gpio48",
947 };
948
949 static const char *const edp2_hot_groups[] = {
950 "gpio53",
951 };
952
953 static const char *const edp2_lcd_groups[] = {
954 "gpio49",
955 };
956
957 static const char *const edp3_hot_groups[] = {
958 "gpio54",
959 };
960
961 static const char *const edp3_lcd_groups[] = {
962 "gpio50",
963 };
964
965 static const char *const emac0_mcg_groups[] = {
966 "gpio16", "gpio17", "gpio18", "gpio19",
967 };
968
969 static const char *const emac0_mdc_groups[] = {
970 "gpio47",
971 };
972
973 static const char *const emac0_mdio_groups[] = {
974 "gpio48",
975 };
976
977 static const char *const emac0_ptp_groups[] = {
978 "gpio133", "gpio134", "gpio135", "gpio136",
979 "gpio139", "gpio140", "gpio141", "gpio142",
980 };
981
982 static const char *const emac1_mcg_groups[] = {
983 "gpio20", "gpio21", "gpio22", "gpio23",
984 };
985
986 static const char *const emac1_mdc_groups[] = {
987 "gpio49",
988 };
989
990 static const char *const emac1_mdio_groups[] = {
991 "gpio50",
992 };
993
994 static const char *const emac1_ptp_groups[] = {
995 "gpio37", "gpio38", "gpio39", "gpio40",
996 "gpio41", "gpio42", "gpio43", "gpio44",
997 };
998
999 static const char *const gcc_gp1_clk_groups[] = {
1000 "gpio51",
1001 };
1002
1003 static const char *const gcc_gp2_clk_groups[] = {
1004 "gpio52",
1005 };
1006
1007 static const char *const gcc_gp3_clk_groups[] = {
1008 "gpio42",
1009 };
1010
1011 static const char *const gcc_gp4_clk_groups[] = {
1012 "gpio43",
1013 };
1014
1015 static const char *const gcc_gp5_clk_groups[] = {
1016 "gpio105",
1017 };
1018
1019 static const char *const gcc_gp6_clk_groups[] = {
1020 "gpio106",
1021 };
1022
1023 static const char *const gcc_gp7_clk_groups[] = {
1024 "gpio13",
1025 };
1026
1027 static const char *const gcc_gp8_clk_groups[] = {
1028 "gpio14",
1029 };
1030
1031 static const char *const jitter_bist_groups[] = {
1032 "gpio123",
1033 "gpio138",
1034 };
1035
1036 static const char *const lbist_pass_groups[] = {
1037 "gpio121",
1038 };
1039
1040 static const char *const mbist_pass_groups[] = {
1041 "gpio122",
1042 };
1043
1044 static const char *const mdp0_vsync_out_groups[] = {
1045 "gpio113", "gpio114", "gpio115", "gpio116", "gpio121", "gpio122",
1046 "gpio139", "gpio140", "gpio141", "gpio142", "gpio143",
1047 };
1048
1049 static const char *const mdp1_vsync_out_groups[] = {
1050 "gpio123", "gpio124", "gpio125", "gpio126", "gpio129", "gpio130",
1051 "gpio131", "gpio132", "gpio133", "gpio134", "gpio135",
1052 };
1053
1054 static const char *const mdp_vsync_e_groups[] = {
1055 "gpio109",
1056 };
1057
1058 static const char *const mdp_vsync_p_groups[] = {
1059 "gpio110",
1060 };
1061
1062 static const char *const mdp_vsync_s_groups[] = {
1063 "gpio144",
1064 };
1065
1066 static const char *const pcie0_clk_req_n_groups[] = {
1067 "gpio1",
1068 };
1069
1070 static const char *const pcie1_clk_req_n_groups[] = {
1071 "gpio4",
1072 };
1073
1074 static const char *const pcie2_clk_req_n_groups[] = {
1075 "gpio7",
1076 };
1077
1078 static const char *const pcie3_clk_req_n_groups[] = {
1079 "gpio10",
1080 };
1081
1082 static const char *const phase_flag_groups[] = {
1083 "gpio67", "gpio68", "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74",
1084 "gpio75", "gpio76", "gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82",
1085 "gpio83", "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
1086 "gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio98", "gpio101",
1087 };
1088
1089 static const char *const pll_bist_sync_groups[] = {
1090 "gpio176",
1091 };
1092
1093 static const char *const pll_clk_aux_groups[] = {
1094 "gpio100",
1095 };
1096
1097 static const char *const prng_rosc0_groups[] = {
1098 "gpio117",
1099 };
1100
1101 static const char *const prng_rosc1_groups[] = {
1102 "gpio118",
1103 };
1104
1105 static const char *const pwrbrk_i_n_groups[] = {
1106 "gpio167",
1107 };
1108
1109 static const char *const qdss_cti_groups[] = {
1110 "gpio41", "gpio42", "gpio110", "gpio138",
1111 "gpio142", "gpio144", "gpio162", "gpio163",
1112 };
1113
1114 static const char *const qdss_groups[] = {
1115 "gpio67", "gpio68", "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74",
1116 "gpio75", "gpio76", "gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82",
1117 "gpio83", "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
1118 "gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
1119 "gpio99", "gpio100", "gpio101", "gpio108",
1120 };
1121
1122 static const char *const qspi_groups[] = {
1123 "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", "gpio107", "gpio108",
1124 };
1125
1126 static const char *const qup0_se0_groups[] = {
1127 "gpio109", "gpio110", "gpio111", "gpio112",
1128 };
1129
1130 static const char *const qup0_se1_groups[] = {
1131 "gpio109", "gpio110", "gpio111", "gpio112",
1132 };
1133
1134 static const char *const qup0_se2_groups[] = {
1135 "gpio113", "gpio114", "gpio115", "gpio116",
1136 };
1137
1138 static const char *const qup0_se3_groups[] = {
1139 "gpio113", "gpio114", "gpio115", "gpio116",
1140 };
1141
1142 static const char *const qup0_se4_groups[] = {
1143 "gpio117", "gpio118", "gpio119", "gpio120",
1144 };
1145
1146 static const char *const qup0_se5_groups[] = {
1147 "gpio109", "gpio110", "gpio121", "gpio122",
1148 };
1149
1150 static const char *const qup1_se0_groups[] = {
1151 "gpio123", "gpio124", "gpio125", "gpio126",
1152 };
1153
1154 static const char *const qup1_se1_groups[] = {
1155 "gpio123", "gpio124", "gpio125", "gpio126",
1156 };
1157
1158 static const char *const qup1_se2_01_groups[] = {
1159 "gpio127", "gpio128",
1160 };
1161
1162 static const char *const qup1_se2_23_groups[] = {
1163 "gpio127", "gpio128",
1164 };
1165
1166 static const char *const qup1_se3_01_groups[] = {
1167 "gpio129", "gpio130",
1168 };
1169
1170 static const char *const qup1_se3_23_groups[] = {
1171 "gpio129", "gpio130",
1172 };
1173
1174 static const char *const qup1_se4_groups[] = {
1175 "gpio131", "gpio132", "gpio137", "gpio138",
1176 };
1177
1178 static const char *const qup1_se5_groups[] = {
1179 "gpio133", "gpio134", "gpio135", "gpio136",
1180 };
1181
1182 static const char *const qup1_se6_groups[] = {
1183 "gpio131", "gpio132", "gpio137", "gpio138",
1184 };
1185
1186 static const char *const qup2_se0_groups[] = {
1187 "gpio139", "gpio140", "gpio141", "gpio142",
1188 };
1189
1190 static const char *const qup2_se1_groups[] = {
1191 "gpio143", "gpio144", "gpio154", "gpio155",
1192 };
1193
1194 static const char *const qup2_se2_groups[] = {
1195 "gpio145", "gpio146", "gpio147", "gpio148", "gpio149",
1196 };
1197
1198 static const char *const qup2_se3_groups[] = {
1199 "gpio150", "gpio151", "gpio152", "gpio153",
1200 };
1201
1202 static const char *const qup2_se4_groups[] = {
1203 "gpio143", "gpio144", "gpio150", "gpio151",
1204 "gpio152", "gpio154", "gpio155",
1205 };
1206
1207 static const char *const qup2_se5_groups[] = {
1208 "gpio156", "gpio157", "gpio158", "gpio159",
1209 };
1210
1211 static const char *const qup2_se6_groups[] = {
1212 "gpio156", "gpio157", "gpio158", "gpio159",
1213 };
1214
1215 static const char *const qup3_se0_mira_groups[] = {
1216 "gpio102", "gpio103", "gpio104", "gpio105",
1217 "gpio106", "gpio107", "gpio108",
1218 };
1219
1220 static const char *const qup3_se0_mirb_groups[] = {
1221 "gpio102", "gpio103",
1222 };
1223
1224 static const char *const sailss_ospi_groups[] = {
1225 "gpio164",
1226 "gpio165",
1227 };
1228
1229 static const char *const sdc4_clk_groups[] = {
1230 "gpio175",
1231 };
1232
1233 static const char *const sdc4_cmd_groups[] = {
1234 "gpio174",
1235 };
1236
1237 static const char *const sdc4_data_groups[] = {
1238 "gpio170",
1239 "gpio171",
1240 "gpio172",
1241 "gpio173",
1242 };
1243
1244 static const char *const smb_alert_groups[] = {
1245 "gpio110",
1246 };
1247
1248 static const char *const smb_alert_n_groups[] = {
1249 "gpio109",
1250 };
1251
1252 static const char *const smb_clk_groups[] = {
1253 "gpio112",
1254 };
1255
1256 static const char *const smb_dat_groups[] = {
1257 "gpio111",
1258 };
1259
1260 static const char *const tb_trig_sdc4_groups[] = {
1261 "gpio169",
1262 };
1263
1264 static const char *const tmess_prng0_groups[] = {
1265 "gpio94",
1266 };
1267
1268 static const char *const tmess_prng1_groups[] = {
1269 "gpio95",
1270 };
1271
1272 static const char *const tsc_timer_groups[] = {
1273 "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
1274 "gpio30", "gpio31", "gpio32", "gpio33", "gpio34",
1275 };
1276
1277 static const char *const tsense_pwm_groups[] = {
1278 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", "gpio50",
1279 };
1280
1281 static const char *const usb0_hs_groups[] = {
1282 "gpio12",
1283 };
1284
1285 static const char *const usb0_phy_ps_groups[] = {
1286 "gpio164",
1287 };
1288
1289 static const char *const usb1_hs_groups[] = {
1290 "gpio13",
1291 };
1292
1293 static const char *const usb1_phy_ps_groups[] = {
1294 "gpio165",
1295 };
1296
1297 static const char *const usb2_hs_groups[] = {
1298 "gpio14",
1299 };
1300
1301 static const char *const usxgmii0_phy_groups[] = {
1302 "gpio45",
1303 };
1304
1305 static const char *const usxgmii1_phy_groups[] = {
1306 "gpio46",
1307 };
1308
1309 static const char *const vsense_trigger_mirnat_groups[] = {
1310 "gpio132",
1311 };
1312
1313 static const char *const wcn_sw_groups[] = {
1314 "gpio161",
1315 };
1316
1317 static const char *const wcn_sw_ctrl_groups[] = {
1318 "gpio160",
1319 };
1320
1321 static const struct pinfunction nord_functions[] = {
1322 MSM_GPIO_PIN_FUNCTION(gpio),
1323 MSM_PIN_FUNCTION(aoss_cti),
1324 MSM_PIN_FUNCTION(atest_char),
1325 MSM_PIN_FUNCTION(atest_usb20),
1326 MSM_PIN_FUNCTION(atest_usb21),
1327 MSM_PIN_FUNCTION(aud_intfc0_clk),
1328 MSM_PIN_FUNCTION(aud_intfc0_data),
1329 MSM_PIN_FUNCTION(aud_intfc0_ws),
1330 MSM_PIN_FUNCTION(aud_intfc10_clk),
1331 MSM_PIN_FUNCTION(aud_intfc10_data),
1332 MSM_PIN_FUNCTION(aud_intfc10_ws),
1333 MSM_PIN_FUNCTION(aud_intfc1_clk),
1334 MSM_PIN_FUNCTION(aud_intfc1_data),
1335 MSM_PIN_FUNCTION(aud_intfc1_ws),
1336 MSM_PIN_FUNCTION(aud_intfc2_clk),
1337 MSM_PIN_FUNCTION(aud_intfc2_data),
1338 MSM_PIN_FUNCTION(aud_intfc2_ws),
1339 MSM_PIN_FUNCTION(aud_intfc3_clk),
1340 MSM_PIN_FUNCTION(aud_intfc3_data),
1341 MSM_PIN_FUNCTION(aud_intfc3_ws),
1342 MSM_PIN_FUNCTION(aud_intfc4_clk),
1343 MSM_PIN_FUNCTION(aud_intfc4_data),
1344 MSM_PIN_FUNCTION(aud_intfc4_ws),
1345 MSM_PIN_FUNCTION(aud_intfc5_clk),
1346 MSM_PIN_FUNCTION(aud_intfc5_data),
1347 MSM_PIN_FUNCTION(aud_intfc5_ws),
1348 MSM_PIN_FUNCTION(aud_intfc6_clk),
1349 MSM_PIN_FUNCTION(aud_intfc6_data),
1350 MSM_PIN_FUNCTION(aud_intfc6_ws),
1351 MSM_PIN_FUNCTION(aud_intfc7_clk),
1352 MSM_PIN_FUNCTION(aud_intfc7_data),
1353 MSM_PIN_FUNCTION(aud_intfc7_ws),
1354 MSM_PIN_FUNCTION(aud_intfc8_clk),
1355 MSM_PIN_FUNCTION(aud_intfc8_data),
1356 MSM_PIN_FUNCTION(aud_intfc8_ws),
1357 MSM_PIN_FUNCTION(aud_intfc9_clk),
1358 MSM_PIN_FUNCTION(aud_intfc9_data),
1359 MSM_PIN_FUNCTION(aud_intfc9_ws),
1360 MSM_PIN_FUNCTION(aud_mclk0_mira),
1361 MSM_PIN_FUNCTION(aud_mclk0_mirb),
1362 MSM_PIN_FUNCTION(aud_mclk1_mira),
1363 MSM_PIN_FUNCTION(aud_mclk1_mirb),
1364 MSM_PIN_FUNCTION(aud_mclk2_mira),
1365 MSM_PIN_FUNCTION(aud_mclk2_mirb),
1366 MSM_PIN_FUNCTION(aud_refclk0),
1367 MSM_PIN_FUNCTION(aud_refclk1),
1368 MSM_PIN_FUNCTION(bist_done),
1369 MSM_PIN_FUNCTION(ccu_async_in),
1370 MSM_PIN_FUNCTION(ccu_i2c_scl),
1371 MSM_PIN_FUNCTION(ccu_i2c_sda),
1372 MSM_PIN_FUNCTION(ccu_timer),
1373 MSM_PIN_FUNCTION(clink_debug),
1374 MSM_PIN_FUNCTION(dbg_out),
1375 MSM_PIN_FUNCTION(dbg_out_clk),
1376 MSM_PIN_FUNCTION(ddr_bist_complete),
1377 MSM_PIN_FUNCTION(ddr_bist_fail),
1378 MSM_PIN_FUNCTION(ddr_bist_start),
1379 MSM_PIN_FUNCTION(ddr_bist_stop),
1380 MSM_PIN_FUNCTION(ddr_pxi),
1381 MSM_PIN_FUNCTION(dp_rx0),
1382 MSM_PIN_FUNCTION(dp_rx00),
1383 MSM_PIN_FUNCTION(dp_rx01),
1384 MSM_PIN_FUNCTION(dp_rx0_mute),
1385 MSM_PIN_FUNCTION(dp_rx1),
1386 MSM_PIN_FUNCTION(dp_rx10),
1387 MSM_PIN_FUNCTION(dp_rx11),
1388 MSM_PIN_FUNCTION(dp_rx1_mute),
1389 MSM_PIN_FUNCTION(edp0_hot),
1390 MSM_PIN_FUNCTION(edp0_lcd),
1391 MSM_PIN_FUNCTION(edp1_hot),
1392 MSM_PIN_FUNCTION(edp1_lcd),
1393 MSM_PIN_FUNCTION(edp2_hot),
1394 MSM_PIN_FUNCTION(edp2_lcd),
1395 MSM_PIN_FUNCTION(edp3_hot),
1396 MSM_PIN_FUNCTION(edp3_lcd),
1397 MSM_PIN_FUNCTION(emac0_mcg),
1398 MSM_PIN_FUNCTION(emac0_mdc),
1399 MSM_PIN_FUNCTION(emac0_mdio),
1400 MSM_PIN_FUNCTION(emac0_ptp),
1401 MSM_PIN_FUNCTION(emac1_mcg),
1402 MSM_PIN_FUNCTION(emac1_mdc),
1403 MSM_PIN_FUNCTION(emac1_mdio),
1404 MSM_PIN_FUNCTION(emac1_ptp),
1405 MSM_PIN_FUNCTION(gcc_gp1_clk),
1406 MSM_PIN_FUNCTION(gcc_gp2_clk),
1407 MSM_PIN_FUNCTION(gcc_gp3_clk),
1408 MSM_PIN_FUNCTION(gcc_gp4_clk),
1409 MSM_PIN_FUNCTION(gcc_gp5_clk),
1410 MSM_PIN_FUNCTION(gcc_gp6_clk),
1411 MSM_PIN_FUNCTION(gcc_gp7_clk),
1412 MSM_PIN_FUNCTION(gcc_gp8_clk),
1413 MSM_PIN_FUNCTION(jitter_bist),
1414 MSM_PIN_FUNCTION(lbist_pass),
1415 MSM_PIN_FUNCTION(mbist_pass),
1416 MSM_PIN_FUNCTION(mdp0_vsync_out),
1417 MSM_PIN_FUNCTION(mdp1_vsync_out),
1418 MSM_PIN_FUNCTION(mdp_vsync_e),
1419 MSM_PIN_FUNCTION(mdp_vsync_p),
1420 MSM_PIN_FUNCTION(mdp_vsync_s),
1421 MSM_PIN_FUNCTION(pcie0_clk_req_n),
1422 MSM_PIN_FUNCTION(pcie1_clk_req_n),
1423 MSM_PIN_FUNCTION(pcie2_clk_req_n),
1424 MSM_PIN_FUNCTION(pcie3_clk_req_n),
1425 MSM_PIN_FUNCTION(phase_flag),
1426 MSM_PIN_FUNCTION(pll_bist_sync),
1427 MSM_PIN_FUNCTION(pll_clk_aux),
1428 MSM_PIN_FUNCTION(prng_rosc0),
1429 MSM_PIN_FUNCTION(prng_rosc1),
1430 MSM_PIN_FUNCTION(pwrbrk_i_n),
1431 MSM_PIN_FUNCTION(qdss),
1432 MSM_PIN_FUNCTION(qdss_cti),
1433 MSM_PIN_FUNCTION(qspi),
1434 MSM_PIN_FUNCTION(qup0_se0),
1435 MSM_PIN_FUNCTION(qup0_se1),
1436 MSM_PIN_FUNCTION(qup0_se2),
1437 MSM_PIN_FUNCTION(qup0_se3),
1438 MSM_PIN_FUNCTION(qup0_se4),
1439 MSM_PIN_FUNCTION(qup0_se5),
1440 MSM_PIN_FUNCTION(qup1_se0),
1441 MSM_PIN_FUNCTION(qup1_se1),
1442 MSM_PIN_FUNCTION(qup1_se2_01),
1443 MSM_PIN_FUNCTION(qup1_se2_23),
1444 MSM_PIN_FUNCTION(qup1_se3_01),
1445 MSM_PIN_FUNCTION(qup1_se3_23),
1446 MSM_PIN_FUNCTION(qup1_se4),
1447 MSM_PIN_FUNCTION(qup1_se5),
1448 MSM_PIN_FUNCTION(qup1_se6),
1449 MSM_PIN_FUNCTION(qup2_se0),
1450 MSM_PIN_FUNCTION(qup2_se1),
1451 MSM_PIN_FUNCTION(qup2_se2),
1452 MSM_PIN_FUNCTION(qup2_se3),
1453 MSM_PIN_FUNCTION(qup2_se4),
1454 MSM_PIN_FUNCTION(qup2_se5),
1455 MSM_PIN_FUNCTION(qup2_se6),
1456 MSM_PIN_FUNCTION(qup3_se0_mira),
1457 MSM_PIN_FUNCTION(qup3_se0_mirb),
1458 MSM_PIN_FUNCTION(sailss_ospi),
1459 MSM_PIN_FUNCTION(sdc4_clk),
1460 MSM_PIN_FUNCTION(sdc4_cmd),
1461 MSM_PIN_FUNCTION(sdc4_data),
1462 MSM_PIN_FUNCTION(smb_alert),
1463 MSM_PIN_FUNCTION(smb_alert_n),
1464 MSM_PIN_FUNCTION(smb_clk),
1465 MSM_PIN_FUNCTION(smb_dat),
1466 MSM_PIN_FUNCTION(tb_trig_sdc4),
1467 MSM_PIN_FUNCTION(tmess_prng0),
1468 MSM_PIN_FUNCTION(tmess_prng1),
1469 MSM_PIN_FUNCTION(tsc_timer),
1470 MSM_PIN_FUNCTION(tsense_pwm),
1471 MSM_PIN_FUNCTION(usb0_hs),
1472 MSM_PIN_FUNCTION(usb0_phy_ps),
1473 MSM_PIN_FUNCTION(usb1_hs),
1474 MSM_PIN_FUNCTION(usb1_phy_ps),
1475 MSM_PIN_FUNCTION(usb2_hs),
1476 MSM_PIN_FUNCTION(usxgmii0_phy),
1477 MSM_PIN_FUNCTION(usxgmii1_phy),
1478 MSM_PIN_FUNCTION(vsense_trigger_mirnat),
1479 MSM_PIN_FUNCTION(wcn_sw),
1480 MSM_PIN_FUNCTION(wcn_sw_ctrl),
1481 };
1482
1483 /* Every pin is maintained as a single group, and missing or non-existing pin
1484 * would be maintained as dummy group to synchronize pin group index with
1485 * pin descriptor registered with pinctrl core.
1486 * Clients would not be able to request these dummy pin groups.
1487 */
1488 static const struct msm_pingroup nord_groups[] = {
1489 [0] = PINGROUP(0, _, _, _, _, _, _, _, _, _, _, _),
1490 [1] = PINGROUP(1, pcie0_clk_req_n, _, _, _, _, _, _, _, _, _, _),
1491 [2] = PINGROUP(2, _, _, _, _, _, _, _, _, _, _, _),
1492 [3] = PINGROUP(3, _, _, _, _, _, _, _, _, _, _, _),
1493 [4] = PINGROUP(4, pcie1_clk_req_n, _, _, _, _, _, _, _, _, _, _),
1494 [5] = PINGROUP(5, _, _, _, _, _, _, _, _, _, _, _),
1495 [6] = PINGROUP(6, _, _, _, _, _, _, _, _, _, _, _),
1496 [7] = PINGROUP(7, pcie2_clk_req_n, _, _, _, _, _, _, _, _, _, _),
1497 [8] = PINGROUP(8, _, _, _, _, _, _, _, _, _, _, _),
1498 [9] = PINGROUP(9, _, _, _, _, _, _, _, _, _, _, _),
1499 [10] = PINGROUP(10, pcie3_clk_req_n, _, _, _, _, _, _, _, _, _, _),
1500 [11] = PINGROUP(11, _, _, _, _, _, _, _, _, _, _, _),
1501 [12] = PINGROUP(12, usb0_hs, clink_debug, _, _, _, _, _, _, _, _, _),
1502 [13] = PINGROUP(13, usb1_hs, clink_debug, gcc_gp7_clk, _, _, _, _, _, _, _, _),
1503 [14] = PINGROUP(14, usb2_hs, clink_debug, gcc_gp8_clk, _, _, _, _, _, _, _, _),
1504 [15] = PINGROUP(15, ccu_i2c_sda, _, _, _, _, _, _, _, _, _, _),
1505 [16] = PINGROUP(16, ccu_i2c_scl, emac0_mcg, _, _, _, _, _, _, _, _, _),
1506 [17] = PINGROUP(17, ccu_i2c_sda, emac0_mcg, _, _, _, _, _, _, _, _, _),
1507 [18] = PINGROUP(18, ccu_i2c_scl, emac0_mcg, _, _, _, _, _, _, _, _, _),
1508 [19] = PINGROUP(19, ccu_i2c_sda, emac0_mcg, _, _, _, _, _, _, _, _, _),
1509 [20] = PINGROUP(20, ccu_i2c_scl, emac1_mcg, _, _, _, _, _, _, _, _, _),
1510 [21] = PINGROUP(21, ccu_i2c_sda, emac1_mcg, _, _, _, _, _, _, _, _, _),
1511 [22] = PINGROUP(22, ccu_i2c_scl, emac1_mcg, _, _, _, _, _, _, _, _, _),
1512 [23] = PINGROUP(23, ccu_i2c_sda, emac1_mcg, _, _, _, _, _, _, _, _, _),
1513 [24] = PINGROUP(24, ccu_i2c_scl, _, _, _, _, _, _, _, _, _, _),
1514 [25] = PINGROUP(25, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1515 [26] = PINGROUP(26, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1516 [27] = PINGROUP(27, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1517 [28] = PINGROUP(28, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1518 [29] = PINGROUP(29, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1519 [30] = PINGROUP(30, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1520 [31] = PINGROUP(31, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1521 [32] = PINGROUP(32, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1522 [33] = PINGROUP(33, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1523 [34] = PINGROUP(34, ccu_timer, tsc_timer, _, _, _, _, _, _, _, _, _),
1524 [35] = PINGROUP(35, dp_rx0_mute, _, _, _, _, _, _, _, _, _, _),
1525 [36] = PINGROUP(36, dp_rx1_mute, ddr_bist_start, _, _, _, _, _, _, _, _, _),
1526 [37] = PINGROUP(37, emac1_ptp, ddr_bist_complete, _, _, _, _, _, _, _, _, _),
1527 [38] = PINGROUP(38, emac1_ptp, ddr_bist_stop, _, _, _, _, _, _, _, _, _),
1528 [39] = PINGROUP(39, emac1_ptp, ddr_bist_fail, _, _, _, _, _, _, _, _, _),
1529 [40] = PINGROUP(40, emac1_ptp, _, _, _, _, _, _, _, _, _, _),
1530 [41] = PINGROUP(41, emac1_ptp, qdss_cti, _, _, _, _, _, _, _, _, _),
1531 [42] = PINGROUP(42, emac1_ptp, qdss_cti, gcc_gp3_clk, _, _, _, _, _, _, _, _),
1532 [43] = PINGROUP(43, emac1_ptp, gcc_gp4_clk, tsense_pwm, _, _, _, _, _, _, _, _),
1533 [44] = PINGROUP(44, emac1_ptp, tsense_pwm, _, _, _, _, _, _, _, _, _),
1534 [45] = PINGROUP(45, usxgmii0_phy, ccu_async_in, tsense_pwm, _, _, _, _, _, _, _, _),
1535 [46] = PINGROUP(46, usxgmii1_phy, tsense_pwm, _, _, _, _, _, _, _, _, _),
1536 [47] = PINGROUP(47, emac0_mdc, edp0_lcd, tsense_pwm, _, _, _, _, _, _, _, _),
1537 [48] = PINGROUP(48, emac0_mdio, edp1_lcd, tsense_pwm, _, _, _, _, _, _, _, _),
1538 [49] = PINGROUP(49, emac1_mdc, edp2_lcd, tsense_pwm, _, _, _, _, _, _, _, _),
1539 [50] = PINGROUP(50, emac1_mdio, edp3_lcd, tsense_pwm, _, _, _, _, _, _, _, _),
1540 [51] = PINGROUP(51, edp0_hot, clink_debug, gcc_gp1_clk, _, _, _, _, _, _, _, _),
1541 [52] = PINGROUP(52, edp1_hot, clink_debug, gcc_gp2_clk, _, _, _, _, _, _, _, _),
1542 [53] = PINGROUP(53, edp2_hot, clink_debug, _, _, _, _, _, _, _, _, _),
1543 [54] = PINGROUP(54, edp3_hot, clink_debug, _, _, _, _, _, _, _, _, _),
1544 [55] = PINGROUP(55, dp_rx0, clink_debug, _, _, _, _, _, _, _, _, _),
1545 [56] = PINGROUP(56, dp_rx1, _, _, _, _, _, _, _, _, _, _),
1546 [57] = PINGROUP(57, aud_intfc0_clk, _, _, _, _, _, _, _, _, _, _),
1547 [58] = PINGROUP(58, aud_intfc0_ws, _, _, _, _, _, _, _, _, _, _),
1548 [59] = PINGROUP(59, aud_intfc0_data, _, _, _, _, _, _, _, _, _, _),
1549 [60] = PINGROUP(60, aud_intfc0_data, _, _, _, _, _, _, _, _, _, _),
1550 [61] = PINGROUP(61, aud_intfc0_data, aud_intfc10_clk, _, _, _, _, _, _, _, _, _),
1551 [62] = PINGROUP(62, aud_intfc0_data, aud_intfc10_ws, _, _, _, _, _, _, _, _, _),
1552 [63] = PINGROUP(63, aud_intfc0_data, aud_intfc7_clk, _, _, _, _, _, _, _, _, _),
1553 [64] = PINGROUP(64, aud_intfc0_data, aud_intfc7_ws, _, _, _, _, _, _, _, _, _),
1554 [65] = PINGROUP(65, aud_intfc0_data, aud_intfc7_data, _, _, _, _, _, _, _, _, _),
1555 [66] = PINGROUP(66, aud_intfc0_data, aud_intfc7_data, _, _, _, _, _, _, _, _, _),
1556 [67] = PINGROUP(67, aud_intfc1_clk, phase_flag, _, qdss, _, _, _, _, _, _, _),
1557 [68] = PINGROUP(68, aud_intfc1_ws, phase_flag, _, qdss, _, _, _, _, _, _, _),
1558 [69] = PINGROUP(69, aud_intfc1_data, phase_flag, _, qdss, _, _, _, _, _, _, _),
1559 [70] = PINGROUP(70, aud_intfc1_data, aud_intfc9_clk, phase_flag,
1560 _, qdss, _, _, _, _, _, _),
1561 [71] = PINGROUP(71, aud_intfc1_data, aud_intfc9_ws, phase_flag,
1562 _, qdss, _, _, _, _, _, _),
1563 [72] = PINGROUP(72, aud_intfc1_data, aud_intfc9_data, phase_flag,
1564 _, qdss, _, _, _, _, _, _),
1565 [73] = PINGROUP(73, aud_intfc1_data, aud_intfc8_clk, phase_flag,
1566 _, qdss, _, _, _, _, _, _),
1567 [74] = PINGROUP(74, aud_intfc1_data, aud_intfc8_ws, phase_flag,
1568 _, qdss, _, _, _, _, _, _),
1569 [75] = PINGROUP(75, aud_intfc1_data, aud_intfc8_data, phase_flag,
1570 _, qdss, _, _, _, _, _, _),
1571 [76] = PINGROUP(76, aud_intfc1_data, aud_intfc8_data, phase_flag,
1572 _, qdss, _, _, _, _, _, _),
1573 [77] = PINGROUP(77, aud_intfc2_clk, phase_flag, _, qdss, _, _, _, _, _, _, _),
1574 [78] = PINGROUP(78, aud_intfc2_ws, phase_flag, _, qdss, _, _, _, _, _, _, _),
1575 [79] = PINGROUP(79, aud_intfc2_data, phase_flag, _, qdss, _, _, _, _, _, _, _),
1576 [80] = PINGROUP(80, aud_intfc2_data, phase_flag, _, _, qdss, _, _, _, _, _, _),
1577 [81] = PINGROUP(81, aud_intfc2_data, aud_intfc10_data, phase_flag,
1578 _, _, qdss, _, _, _, _, _),
1579 [82] = PINGROUP(82, aud_intfc2_data, aud_intfc10_data, phase_flag,
1580 _, qdss, _, _, _, _, _, _),
1581 [83] = PINGROUP(83, aud_intfc3_clk, dp_rx0, aoss_cti, phase_flag, _, qdss,
1582 _, _, _, _, _),
1583 [84] = PINGROUP(84, aud_intfc3_ws, dp_rx0, aoss_cti, phase_flag, _, qdss,
1584 _, _, _, _, _),
1585 [85] = PINGROUP(85, aud_intfc3_data, dp_rx0, aoss_cti, phase_flag,
1586 _, qdss, _, _, _, _, _),
1587 [86] = PINGROUP(86, aud_intfc3_data, aud_mclk0_mirb, dp_rx0, aoss_cti, phase_flag,
1588 _, qdss, _, _, _, _),
1589 [87] = PINGROUP(87, aud_intfc4_clk, phase_flag, _, qdss, _, _, _, _, _, _, _),
1590 [88] = PINGROUP(88, aud_intfc4_ws, dp_rx0, phase_flag, _, qdss, _, _, _, _, _, _),
1591 [89] = PINGROUP(89, aud_intfc4_data, dp_rx0, phase_flag, _, qdss,
1592 _, _, _, _, _, _),
1593 [90] = PINGROUP(90, aud_intfc4_data, aud_mclk1_mirb, phase_flag,
1594 _, qdss, _, _, _, _, _, _),
1595 [91] = PINGROUP(91, aud_intfc5_clk, phase_flag, _, qdss, _, _, _, _, _, _, _),
1596 [92] = PINGROUP(92, aud_intfc5_ws, dp_rx1, phase_flag, _, qdss, _, _, _, _, _, _),
1597 [93] = PINGROUP(93, aud_intfc5_data, dp_rx1, phase_flag, _, qdss,
1598 _, _, _, _, _, _),
1599 [94] = PINGROUP(94, aud_intfc5_data, aud_mclk2_mirb, phase_flag, tmess_prng0,
1600 _, qdss, _, _, _, _, _),
1601 [95] = PINGROUP(95, aud_intfc6_clk, dp_rx1, phase_flag, tmess_prng1,
1602 _, qdss, _, _, _, _, _),
1603 [96] = PINGROUP(96, aud_intfc6_ws, dp_rx1, phase_flag, _, qdss,
1604 _, _, _, _, _, _),
1605 [97] = PINGROUP(97, aud_intfc6_data, dp_rx1, qdss, _, _, _, _, _, _, _, _),
1606 [98] = PINGROUP(98, aud_intfc6_data, dp_rx1, phase_flag, _, qdss,
1607 _, _, _, _, _, _),
1608 [99] = PINGROUP(99, aud_mclk0_mira, qdss, dp_rx00, ddr_pxi, _, _, _, _, _, _, _),
1609 [100] = PINGROUP(100, aud_mclk1_mira, aud_refclk0, pll_clk_aux,
1610 qdss, dp_rx01, ddr_pxi, _, _, _, _, _),
1611 [101] = PINGROUP(101, aud_mclk2_mira, aud_refclk1, phase_flag, _, qdss,
1612 _, _, _, _, _, _),
1613 [102] = PINGROUP(102, qspi, qup3_se0_mira, qup3_se0_mirb, _, _, _, _, _, _, _, _),
1614 [103] = PINGROUP(103, qspi, qup3_se0_mira, qup3_se0_mirb, _, _, _, _, _, _, _, _),
1615 [104] = PINGROUP(104, qspi, qup3_se0_mira, _, _, _, _, _, _, _, _, _),
1616 [105] = PINGROUP(105, qspi, qup3_se0_mira, gcc_gp5_clk, _, _, _, _, _, _, _, _),
1617 [106] = PINGROUP(106, qspi, qup3_se0_mira, gcc_gp6_clk, _, _, _, _, _, _, _, _),
1618 [107] = PINGROUP(107, qspi, qup3_se0_mira, _, _, _, _, _, _, _, _, _),
1619 [108] = PINGROUP(108, qspi, qup3_se0_mira, qdss, _, _, _, _, _, _, _, _),
1620 [109] = PINGROUP(109, qup0_se0, qup0_se1, qup0_se5, mdp_vsync_e,
1621 smb_alert_n, _, ddr_pxi, _, _, _, _),
1622 [110] = PINGROUP(110, qup0_se0, qup0_se1, qup0_se5, qdss_cti,
1623 mdp_vsync_p, smb_alert, _, ddr_pxi, _, _, _),
1624 [111] = PINGROUP(111, qup0_se1, qup0_se0, smb_dat, _, _, _, _, _, _, _, _),
1625 [112] = PINGROUP(112, qup0_se1, qup0_se0, smb_clk, _, _, _, _, _, _, _, _),
1626 [113] = PINGROUP(113, qup0_se2, qup0_se3, ccu_i2c_sda, mdp0_vsync_out,
1627 dbg_out, ddr_pxi, _, _, _, _, _),
1628 [114] = PINGROUP(114, qup0_se2, qup0_se3, ccu_i2c_scl, mdp0_vsync_out,
1629 _, ddr_pxi, _, _, _, _, _),
1630 [115] = PINGROUP(115, qup0_se3, qup0_se2, ccu_i2c_sda, mdp0_vsync_out,
1631 _, ddr_pxi, _, _, _, _, _),
1632 [116] = PINGROUP(116, qup0_se3, qup0_se2, ccu_i2c_scl, mdp0_vsync_out,
1633 _, ddr_pxi, _, _, _, _, _),
1634 [117] = PINGROUP(117, qup0_se4, prng_rosc0, _, ddr_pxi, _, _, _, _, _, _, _),
1635 [118] = PINGROUP(118, qup0_se4, prng_rosc1, _, ddr_pxi, _, _, _, _, _, _, _),
1636 [119] = PINGROUP(119, qup0_se4, _, ddr_pxi, _, _, _, _, _, _, _, _),
1637 [120] = PINGROUP(120, qup0_se4, _, ddr_pxi, _, _, _, _, _, _, _, _),
1638 [121] = PINGROUP(121, qup0_se5, lbist_pass, mdp0_vsync_out, _, dp_rx10, ddr_pxi,
1639 _, _, _, _, _),
1640 [122] = PINGROUP(122, qup0_se5, mbist_pass, mdp0_vsync_out, _, dp_rx11, ddr_pxi,
1641 _, _, _, _, _),
1642 [123] = PINGROUP(123, qup1_se0, qup1_se1, mdp1_vsync_out, jitter_bist,
1643 _, _, _, _, _, _, _),
1644 [124] = PINGROUP(124, qup1_se0, qup1_se1, mdp1_vsync_out, _, _, _, _, _, _, _, _),
1645 [125] = PINGROUP(125, qup1_se1, qup1_se0, ccu_i2c_sda, mdp1_vsync_out,
1646 _, _, _, _, _, _, _),
1647 [126] = PINGROUP(126, qup1_se1, qup1_se0, ccu_i2c_scl, mdp1_vsync_out,
1648 _, atest_usb20, ddr_pxi, _, _, _, _),
1649 [127] = PINGROUP(127, qup1_se2_23, qup1_se2_01, _, atest_usb21, ddr_pxi,
1650 _, _, _, _, _, _),
1651 [128] = PINGROUP(128, qup1_se2_23, qup1_se2_01, _, atest_usb20, ddr_pxi,
1652 _, _, _, _, _, _),
1653 [129] = PINGROUP(129, qup1_se3_23, qup1_se3_01, ccu_i2c_sda, mdp1_vsync_out,
1654 _, atest_usb21, ddr_pxi, _, _, _, _),
1655 [130] = PINGROUP(130, qup1_se3_23, qup1_se3_01, ccu_i2c_scl, mdp1_vsync_out,
1656 _, atest_usb20, ddr_pxi, _, _, _, _),
1657 [131] = PINGROUP(131, qup1_se4, qup1_se6, ccu_i2c_sda, mdp1_vsync_out,
1658 _, atest_usb21, ddr_pxi, _, _, _, _),
1659 [132] = PINGROUP(132, qup1_se4, qup1_se6, ccu_i2c_scl, mdp1_vsync_out,
1660 _, vsense_trigger_mirnat, ddr_pxi, _, _, _, _),
1661 [133] = PINGROUP(133, qup1_se5, emac0_ptp, mdp1_vsync_out, _, ddr_pxi,
1662 _, _, _, _, _, _),
1663 [134] = PINGROUP(134, qup1_se5, emac0_ptp, mdp1_vsync_out, _, ddr_pxi,
1664 _, _, _, _, _, _),
1665 [135] = PINGROUP(135, qup1_se5, emac0_ptp, mdp1_vsync_out, _, ddr_pxi,
1666 _, _, _, _, _, _),
1667 [136] = PINGROUP(136, qup1_se5, emac0_ptp, _, ddr_pxi, _, _, _, _, _, _, _),
1668 [137] = PINGROUP(137, qup1_se6, qup1_se4, dp_rx0, _, ddr_pxi, _, _, _, _, _, _),
1669 [138] = PINGROUP(138, qup1_se6, qup1_se4, dp_rx0, qdss_cti, jitter_bist, ddr_pxi,
1670 _, _, _, _, _),
1671 [139] = PINGROUP(139, qup2_se0, emac0_ptp, mdp0_vsync_out, ddr_pxi,
1672 _, _, _, _, _, _, _),
1673 [140] = PINGROUP(140, qup2_se0, emac0_ptp, mdp0_vsync_out, _, _, _, _, _, _, _, _),
1674 [141] = PINGROUP(141, qup2_se0, emac0_ptp, mdp0_vsync_out, _, _, _, _, _, _, _, _),
1675 [142] = PINGROUP(142, qup2_se0, emac0_ptp, qdss_cti, mdp0_vsync_out, _, _, _, _, _, _, _),
1676 [143] = PINGROUP(143, qup2_se1, qup2_se4, ccu_timer, mdp0_vsync_out,
1677 _, _, _, _, _, _, _),
1678 [144] = PINGROUP(144, qup2_se1, qup2_se4, ccu_timer, qdss_cti, mdp_vsync_s,
1679 _, _, _, _, _, _),
1680 [145] = PINGROUP(145, qup2_se2, _, _, _, _, _, _, _, _, _, _),
1681 [146] = PINGROUP(146, qup2_se2, _, _, _, _, _, _, _, _, _, _),
1682 [147] = PINGROUP(147, qup2_se2, _, _, _, _, _, _, _, _, _, _),
1683 [148] = PINGROUP(148, qup2_se2, _, _, _, _, _, _, _, _, _, _),
1684 [149] = PINGROUP(149, qup2_se2, _, _, _, _, _, _, _, _, _, _),
1685 [150] = PINGROUP(150, qup2_se3, qup2_se4, ccu_timer, _, _, _, _, _, _, _, _),
1686 [151] = PINGROUP(151, qup2_se3, qup2_se4, ccu_timer, _, _, _, _, _, _, _, _),
1687 [152] = PINGROUP(152, qup2_se3, qup2_se4, ccu_timer, _, _, _, _, _, _, _, _),
1688 [153] = PINGROUP(153, qup2_se3, ccu_timer, _, _, _, _, _, _, _, _, _),
1689 [154] = PINGROUP(154, qup2_se4, qup2_se1, _, _, _, _, _, _, _, _, _),
1690 [155] = PINGROUP(155, qup2_se4, qup2_se1, _, _, _, _, _, _, _, _, _),
1691 [156] = PINGROUP(156, qup2_se5, qup2_se6, _, _, _, _, _, _, _, _, _),
1692 [157] = PINGROUP(157, qup2_se5, qup2_se6, _, _, _, _, _, _, _, _, _),
1693 [158] = PINGROUP(158, qup2_se6, qup2_se5, dp_rx1, _, _, _, _, _, _, _, _),
1694 [159] = PINGROUP(159, qup2_se6, qup2_se5, dp_rx1, _, _, _, _, _, _, _, _),
1695 [160] = PINGROUP(160, wcn_sw_ctrl, _, _, _, _, _, _, _, _, _, _),
1696 [161] = PINGROUP(161, wcn_sw, _, _, _, _, _, _, _, _, _, _),
1697 [162] = PINGROUP(162, qdss_cti, _, ddr_pxi, _, _, _, _, _, _, _, _),
1698 [163] = PINGROUP(163, qdss_cti, _, ddr_pxi, _, _, _, _, _, _, _, _),
1699 [164] = PINGROUP(164, usb0_phy_ps, _, sailss_ospi, ddr_pxi, _, _, _, _, _, _, _),
1700 [165] = PINGROUP(165, usb1_phy_ps, dbg_out_clk, sailss_ospi, ddr_pxi,
1701 _, _, _, _, _, _, _),
1702 [166] = PINGROUP(166, _, _, _, _, _, _, _, _, _, _, _),
1703 [167] = PINGROUP(167, pwrbrk_i_n, _, _, _, _, _, _, _, _, _, _),
1704 [168] = PINGROUP(168, bist_done, _, _, _, _, _, _, _, _, _, _),
1705 [169] = PINGROUP(169, tb_trig_sdc4, _, _, _, _, _, _, _, _, _, _),
1706 [170] = PINGROUP(170, sdc4_data, _, _, _, _, _, _, _, _, _, _),
1707 [171] = PINGROUP(171, sdc4_data, _, _, _, _, _, _, _, _, _, _),
1708 [172] = PINGROUP(172, sdc4_data, _, _, _, _, _, _, _, _, _, _),
1709 [173] = PINGROUP(173, sdc4_data, _, _, _, _, _, _, _, _, _, _),
1710 [174] = PINGROUP(174, sdc4_cmd, _, _, _, _, _, _, _, _, _, _),
1711 [175] = PINGROUP(175, sdc4_clk, _, _, _, _, _, _, _, _, _, _),
1712 [176] = PINGROUP(176, ccu_async_in, pll_bist_sync, atest_char,
1713 _, _, _, _, _, _, _, _),
1714 [177] = PINGROUP(177, ccu_async_in, atest_char, _, _, _, _, _, _, _, _, _),
1715 [178] = PINGROUP(178, ccu_async_in, atest_char, _, _, _, _, _, _, _, _, _),
1716 [179] = PINGROUP(179, ccu_async_in, atest_char, _, _, _, _, _, _, _, _, _),
1717 [180] = PINGROUP(180, ccu_async_in, atest_char, _, _, _, _, _, _, _, _, _),
1718 [181] = UFS_RESET(ufs_reset, 0xbd004, 0xbe000),
1719 };
1720
1721 static const struct msm_gpio_wakeirq_map nord_pdc_map[] = {
1722 { 0, 67 }, { 1, 68 }, { 2, 82 }, { 3, 69 }, { 4, 70 },
1723 { 5, 83 }, { 6, 71 }, { 7, 72 }, { 8, 84 }, { 9, 73 },
1724 { 10, 119 }, { 11, 85 }, { 45, 107 }, { 46, 98 }, { 102, 77 },
1725 { 108, 78 }, { 110, 120 }, { 114, 80 }, { 116, 81 }, { 120, 117 },
1726 { 124, 108 }, { 126, 99 }, { 128, 100 }, { 132, 101 }, { 138, 87 },
1727 { 142, 88 }, { 144, 89 }, { 153, 90 }, { 157, 91 }, { 159, 118 },
1728 { 160, 110 }, { 161, 79 }, { 166, 109 }, { 168, 111 },
1729 };
1730
1731 static const struct msm_pinctrl_soc_data nord_tlmm = {
1732 .pins = nord_pins,
1733 .npins = ARRAY_SIZE(nord_pins),
1734 .functions = nord_functions,
1735 .nfunctions = ARRAY_SIZE(nord_functions),
1736 .groups = nord_groups,
1737 .ngroups = ARRAY_SIZE(nord_groups),
1738 .ngpios = 182,
1739 .wakeirq_map = nord_pdc_map,
1740 .nwakeirq_map = ARRAY_SIZE(nord_pdc_map),
1741 .egpio_func = 11,
1742 };
1743
1744 static const struct of_device_id nord_tlmm_of_match[] = {
1745 { .compatible = "qcom,nord-tlmm", .data = &nord_tlmm },
1746 {},
1747 };
1748
1749 static int nord_tlmm_probe(struct platform_device *pdev)
1750 {
1751 const struct msm_pinctrl_soc_data *pinctrl_data;
1752 struct device *dev = &pdev->dev;
1753
1754 pinctrl_data = device_get_match_data(dev);
1755 if (!pinctrl_data)
1756 return -EINVAL;
1757
1758 return msm_pinctrl_probe(pdev, &nord_tlmm);
1759 }
1760
1761 static struct platform_driver nord_tlmm_driver = {
1762 .driver = {
1763 .name = "nord-tlmm",
1764 .of_match_table = nord_tlmm_of_match,
1765 },
1766 .probe = nord_tlmm_probe,
1767 };
1768
1769 static int __init nord_tlmm_init(void)
1770 {
1771 return platform_driver_register(&nord_tlmm_driver);
1772 }
1773 arch_initcall(nord_tlmm_init);
1774
1775 static void __exit nord_tlmm_exit(void)
1776 {
1777 platform_driver_unregister(&nord_tlmm_driver);
1778 }
1779 module_exit(nord_tlmm_exit);
1780
1781 MODULE_DESCRIPTION("QTI Nord TLMM driver");
1782 MODULE_LICENSE("GPL");
1783 MODULE_DEVICE_TABLE(of, nord_tlmm_of_match);