xref: /linux/drivers/pinctrl/qcom/pinctrl-msm8996.c (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
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_BASE 0x0
13 #define REG_SIZE 0x1000
14 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)	\
15 	{					        \
16 		.grp = PINCTRL_PINGROUP("gpio" #id, 	\
17 			gpio##id##_pins, 		\
18 			ARRAY_SIZE(gpio##id##_pins)),	\
19 		.funcs = (int[]){			\
20 			msm_mux_gpio, /* gpio mode */	\
21 			msm_mux_##f1,			\
22 			msm_mux_##f2,			\
23 			msm_mux_##f3,			\
24 			msm_mux_##f4,			\
25 			msm_mux_##f5,			\
26 			msm_mux_##f6,			\
27 			msm_mux_##f7,			\
28 			msm_mux_##f8,			\
29 			msm_mux_##f9			\
30 		},				        \
31 		.nfuncs = 10,				\
32 		.ctl_reg = REG_BASE + REG_SIZE * id,	\
33 		.io_reg = REG_BASE + 0x4 + REG_SIZE * id,		\
34 		.intr_cfg_reg = REG_BASE + 0x8 + REG_SIZE * id,		\
35 		.intr_status_reg = REG_BASE + 0xc + REG_SIZE * id,	\
36 		.intr_target_reg = REG_BASE + 0x8 + REG_SIZE * id,	\
37 		.mux_bit = 2,			\
38 		.pull_bit = 0,			\
39 		.drv_bit = 6,			\
40 		.oe_bit = 9,			\
41 		.in_bit = 0,			\
42 		.out_bit = 1,			\
43 		.intr_enable_bit = 0,		\
44 		.intr_status_bit = 0,		\
45 		.intr_target_bit = 5,		\
46 		.intr_target_kpss_val = 3,	\
47 		.intr_raw_status_bit = 4,	\
48 		.intr_polarity_bit = 1,		\
49 		.intr_detection_bit = 2,	\
50 		.intr_detection_width = 2,	\
51 	}
52 
53 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)	\
54 	{					        \
55 		.grp = PINCTRL_PINGROUP(#pg_name, 	\
56 			pg_name##_pins, 		\
57 			ARRAY_SIZE(pg_name##_pins)),	\
58 		.ctl_reg = ctl,				\
59 		.io_reg = 0,				\
60 		.intr_cfg_reg = 0,			\
61 		.intr_status_reg = 0,			\
62 		.intr_target_reg = 0,			\
63 		.mux_bit = -1,				\
64 		.pull_bit = pull,			\
65 		.drv_bit = drv,				\
66 		.oe_bit = -1,				\
67 		.in_bit = -1,				\
68 		.out_bit = -1,				\
69 		.intr_enable_bit = -1,			\
70 		.intr_status_bit = -1,			\
71 		.intr_target_bit = -1,			\
72 		.intr_raw_status_bit = -1,		\
73 		.intr_polarity_bit = -1,		\
74 		.intr_detection_bit = -1,		\
75 		.intr_detection_width = -1,		\
76 	}
77 static const struct pinctrl_pin_desc msm8996_pins[] = {
78 	PINCTRL_PIN(0, "GPIO_0"),
79 	PINCTRL_PIN(1, "GPIO_1"),
80 	PINCTRL_PIN(2, "GPIO_2"),
81 	PINCTRL_PIN(3, "GPIO_3"),
82 	PINCTRL_PIN(4, "GPIO_4"),
83 	PINCTRL_PIN(5, "GPIO_5"),
84 	PINCTRL_PIN(6, "GPIO_6"),
85 	PINCTRL_PIN(7, "GPIO_7"),
86 	PINCTRL_PIN(8, "GPIO_8"),
87 	PINCTRL_PIN(9, "GPIO_9"),
88 	PINCTRL_PIN(10, "GPIO_10"),
89 	PINCTRL_PIN(11, "GPIO_11"),
90 	PINCTRL_PIN(12, "GPIO_12"),
91 	PINCTRL_PIN(13, "GPIO_13"),
92 	PINCTRL_PIN(14, "GPIO_14"),
93 	PINCTRL_PIN(15, "GPIO_15"),
94 	PINCTRL_PIN(16, "GPIO_16"),
95 	PINCTRL_PIN(17, "GPIO_17"),
96 	PINCTRL_PIN(18, "GPIO_18"),
97 	PINCTRL_PIN(19, "GPIO_19"),
98 	PINCTRL_PIN(20, "GPIO_20"),
99 	PINCTRL_PIN(21, "GPIO_21"),
100 	PINCTRL_PIN(22, "GPIO_22"),
101 	PINCTRL_PIN(23, "GPIO_23"),
102 	PINCTRL_PIN(24, "GPIO_24"),
103 	PINCTRL_PIN(25, "GPIO_25"),
104 	PINCTRL_PIN(26, "GPIO_26"),
105 	PINCTRL_PIN(27, "GPIO_27"),
106 	PINCTRL_PIN(28, "GPIO_28"),
107 	PINCTRL_PIN(29, "GPIO_29"),
108 	PINCTRL_PIN(30, "GPIO_30"),
109 	PINCTRL_PIN(31, "GPIO_31"),
110 	PINCTRL_PIN(32, "GPIO_32"),
111 	PINCTRL_PIN(33, "GPIO_33"),
112 	PINCTRL_PIN(34, "GPIO_34"),
113 	PINCTRL_PIN(35, "GPIO_35"),
114 	PINCTRL_PIN(36, "GPIO_36"),
115 	PINCTRL_PIN(37, "GPIO_37"),
116 	PINCTRL_PIN(38, "GPIO_38"),
117 	PINCTRL_PIN(39, "GPIO_39"),
118 	PINCTRL_PIN(40, "GPIO_40"),
119 	PINCTRL_PIN(41, "GPIO_41"),
120 	PINCTRL_PIN(42, "GPIO_42"),
121 	PINCTRL_PIN(43, "GPIO_43"),
122 	PINCTRL_PIN(44, "GPIO_44"),
123 	PINCTRL_PIN(45, "GPIO_45"),
124 	PINCTRL_PIN(46, "GPIO_46"),
125 	PINCTRL_PIN(47, "GPIO_47"),
126 	PINCTRL_PIN(48, "GPIO_48"),
127 	PINCTRL_PIN(49, "GPIO_49"),
128 	PINCTRL_PIN(50, "GPIO_50"),
129 	PINCTRL_PIN(51, "GPIO_51"),
130 	PINCTRL_PIN(52, "GPIO_52"),
131 	PINCTRL_PIN(53, "GPIO_53"),
132 	PINCTRL_PIN(54, "GPIO_54"),
133 	PINCTRL_PIN(55, "GPIO_55"),
134 	PINCTRL_PIN(56, "GPIO_56"),
135 	PINCTRL_PIN(57, "GPIO_57"),
136 	PINCTRL_PIN(58, "GPIO_58"),
137 	PINCTRL_PIN(59, "GPIO_59"),
138 	PINCTRL_PIN(60, "GPIO_60"),
139 	PINCTRL_PIN(61, "GPIO_61"),
140 	PINCTRL_PIN(62, "GPIO_62"),
141 	PINCTRL_PIN(63, "GPIO_63"),
142 	PINCTRL_PIN(64, "GPIO_64"),
143 	PINCTRL_PIN(65, "GPIO_65"),
144 	PINCTRL_PIN(66, "GPIO_66"),
145 	PINCTRL_PIN(67, "GPIO_67"),
146 	PINCTRL_PIN(68, "GPIO_68"),
147 	PINCTRL_PIN(69, "GPIO_69"),
148 	PINCTRL_PIN(70, "GPIO_70"),
149 	PINCTRL_PIN(71, "GPIO_71"),
150 	PINCTRL_PIN(72, "GPIO_72"),
151 	PINCTRL_PIN(73, "GPIO_73"),
152 	PINCTRL_PIN(74, "GPIO_74"),
153 	PINCTRL_PIN(75, "GPIO_75"),
154 	PINCTRL_PIN(76, "GPIO_76"),
155 	PINCTRL_PIN(77, "GPIO_77"),
156 	PINCTRL_PIN(78, "GPIO_78"),
157 	PINCTRL_PIN(79, "GPIO_79"),
158 	PINCTRL_PIN(80, "GPIO_80"),
159 	PINCTRL_PIN(81, "GPIO_81"),
160 	PINCTRL_PIN(82, "GPIO_82"),
161 	PINCTRL_PIN(83, "GPIO_83"),
162 	PINCTRL_PIN(84, "GPIO_84"),
163 	PINCTRL_PIN(85, "GPIO_85"),
164 	PINCTRL_PIN(86, "GPIO_86"),
165 	PINCTRL_PIN(87, "GPIO_87"),
166 	PINCTRL_PIN(88, "GPIO_88"),
167 	PINCTRL_PIN(89, "GPIO_89"),
168 	PINCTRL_PIN(90, "GPIO_90"),
169 	PINCTRL_PIN(91, "GPIO_91"),
170 	PINCTRL_PIN(92, "GPIO_92"),
171 	PINCTRL_PIN(93, "GPIO_93"),
172 	PINCTRL_PIN(94, "GPIO_94"),
173 	PINCTRL_PIN(95, "GPIO_95"),
174 	PINCTRL_PIN(96, "GPIO_96"),
175 	PINCTRL_PIN(97, "GPIO_97"),
176 	PINCTRL_PIN(98, "GPIO_98"),
177 	PINCTRL_PIN(99, "GPIO_99"),
178 	PINCTRL_PIN(100, "GPIO_100"),
179 	PINCTRL_PIN(101, "GPIO_101"),
180 	PINCTRL_PIN(102, "GPIO_102"),
181 	PINCTRL_PIN(103, "GPIO_103"),
182 	PINCTRL_PIN(104, "GPIO_104"),
183 	PINCTRL_PIN(105, "GPIO_105"),
184 	PINCTRL_PIN(106, "GPIO_106"),
185 	PINCTRL_PIN(107, "GPIO_107"),
186 	PINCTRL_PIN(108, "GPIO_108"),
187 	PINCTRL_PIN(109, "GPIO_109"),
188 	PINCTRL_PIN(110, "GPIO_110"),
189 	PINCTRL_PIN(111, "GPIO_111"),
190 	PINCTRL_PIN(112, "GPIO_112"),
191 	PINCTRL_PIN(113, "GPIO_113"),
192 	PINCTRL_PIN(114, "GPIO_114"),
193 	PINCTRL_PIN(115, "GPIO_115"),
194 	PINCTRL_PIN(116, "GPIO_116"),
195 	PINCTRL_PIN(117, "GPIO_117"),
196 	PINCTRL_PIN(118, "GPIO_118"),
197 	PINCTRL_PIN(119, "GPIO_119"),
198 	PINCTRL_PIN(120, "GPIO_120"),
199 	PINCTRL_PIN(121, "GPIO_121"),
200 	PINCTRL_PIN(122, "GPIO_122"),
201 	PINCTRL_PIN(123, "GPIO_123"),
202 	PINCTRL_PIN(124, "GPIO_124"),
203 	PINCTRL_PIN(125, "GPIO_125"),
204 	PINCTRL_PIN(126, "GPIO_126"),
205 	PINCTRL_PIN(127, "GPIO_127"),
206 	PINCTRL_PIN(128, "GPIO_128"),
207 	PINCTRL_PIN(129, "GPIO_129"),
208 	PINCTRL_PIN(130, "GPIO_130"),
209 	PINCTRL_PIN(131, "GPIO_131"),
210 	PINCTRL_PIN(132, "GPIO_132"),
211 	PINCTRL_PIN(133, "GPIO_133"),
212 	PINCTRL_PIN(134, "GPIO_134"),
213 	PINCTRL_PIN(135, "GPIO_135"),
214 	PINCTRL_PIN(136, "GPIO_136"),
215 	PINCTRL_PIN(137, "GPIO_137"),
216 	PINCTRL_PIN(138, "GPIO_138"),
217 	PINCTRL_PIN(139, "GPIO_139"),
218 	PINCTRL_PIN(140, "GPIO_140"),
219 	PINCTRL_PIN(141, "GPIO_141"),
220 	PINCTRL_PIN(142, "GPIO_142"),
221 	PINCTRL_PIN(143, "GPIO_143"),
222 	PINCTRL_PIN(144, "GPIO_144"),
223 	PINCTRL_PIN(145, "GPIO_145"),
224 	PINCTRL_PIN(146, "GPIO_146"),
225 	PINCTRL_PIN(147, "GPIO_147"),
226 	PINCTRL_PIN(148, "GPIO_148"),
227 	PINCTRL_PIN(149, "GPIO_149"),
228 	PINCTRL_PIN(150, "SDC1_CLK"),
229 	PINCTRL_PIN(151, "SDC1_CMD"),
230 	PINCTRL_PIN(152, "SDC1_DATA"),
231 	PINCTRL_PIN(153, "SDC2_CLK"),
232 	PINCTRL_PIN(154, "SDC2_CMD"),
233 	PINCTRL_PIN(155, "SDC2_DATA"),
234 	PINCTRL_PIN(156, "SDC1_RCLK"),
235 };
236 
237 #define DECLARE_MSM_GPIO_PINS(pin) \
238 	static const unsigned int gpio##pin##_pins[] = { pin }
239 DECLARE_MSM_GPIO_PINS(0);
240 DECLARE_MSM_GPIO_PINS(1);
241 DECLARE_MSM_GPIO_PINS(2);
242 DECLARE_MSM_GPIO_PINS(3);
243 DECLARE_MSM_GPIO_PINS(4);
244 DECLARE_MSM_GPIO_PINS(5);
245 DECLARE_MSM_GPIO_PINS(6);
246 DECLARE_MSM_GPIO_PINS(7);
247 DECLARE_MSM_GPIO_PINS(8);
248 DECLARE_MSM_GPIO_PINS(9);
249 DECLARE_MSM_GPIO_PINS(10);
250 DECLARE_MSM_GPIO_PINS(11);
251 DECLARE_MSM_GPIO_PINS(12);
252 DECLARE_MSM_GPIO_PINS(13);
253 DECLARE_MSM_GPIO_PINS(14);
254 DECLARE_MSM_GPIO_PINS(15);
255 DECLARE_MSM_GPIO_PINS(16);
256 DECLARE_MSM_GPIO_PINS(17);
257 DECLARE_MSM_GPIO_PINS(18);
258 DECLARE_MSM_GPIO_PINS(19);
259 DECLARE_MSM_GPIO_PINS(20);
260 DECLARE_MSM_GPIO_PINS(21);
261 DECLARE_MSM_GPIO_PINS(22);
262 DECLARE_MSM_GPIO_PINS(23);
263 DECLARE_MSM_GPIO_PINS(24);
264 DECLARE_MSM_GPIO_PINS(25);
265 DECLARE_MSM_GPIO_PINS(26);
266 DECLARE_MSM_GPIO_PINS(27);
267 DECLARE_MSM_GPIO_PINS(28);
268 DECLARE_MSM_GPIO_PINS(29);
269 DECLARE_MSM_GPIO_PINS(30);
270 DECLARE_MSM_GPIO_PINS(31);
271 DECLARE_MSM_GPIO_PINS(32);
272 DECLARE_MSM_GPIO_PINS(33);
273 DECLARE_MSM_GPIO_PINS(34);
274 DECLARE_MSM_GPIO_PINS(35);
275 DECLARE_MSM_GPIO_PINS(36);
276 DECLARE_MSM_GPIO_PINS(37);
277 DECLARE_MSM_GPIO_PINS(38);
278 DECLARE_MSM_GPIO_PINS(39);
279 DECLARE_MSM_GPIO_PINS(40);
280 DECLARE_MSM_GPIO_PINS(41);
281 DECLARE_MSM_GPIO_PINS(42);
282 DECLARE_MSM_GPIO_PINS(43);
283 DECLARE_MSM_GPIO_PINS(44);
284 DECLARE_MSM_GPIO_PINS(45);
285 DECLARE_MSM_GPIO_PINS(46);
286 DECLARE_MSM_GPIO_PINS(47);
287 DECLARE_MSM_GPIO_PINS(48);
288 DECLARE_MSM_GPIO_PINS(49);
289 DECLARE_MSM_GPIO_PINS(50);
290 DECLARE_MSM_GPIO_PINS(51);
291 DECLARE_MSM_GPIO_PINS(52);
292 DECLARE_MSM_GPIO_PINS(53);
293 DECLARE_MSM_GPIO_PINS(54);
294 DECLARE_MSM_GPIO_PINS(55);
295 DECLARE_MSM_GPIO_PINS(56);
296 DECLARE_MSM_GPIO_PINS(57);
297 DECLARE_MSM_GPIO_PINS(58);
298 DECLARE_MSM_GPIO_PINS(59);
299 DECLARE_MSM_GPIO_PINS(60);
300 DECLARE_MSM_GPIO_PINS(61);
301 DECLARE_MSM_GPIO_PINS(62);
302 DECLARE_MSM_GPIO_PINS(63);
303 DECLARE_MSM_GPIO_PINS(64);
304 DECLARE_MSM_GPIO_PINS(65);
305 DECLARE_MSM_GPIO_PINS(66);
306 DECLARE_MSM_GPIO_PINS(67);
307 DECLARE_MSM_GPIO_PINS(68);
308 DECLARE_MSM_GPIO_PINS(69);
309 DECLARE_MSM_GPIO_PINS(70);
310 DECLARE_MSM_GPIO_PINS(71);
311 DECLARE_MSM_GPIO_PINS(72);
312 DECLARE_MSM_GPIO_PINS(73);
313 DECLARE_MSM_GPIO_PINS(74);
314 DECLARE_MSM_GPIO_PINS(75);
315 DECLARE_MSM_GPIO_PINS(76);
316 DECLARE_MSM_GPIO_PINS(77);
317 DECLARE_MSM_GPIO_PINS(78);
318 DECLARE_MSM_GPIO_PINS(79);
319 DECLARE_MSM_GPIO_PINS(80);
320 DECLARE_MSM_GPIO_PINS(81);
321 DECLARE_MSM_GPIO_PINS(82);
322 DECLARE_MSM_GPIO_PINS(83);
323 DECLARE_MSM_GPIO_PINS(84);
324 DECLARE_MSM_GPIO_PINS(85);
325 DECLARE_MSM_GPIO_PINS(86);
326 DECLARE_MSM_GPIO_PINS(87);
327 DECLARE_MSM_GPIO_PINS(88);
328 DECLARE_MSM_GPIO_PINS(89);
329 DECLARE_MSM_GPIO_PINS(90);
330 DECLARE_MSM_GPIO_PINS(91);
331 DECLARE_MSM_GPIO_PINS(92);
332 DECLARE_MSM_GPIO_PINS(93);
333 DECLARE_MSM_GPIO_PINS(94);
334 DECLARE_MSM_GPIO_PINS(95);
335 DECLARE_MSM_GPIO_PINS(96);
336 DECLARE_MSM_GPIO_PINS(97);
337 DECLARE_MSM_GPIO_PINS(98);
338 DECLARE_MSM_GPIO_PINS(99);
339 DECLARE_MSM_GPIO_PINS(100);
340 DECLARE_MSM_GPIO_PINS(101);
341 DECLARE_MSM_GPIO_PINS(102);
342 DECLARE_MSM_GPIO_PINS(103);
343 DECLARE_MSM_GPIO_PINS(104);
344 DECLARE_MSM_GPIO_PINS(105);
345 DECLARE_MSM_GPIO_PINS(106);
346 DECLARE_MSM_GPIO_PINS(107);
347 DECLARE_MSM_GPIO_PINS(108);
348 DECLARE_MSM_GPIO_PINS(109);
349 DECLARE_MSM_GPIO_PINS(110);
350 DECLARE_MSM_GPIO_PINS(111);
351 DECLARE_MSM_GPIO_PINS(112);
352 DECLARE_MSM_GPIO_PINS(113);
353 DECLARE_MSM_GPIO_PINS(114);
354 DECLARE_MSM_GPIO_PINS(115);
355 DECLARE_MSM_GPIO_PINS(116);
356 DECLARE_MSM_GPIO_PINS(117);
357 DECLARE_MSM_GPIO_PINS(118);
358 DECLARE_MSM_GPIO_PINS(119);
359 DECLARE_MSM_GPIO_PINS(120);
360 DECLARE_MSM_GPIO_PINS(121);
361 DECLARE_MSM_GPIO_PINS(122);
362 DECLARE_MSM_GPIO_PINS(123);
363 DECLARE_MSM_GPIO_PINS(124);
364 DECLARE_MSM_GPIO_PINS(125);
365 DECLARE_MSM_GPIO_PINS(126);
366 DECLARE_MSM_GPIO_PINS(127);
367 DECLARE_MSM_GPIO_PINS(128);
368 DECLARE_MSM_GPIO_PINS(129);
369 DECLARE_MSM_GPIO_PINS(130);
370 DECLARE_MSM_GPIO_PINS(131);
371 DECLARE_MSM_GPIO_PINS(132);
372 DECLARE_MSM_GPIO_PINS(133);
373 DECLARE_MSM_GPIO_PINS(134);
374 DECLARE_MSM_GPIO_PINS(135);
375 DECLARE_MSM_GPIO_PINS(136);
376 DECLARE_MSM_GPIO_PINS(137);
377 DECLARE_MSM_GPIO_PINS(138);
378 DECLARE_MSM_GPIO_PINS(139);
379 DECLARE_MSM_GPIO_PINS(140);
380 DECLARE_MSM_GPIO_PINS(141);
381 DECLARE_MSM_GPIO_PINS(142);
382 DECLARE_MSM_GPIO_PINS(143);
383 DECLARE_MSM_GPIO_PINS(144);
384 DECLARE_MSM_GPIO_PINS(145);
385 DECLARE_MSM_GPIO_PINS(146);
386 DECLARE_MSM_GPIO_PINS(147);
387 DECLARE_MSM_GPIO_PINS(148);
388 DECLARE_MSM_GPIO_PINS(149);
389 
390 static const unsigned int sdc1_clk_pins[] = { 150 };
391 static const unsigned int sdc1_cmd_pins[] = { 151 };
392 static const unsigned int sdc1_data_pins[] = { 152 };
393 static const unsigned int sdc2_clk_pins[] = { 153 };
394 static const unsigned int sdc2_cmd_pins[] = { 154 };
395 static const unsigned int sdc2_data_pins[] = { 155 };
396 static const unsigned int sdc1_rclk_pins[] = { 156 };
397 
398 enum msm8996_functions {
399 	msm_mux_adsp_ext,
400 	msm_mux_atest_bbrx0,
401 	msm_mux_atest_bbrx1,
402 	msm_mux_atest_char,
403 	msm_mux_atest_char0,
404 	msm_mux_atest_char1,
405 	msm_mux_atest_char2,
406 	msm_mux_atest_char3,
407 	msm_mux_atest_gpsadc0,
408 	msm_mux_atest_gpsadc1,
409 	msm_mux_atest_tsens,
410 	msm_mux_atest_tsens2,
411 	msm_mux_atest_usb1,
412 	msm_mux_atest_usb10,
413 	msm_mux_atest_usb11,
414 	msm_mux_atest_usb12,
415 	msm_mux_atest_usb13,
416 	msm_mux_atest_usb2,
417 	msm_mux_atest_usb20,
418 	msm_mux_atest_usb21,
419 	msm_mux_atest_usb22,
420 	msm_mux_atest_usb23,
421 	msm_mux_audio_ref,
422 	msm_mux_bimc_dte0,
423 	msm_mux_bimc_dte1,
424 	msm_mux_blsp10_spi,
425 	msm_mux_blsp11_i2c_scl_b,
426 	msm_mux_blsp11_i2c_sda_b,
427 	msm_mux_blsp11_uart_rx_b,
428 	msm_mux_blsp11_uart_tx_b,
429 	msm_mux_blsp1_spi,
430 	msm_mux_blsp2_spi,
431 	msm_mux_blsp_i2c1,
432 	msm_mux_blsp_i2c10,
433 	msm_mux_blsp_i2c11,
434 	msm_mux_blsp_i2c12,
435 	msm_mux_blsp_i2c2,
436 	msm_mux_blsp_i2c3,
437 	msm_mux_blsp_i2c4,
438 	msm_mux_blsp_i2c5,
439 	msm_mux_blsp_i2c6,
440 	msm_mux_blsp_i2c7,
441 	msm_mux_blsp_i2c8,
442 	msm_mux_blsp_i2c9,
443 	msm_mux_blsp_spi1,
444 	msm_mux_blsp_spi10,
445 	msm_mux_blsp_spi11,
446 	msm_mux_blsp_spi12,
447 	msm_mux_blsp_spi2,
448 	msm_mux_blsp_spi3,
449 	msm_mux_blsp_spi4,
450 	msm_mux_blsp_spi5,
451 	msm_mux_blsp_spi6,
452 	msm_mux_blsp_spi7,
453 	msm_mux_blsp_spi8,
454 	msm_mux_blsp_spi9,
455 	msm_mux_blsp_uart1,
456 	msm_mux_blsp_uart10,
457 	msm_mux_blsp_uart11,
458 	msm_mux_blsp_uart12,
459 	msm_mux_blsp_uart2,
460 	msm_mux_blsp_uart3,
461 	msm_mux_blsp_uart4,
462 	msm_mux_blsp_uart5,
463 	msm_mux_blsp_uart6,
464 	msm_mux_blsp_uart7,
465 	msm_mux_blsp_uart8,
466 	msm_mux_blsp_uart9,
467 	msm_mux_blsp_uim1,
468 	msm_mux_blsp_uim10,
469 	msm_mux_blsp_uim11,
470 	msm_mux_blsp_uim12,
471 	msm_mux_blsp_uim2,
472 	msm_mux_blsp_uim3,
473 	msm_mux_blsp_uim4,
474 	msm_mux_blsp_uim5,
475 	msm_mux_blsp_uim6,
476 	msm_mux_blsp_uim7,
477 	msm_mux_blsp_uim8,
478 	msm_mux_blsp_uim9,
479 	msm_mux_btfm_slimbus,
480 	msm_mux_cam_mclk,
481 	msm_mux_cci_async,
482 	msm_mux_cci_i2c,
483 	msm_mux_cci_timer0,
484 	msm_mux_cci_timer1,
485 	msm_mux_cci_timer2,
486 	msm_mux_cci_timer3,
487 	msm_mux_cci_timer4,
488 	msm_mux_cri_trng,
489 	msm_mux_cri_trng0,
490 	msm_mux_cri_trng1,
491 	msm_mux_dac_calib0,
492 	msm_mux_dac_calib1,
493 	msm_mux_dac_calib10,
494 	msm_mux_dac_calib11,
495 	msm_mux_dac_calib12,
496 	msm_mux_dac_calib13,
497 	msm_mux_dac_calib14,
498 	msm_mux_dac_calib15,
499 	msm_mux_dac_calib16,
500 	msm_mux_dac_calib17,
501 	msm_mux_dac_calib18,
502 	msm_mux_dac_calib19,
503 	msm_mux_dac_calib2,
504 	msm_mux_dac_calib20,
505 	msm_mux_dac_calib21,
506 	msm_mux_dac_calib22,
507 	msm_mux_dac_calib23,
508 	msm_mux_dac_calib24,
509 	msm_mux_dac_calib25,
510 	msm_mux_dac_calib26,
511 	msm_mux_dac_calib3,
512 	msm_mux_dac_calib4,
513 	msm_mux_dac_calib5,
514 	msm_mux_dac_calib6,
515 	msm_mux_dac_calib7,
516 	msm_mux_dac_calib8,
517 	msm_mux_dac_calib9,
518 	msm_mux_dac_gpio,
519 	msm_mux_dbg_out,
520 	msm_mux_ddr_bist,
521 	msm_mux_edp_hot,
522 	msm_mux_edp_lcd,
523 	msm_mux_gcc_gp1_clk_a,
524 	msm_mux_gcc_gp1_clk_b,
525 	msm_mux_gcc_gp2_clk_a,
526 	msm_mux_gcc_gp2_clk_b,
527 	msm_mux_gcc_gp3_clk_a,
528 	msm_mux_gcc_gp3_clk_b,
529 	msm_mux_gsm_tx,
530 	msm_mux_hdmi_cec,
531 	msm_mux_hdmi_ddc,
532 	msm_mux_hdmi_hot,
533 	msm_mux_hdmi_rcv,
534 	msm_mux_isense_dbg,
535 	msm_mux_ldo_en,
536 	msm_mux_ldo_update,
537 	msm_mux_lpass_slimbus,
538 	msm_mux_m_voc,
539 	msm_mux_mdp_vsync,
540 	msm_mux_mdp_vsync_p_b,
541 	msm_mux_mdp_vsync_s_b,
542 	msm_mux_modem_tsync,
543 	msm_mux_mss_lte,
544 	msm_mux_nav_dr,
545 	msm_mux_nav_pps,
546 	msm_mux_pa_indicator,
547 	msm_mux_pci_e0,
548 	msm_mux_pci_e1,
549 	msm_mux_pci_e2,
550 	msm_mux_pll_bypassnl,
551 	msm_mux_pll_reset,
552 	msm_mux_pri_mi2s,
553 	msm_mux_prng_rosc,
554 	msm_mux_pwr_crypto,
555 	msm_mux_pwr_modem,
556 	msm_mux_pwr_nav,
557 	msm_mux_qdss_cti,
558 	msm_mux_qdss_cti_trig_in_a,
559 	msm_mux_qdss_cti_trig_in_b,
560 	msm_mux_qdss_cti_trig_out_a,
561 	msm_mux_qdss_cti_trig_out_b,
562 	msm_mux_qdss_stm0,
563 	msm_mux_qdss_stm1,
564 	msm_mux_qdss_stm10,
565 	msm_mux_qdss_stm11,
566 	msm_mux_qdss_stm12,
567 	msm_mux_qdss_stm13,
568 	msm_mux_qdss_stm14,
569 	msm_mux_qdss_stm15,
570 	msm_mux_qdss_stm16,
571 	msm_mux_qdss_stm17,
572 	msm_mux_qdss_stm18,
573 	msm_mux_qdss_stm19,
574 	msm_mux_qdss_stm2,
575 	msm_mux_qdss_stm20,
576 	msm_mux_qdss_stm21,
577 	msm_mux_qdss_stm22,
578 	msm_mux_qdss_stm23,
579 	msm_mux_qdss_stm24,
580 	msm_mux_qdss_stm25,
581 	msm_mux_qdss_stm26,
582 	msm_mux_qdss_stm27,
583 	msm_mux_qdss_stm28,
584 	msm_mux_qdss_stm29,
585 	msm_mux_qdss_stm3,
586 	msm_mux_qdss_stm30,
587 	msm_mux_qdss_stm31,
588 	msm_mux_qdss_stm4,
589 	msm_mux_qdss_stm5,
590 	msm_mux_qdss_stm6,
591 	msm_mux_qdss_stm7,
592 	msm_mux_qdss_stm8,
593 	msm_mux_qdss_stm9,
594 	msm_mux_qdss_traceclk_a,
595 	msm_mux_qdss_traceclk_b,
596 	msm_mux_qdss_tracectl_a,
597 	msm_mux_qdss_tracectl_b,
598 	msm_mux_qdss_tracedata_11,
599 	msm_mux_qdss_tracedata_12,
600 	msm_mux_qdss_tracedata_a,
601 	msm_mux_qdss_tracedata_b,
602 	msm_mux_qspi0,
603 	msm_mux_qspi1,
604 	msm_mux_qspi2,
605 	msm_mux_qspi3,
606 	msm_mux_qspi_clk,
607 	msm_mux_qspi_cs,
608 	msm_mux_qua_mi2s,
609 	msm_mux_sd_card,
610 	msm_mux_sd_write,
611 	msm_mux_sdc40,
612 	msm_mux_sdc41,
613 	msm_mux_sdc42,
614 	msm_mux_sdc43,
615 	msm_mux_sdc4_clk,
616 	msm_mux_sdc4_cmd,
617 	msm_mux_sec_mi2s,
618 	msm_mux_spkr_i2s,
619 	msm_mux_ssbi1,
620 	msm_mux_ssbi2,
621 	msm_mux_ssc_irq,
622 	msm_mux_ter_mi2s,
623 	msm_mux_tsense_pwm1,
624 	msm_mux_tsense_pwm2,
625 	msm_mux_tsif1_clk,
626 	msm_mux_tsif1_data,
627 	msm_mux_tsif1_en,
628 	msm_mux_tsif1_error,
629 	msm_mux_tsif1_sync,
630 	msm_mux_tsif2_clk,
631 	msm_mux_tsif2_data,
632 	msm_mux_tsif2_en,
633 	msm_mux_tsif2_error,
634 	msm_mux_tsif2_sync,
635 	msm_mux_uim1,
636 	msm_mux_uim2,
637 	msm_mux_uim3,
638 	msm_mux_uim4,
639 	msm_mux_uim_batt,
640 	msm_mux_vfr_1,
641 	msm_mux_gpio,
642 	msm_mux_NA,
643 };
644 
645 static const char * const gpio_groups[] = {
646 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
647 	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
648 	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
649 	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
650 	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
651 	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
652 	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
653 	"gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
654 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
655 	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
656 	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
657 	"gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
658 	"gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
659 	"gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
660 	"gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
661 	"gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
662 	"gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
663 	"gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
664 	"gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
665 	"gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
666 	"gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
667 	"gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
668 	"gpio147", "gpio148", "gpio149"
669 };
670 
671 
672 static const char * const blsp_uart1_groups[] = {
673 	"gpio0", "gpio1", "gpio2", "gpio3",
674 };
675 static const char * const blsp_spi1_groups[] = {
676 	"gpio0", "gpio1", "gpio2", "gpio3",
677 };
678 static const char * const blsp_i2c1_groups[] = {
679 	"gpio2", "gpio3",
680 };
681 static const char * const blsp_uim1_groups[] = {
682 	"gpio0", "gpio1",
683 };
684 static const char * const atest_tsens_groups[] = {
685 	"gpio3",
686 };
687 static const char * const bimc_dte1_groups[] = {
688 	"gpio3", "gpio5",
689 };
690 static const char * const blsp_spi8_groups[] = {
691 	"gpio4", "gpio5", "gpio6", "gpio7",
692 };
693 static const char * const blsp_uart8_groups[] = {
694 	"gpio4", "gpio5", "gpio6", "gpio7",
695 };
696 static const char * const blsp_uim8_groups[] = {
697 	"gpio4", "gpio5",
698 };
699 static const char * const qdss_cti_trig_out_b_groups[] = {
700 	"gpio4",
701 };
702 static const char * const dac_calib0_groups[] = {
703 	"gpio4", "gpio41",
704 };
705 static const char * const bimc_dte0_groups[] = {
706 	"gpio4", "gpio6",
707 };
708 static const char * const qdss_cti_trig_in_b_groups[] = {
709 	"gpio5",
710 };
711 static const char * const dac_calib1_groups[] = {
712 	"gpio5", "gpio42",
713 };
714 static const char * const dac_calib2_groups[] = {
715 	"gpio6", "gpio43",
716 };
717 static const char * const atest_tsens2_groups[] = {
718 	"gpio7",
719 };
720 static const char * const blsp_spi10_groups[] = {
721 	"gpio8", "gpio9", "gpio10", "gpio11",
722 };
723 static const char * const blsp_uart10_groups[] = {
724 	"gpio8", "gpio9", "gpio10", "gpio11",
725 };
726 static const char * const blsp_uim10_groups[] = {
727 	"gpio8", "gpio9",
728 };
729 static const char * const atest_bbrx1_groups[] = {
730 	"gpio8",
731 };
732 static const char * const atest_usb12_groups[] = {
733 	"gpio9",
734 };
735 static const char * const mdp_vsync_groups[] = {
736 	"gpio10", "gpio11", "gpio12",
737 };
738 static const char * const edp_lcd_groups[] = {
739 	"gpio10",
740 };
741 static const char * const blsp_i2c10_groups[] = {
742 	"gpio10", "gpio11",
743 };
744 static const char * const atest_usb11_groups[] = {
745 	"gpio10",
746 };
747 static const char * const atest_gpsadc0_groups[] = {
748 	"gpio11",
749 };
750 static const char * const edp_hot_groups[] = {
751 	"gpio11",
752 };
753 static const char * const atest_usb10_groups[] = {
754 	"gpio11",
755 };
756 static const char * const m_voc_groups[] = {
757 	"gpio12",
758 };
759 static const char * const dac_gpio_groups[] = {
760 	"gpio12",
761 };
762 static const char * const atest_char_groups[] = {
763 	"gpio12",
764 };
765 static const char * const cam_mclk_groups[] = {
766 	"gpio13", "gpio14", "gpio15", "gpio16",
767 };
768 static const char * const pll_bypassnl_groups[] = {
769 	"gpio13",
770 };
771 static const char * const qdss_stm7_groups[] = {
772 	"gpio13",
773 };
774 static const char * const blsp_i2c8_groups[] = {
775 	"gpio6", "gpio7",
776 };
777 static const char * const atest_usb1_groups[] = {
778 	"gpio7",
779 };
780 static const char * const atest_usb13_groups[] = {
781 	"gpio8",
782 };
783 static const char * const atest_bbrx0_groups[] = {
784 	"gpio9",
785 };
786 static const char * const atest_gpsadc1_groups[] = {
787 	"gpio10",
788 };
789 static const char * const qdss_tracedata_b_groups[] = {
790 	"gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19",
791 	"gpio21", "gpio22", "gpio23", "gpio26", "gpio29", "gpio57", "gpio58",
792 	"gpio92", "gpio93",
793 };
794 static const char * const pll_reset_groups[] = {
795 	"gpio14",
796 };
797 static const char * const qdss_stm6_groups[] = {
798 	"gpio14",
799 };
800 static const char * const qdss_stm5_groups[] = {
801 	"gpio15",
802 };
803 static const char * const qdss_stm4_groups[] = {
804 	"gpio16",
805 };
806 static const char * const atest_usb2_groups[] = {
807 	"gpio16",
808 };
809 static const char * const dac_calib3_groups[] = {
810 	"gpio17", "gpio44",
811 };
812 static const char * const cci_i2c_groups[] = {
813 	"gpio17", "gpio18", "gpio19", "gpio20",
814 };
815 static const char * const qdss_stm3_groups[] = {
816 	"gpio17",
817 };
818 static const char * const atest_usb23_groups[] = {
819 	"gpio17",
820 };
821 static const char * const atest_char3_groups[] = {
822 	"gpio17",
823 };
824 static const char * const dac_calib4_groups[] = {
825 	"gpio18", "gpio45",
826 };
827 static const char * const qdss_stm2_groups[] = {
828 	"gpio18",
829 };
830 static const char * const atest_usb22_groups[] = {
831 	"gpio18",
832 };
833 static const char * const atest_char2_groups[] = {
834 	"gpio18",
835 };
836 static const char * const dac_calib5_groups[] = {
837 	"gpio19", "gpio46",
838 };
839 static const char * const qdss_stm1_groups[] = {
840 	"gpio19",
841 };
842 static const char * const atest_usb21_groups[] = {
843 	"gpio19",
844 };
845 static const char * const atest_char1_groups[] = {
846 	"gpio19",
847 };
848 static const char * const dac_calib6_groups[] = {
849 	"gpio20", "gpio47",
850 };
851 static const char * const dbg_out_groups[] = {
852 	"gpio20",
853 };
854 static const char * const qdss_stm0_groups[] = {
855 	"gpio20",
856 };
857 static const char * const atest_usb20_groups[] = {
858 	"gpio20",
859 };
860 static const char * const atest_char0_groups[] = {
861 	"gpio20",
862 };
863 static const char * const dac_calib7_groups[] = {
864 	"gpio21", "gpio48",
865 };
866 static const char * const cci_timer0_groups[] = {
867 	"gpio21",
868 };
869 static const char * const qdss_stm13_groups[] = {
870 	"gpio21",
871 };
872 static const char * const dac_calib8_groups[] = {
873 	"gpio22", "gpio49",
874 };
875 static const char * const cci_timer1_groups[] = {
876 	"gpio22",
877 };
878 static const char * const qdss_stm12_groups[] = {
879 	"gpio22",
880 };
881 static const char * const dac_calib9_groups[] = {
882 	"gpio23", "gpio50",
883 };
884 static const char * const cci_timer2_groups[] = {
885 	"gpio23",
886 };
887 static const char * const qdss_stm11_groups[] = {
888 	"gpio23",
889 };
890 static const char * const dac_calib10_groups[] = {
891 	"gpio24", "gpio51",
892 };
893 static const char * const cci_timer3_groups[] = {
894 	"gpio24",
895 };
896 static const char * const cci_async_groups[] = {
897 	"gpio24", "gpio25", "gpio26",
898 };
899 static const char * const blsp1_spi_groups[] = {
900 	"gpio24", "gpio27", "gpio28", "gpio90",
901 };
902 static const char * const qdss_stm10_groups[] = {
903 	"gpio24",
904 };
905 static const char * const qdss_cti_trig_in_a_groups[] = {
906 	"gpio24",
907 };
908 static const char * const dac_calib11_groups[] = {
909 	"gpio25", "gpio52",
910 };
911 static const char * const cci_timer4_groups[] = {
912 	"gpio25",
913 };
914 static const char * const blsp_spi6_groups[] = {
915 	"gpio25", "gpio26", "gpio27", "gpio28",
916 };
917 static const char * const blsp_uart6_groups[] = {
918 	"gpio25", "gpio26", "gpio27", "gpio28",
919 };
920 static const char * const blsp_uim6_groups[] = {
921 	"gpio25", "gpio26",
922 };
923 static const char * const blsp2_spi_groups[] = {
924 	"gpio25", "gpio29", "gpio30",
925 };
926 static const char * const qdss_stm9_groups[] = {
927 	"gpio25",
928 };
929 static const char * const qdss_cti_trig_out_a_groups[] = {
930 	"gpio25",
931 };
932 static const char * const dac_calib12_groups[] = {
933 	"gpio26", "gpio53",
934 };
935 static const char * const qdss_stm8_groups[] = {
936 	"gpio26",
937 };
938 static const char * const dac_calib13_groups[] = {
939 	"gpio27", "gpio54",
940 };
941 static const char * const blsp_i2c6_groups[] = {
942 	"gpio27", "gpio28",
943 };
944 static const char * const qdss_tracectl_a_groups[] = {
945 	"gpio27",
946 };
947 static const char * const dac_calib14_groups[] = {
948 	"gpio28", "gpio55",
949 };
950 static const char * const qdss_traceclk_a_groups[] = {
951 	"gpio28",
952 };
953 static const char * const dac_calib15_groups[] = {
954 	"gpio29", "gpio56",
955 };
956 static const char * const dac_calib16_groups[] = {
957 	"gpio30", "gpio57",
958 };
959 static const char * const hdmi_rcv_groups[] = {
960 	"gpio30",
961 };
962 static const char * const dac_calib17_groups[] = {
963 	"gpio31", "gpio58",
964 };
965 static const char * const pwr_modem_groups[] = {
966 	"gpio31",
967 };
968 static const char * const hdmi_cec_groups[] = {
969 	"gpio31",
970 };
971 static const char * const pwr_nav_groups[] = {
972 	"gpio32",
973 };
974 static const char * const dac_calib18_groups[] = {
975 	"gpio32", "gpio59",
976 };
977 static const char * const hdmi_ddc_groups[] = {
978 	"gpio32", "gpio33",
979 };
980 static const char * const pwr_crypto_groups[] = {
981 	"gpio33",
982 };
983 static const char * const dac_calib19_groups[] = {
984 	"gpio33", "gpio60",
985 };
986 static const char * const dac_calib20_groups[] = {
987 	"gpio34", "gpio61",
988 };
989 static const char * const hdmi_hot_groups[] = {
990 	"gpio34",
991 };
992 static const char * const dac_calib21_groups[] = {
993 	"gpio35", "gpio62",
994 };
995 static const char * const pci_e0_groups[] = {
996 	"gpio35", "gpio36",
997 };
998 static const char * const dac_calib22_groups[] = {
999 	"gpio36", "gpio63",
1000 };
1001 static const char * const dac_calib23_groups[] = {
1002 	"gpio37", "gpio64",
1003 };
1004 static const char * const blsp_i2c2_groups[] = {
1005 	"gpio43", "gpio44",
1006 };
1007 static const char * const blsp_spi3_groups[] = {
1008 	"gpio45", "gpio46", "gpio47", "gpio48",
1009 };
1010 static const char * const blsp_uart3_groups[] = {
1011 	"gpio45", "gpio46", "gpio47", "gpio48",
1012 };
1013 static const char * const blsp_uim3_groups[] = {
1014 	"gpio45", "gpio46",
1015 };
1016 static const char * const blsp_i2c3_groups[] = {
1017 	"gpio47", "gpio48",
1018 };
1019 static const char * const dac_calib24_groups[] = {
1020 	"gpio38", "gpio65",
1021 };
1022 static const char * const dac_calib25_groups[] = {
1023 	"gpio39", "gpio66",
1024 };
1025 static const char * const tsif1_sync_groups[] = {
1026 	"gpio39",
1027 };
1028 static const char * const sd_write_groups[] = {
1029 	"gpio40",
1030 };
1031 static const char * const tsif1_error_groups[] = {
1032 	"gpio40",
1033 };
1034 static const char * const blsp_spi2_groups[] = {
1035 	"gpio41", "gpio42", "gpio43", "gpio44",
1036 };
1037 static const char * const blsp_uart2_groups[] = {
1038 	"gpio41", "gpio42", "gpio43", "gpio44",
1039 };
1040 static const char * const blsp_uim2_groups[] = {
1041 	"gpio41", "gpio42",
1042 };
1043 static const char * const qdss_cti_groups[] = {
1044 	"gpio41", "gpio42", "gpio100", "gpio101",
1045 };
1046 static const char * const uim3_groups[] = {
1047 	"gpio49", "gpio50", "gpio51", "gpio52",
1048 };
1049 static const char * const blsp_spi9_groups[] = {
1050 	"gpio49", "gpio50", "gpio51", "gpio52",
1051 };
1052 static const char * const blsp_uart9_groups[] = {
1053 	"gpio49", "gpio50", "gpio51", "gpio52",
1054 };
1055 static const char * const blsp_uim9_groups[] = {
1056 	"gpio49", "gpio50",
1057 };
1058 static const char * const blsp10_spi_groups[] = {
1059 	"gpio49", "gpio50", "gpio51", "gpio52", "gpio88",
1060 };
1061 static const char * const blsp_i2c9_groups[] = {
1062 	"gpio51", "gpio52",
1063 };
1064 static const char * const blsp_spi7_groups[] = {
1065 	"gpio53", "gpio54", "gpio55", "gpio56",
1066 };
1067 static const char * const blsp_uart7_groups[] = {
1068 	"gpio53", "gpio54", "gpio55", "gpio56",
1069 };
1070 static const char * const blsp_uim7_groups[] = {
1071 	"gpio53", "gpio54",
1072 };
1073 static const char * const qdss_tracedata_a_groups[] = {
1074 	"gpio53", "gpio54", "gpio63", "gpio64", "gpio65", "gpio66", "gpio67",
1075 	"gpio74", "gpio75", "gpio76", "gpio77", "gpio85", "gpio86", "gpio87",
1076 	"gpio89", "gpio90",
1077 };
1078 static const char * const blsp_i2c7_groups[] = {
1079 	"gpio55", "gpio56",
1080 };
1081 static const char * const qua_mi2s_groups[] = {
1082 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
1083 };
1084 static const char * const gcc_gp1_clk_a_groups[] = {
1085 	"gpio57",
1086 };
1087 static const char * const uim4_groups[] = {
1088 	"gpio58", "gpio59", "gpio60", "gpio61",
1089 };
1090 static const char * const blsp_spi11_groups[] = {
1091 	"gpio58", "gpio59", "gpio60", "gpio61",
1092 };
1093 static const char * const blsp_uart11_groups[] = {
1094 	"gpio58", "gpio59", "gpio60", "gpio61",
1095 };
1096 static const char * const blsp_uim11_groups[] = {
1097 	"gpio58", "gpio59",
1098 };
1099 static const char * const gcc_gp2_clk_a_groups[] = {
1100 	"gpio58",
1101 };
1102 static const char * const gcc_gp3_clk_a_groups[] = {
1103 	"gpio59",
1104 };
1105 static const char * const blsp_i2c11_groups[] = {
1106 	"gpio60", "gpio61",
1107 };
1108 static const char * const cri_trng0_groups[] = {
1109 	"gpio60",
1110 };
1111 static const char * const cri_trng1_groups[] = {
1112 	"gpio61",
1113 };
1114 static const char * const cri_trng_groups[] = {
1115 	"gpio62",
1116 };
1117 static const char * const qdss_stm18_groups[] = {
1118 	"gpio63",
1119 };
1120 static const char * const pri_mi2s_groups[] = {
1121 	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68",
1122 };
1123 static const char * const qdss_stm17_groups[] = {
1124 	"gpio64",
1125 };
1126 static const char * const blsp_spi4_groups[] = {
1127 	"gpio65", "gpio66", "gpio67", "gpio68",
1128 };
1129 static const char * const blsp_uart4_groups[] = {
1130 	"gpio65", "gpio66", "gpio67", "gpio68",
1131 };
1132 static const char * const blsp_uim4_groups[] = {
1133 	"gpio65", "gpio66",
1134 };
1135 static const char * const qdss_stm16_groups[] = {
1136 	"gpio65",
1137 };
1138 static const char * const qdss_stm15_groups[] = {
1139 	"gpio66",
1140 };
1141 static const char * const dac_calib26_groups[] = {
1142 	"gpio67",
1143 };
1144 static const char * const blsp_i2c4_groups[] = {
1145 	"gpio67", "gpio68",
1146 };
1147 static const char * const qdss_stm14_groups[] = {
1148 	"gpio67",
1149 };
1150 static const char * const spkr_i2s_groups[] = {
1151 	"gpio69", "gpio70", "gpio71", "gpio72",
1152 };
1153 static const char * const audio_ref_groups[] = {
1154 	"gpio69",
1155 };
1156 static const char * const lpass_slimbus_groups[] = {
1157 	"gpio70", "gpio71", "gpio72",
1158 };
1159 static const char * const isense_dbg_groups[] = {
1160 	"gpio70",
1161 };
1162 static const char * const tsense_pwm1_groups[] = {
1163 	"gpio71",
1164 };
1165 static const char * const tsense_pwm2_groups[] = {
1166 	"gpio71",
1167 };
1168 static const char * const btfm_slimbus_groups[] = {
1169 	"gpio73", "gpio74",
1170 };
1171 static const char * const ter_mi2s_groups[] = {
1172 	"gpio74", "gpio75", "gpio76", "gpio77", "gpio78",
1173 };
1174 static const char * const qdss_stm22_groups[] = {
1175 	"gpio74",
1176 };
1177 static const char * const qdss_stm21_groups[] = {
1178 	"gpio75",
1179 };
1180 static const char * const qdss_stm20_groups[] = {
1181 	"gpio76",
1182 };
1183 static const char * const qdss_stm19_groups[] = {
1184 	"gpio77",
1185 };
1186 static const char * const ssc_irq_groups[] = {
1187 	"gpio78", "gpio79", "gpio80", "gpio117", "gpio118", "gpio119",
1188 	"gpio120", "gpio121", "gpio122", "gpio123", "gpio124", "gpio125",
1189 };
1190 static const char * const gcc_gp1_clk_b_groups[] = {
1191 	"gpio78",
1192 };
1193 static const char * const sec_mi2s_groups[] = {
1194 	"gpio79", "gpio80", "gpio81", "gpio82", "gpio83",
1195 };
1196 static const char * const blsp_spi5_groups[] = {
1197 	"gpio81", "gpio82", "gpio83", "gpio84",
1198 };
1199 static const char * const blsp_uart5_groups[] = {
1200 	"gpio81", "gpio82", "gpio83", "gpio84",
1201 };
1202 static const char * const blsp_uim5_groups[] = {
1203 	"gpio81", "gpio82",
1204 };
1205 static const char * const gcc_gp2_clk_b_groups[] = {
1206 	"gpio81",
1207 };
1208 static const char * const gcc_gp3_clk_b_groups[] = {
1209 	"gpio82",
1210 };
1211 static const char * const blsp_i2c5_groups[] = {
1212 	"gpio83", "gpio84",
1213 };
1214 static const char * const blsp_spi12_groups[] = {
1215 	"gpio85", "gpio86", "gpio87", "gpio88",
1216 };
1217 static const char * const blsp_uart12_groups[] = {
1218 	"gpio85", "gpio86", "gpio87", "gpio88",
1219 };
1220 static const char * const blsp_uim12_groups[] = {
1221 	"gpio85", "gpio86",
1222 };
1223 static const char * const qdss_stm25_groups[] = {
1224 	"gpio85",
1225 };
1226 static const char * const qdss_stm31_groups[] = {
1227 	"gpio86",
1228 };
1229 static const char * const blsp_i2c12_groups[] = {
1230 	"gpio87", "gpio88",
1231 };
1232 static const char * const qdss_stm30_groups[] = {
1233 	"gpio87",
1234 };
1235 static const char * const qdss_stm29_groups[] = {
1236 	"gpio88",
1237 };
1238 static const char * const tsif1_clk_groups[] = {
1239 	"gpio89",
1240 };
1241 static const char * const qdss_stm28_groups[] = {
1242 	"gpio89",
1243 };
1244 static const char * const tsif1_en_groups[] = {
1245 	"gpio90",
1246 };
1247 static const char * const tsif1_data_groups[] = {
1248 	"gpio91",
1249 };
1250 static const char * const sdc4_cmd_groups[] = {
1251 	"gpio91",
1252 };
1253 static const char * const qdss_stm27_groups[] = {
1254 	"gpio91",
1255 };
1256 static const char * const qdss_traceclk_b_groups[] = {
1257 	"gpio91",
1258 };
1259 static const char * const tsif2_error_groups[] = {
1260 	"gpio92",
1261 };
1262 static const char * const sdc43_groups[] = {
1263 	"gpio92",
1264 };
1265 static const char * const vfr_1_groups[] = {
1266 	"gpio92",
1267 };
1268 static const char * const qdss_stm26_groups[] = {
1269 	"gpio92",
1270 };
1271 static const char * const tsif2_clk_groups[] = {
1272 	"gpio93",
1273 };
1274 static const char * const sdc4_clk_groups[] = {
1275 	"gpio93",
1276 };
1277 static const char * const qdss_stm24_groups[] = {
1278 	"gpio93",
1279 };
1280 static const char * const tsif2_en_groups[] = {
1281 	"gpio94",
1282 };
1283 static const char * const sdc42_groups[] = {
1284 	"gpio94",
1285 };
1286 static const char * const qdss_stm23_groups[] = {
1287 	"gpio94",
1288 };
1289 static const char * const qdss_tracectl_b_groups[] = {
1290 	"gpio94",
1291 };
1292 static const char * const sd_card_groups[] = {
1293 	"gpio95",
1294 };
1295 static const char * const tsif2_data_groups[] = {
1296 	"gpio95",
1297 };
1298 static const char * const sdc41_groups[] = {
1299 	"gpio95",
1300 };
1301 static const char * const tsif2_sync_groups[] = {
1302 	"gpio96",
1303 };
1304 static const char * const sdc40_groups[] = {
1305 	"gpio96",
1306 };
1307 static const char * const mdp_vsync_p_b_groups[] = {
1308 	"gpio97",
1309 };
1310 static const char * const ldo_en_groups[] = {
1311 	"gpio97",
1312 };
1313 static const char * const mdp_vsync_s_b_groups[] = {
1314 	"gpio98",
1315 };
1316 static const char * const ldo_update_groups[] = {
1317 	"gpio98",
1318 };
1319 static const char * const blsp11_uart_tx_b_groups[] = {
1320 	"gpio100",
1321 };
1322 static const char * const blsp11_uart_rx_b_groups[] = {
1323 	"gpio101",
1324 };
1325 static const char * const blsp11_i2c_sda_b_groups[] = {
1326 	"gpio102",
1327 };
1328 static const char * const prng_rosc_groups[] = {
1329 	"gpio102",
1330 };
1331 static const char * const blsp11_i2c_scl_b_groups[] = {
1332 	"gpio103",
1333 };
1334 static const char * const uim2_groups[] = {
1335 	"gpio105", "gpio106", "gpio107", "gpio108",
1336 };
1337 static const char * const uim1_groups[] = {
1338 	"gpio109", "gpio110", "gpio111", "gpio112",
1339 };
1340 static const char * const uim_batt_groups[] = {
1341 	"gpio113",
1342 };
1343 static const char * const pci_e2_groups[] = {
1344 	"gpio114", "gpio115", "gpio116",
1345 };
1346 static const char * const pa_indicator_groups[] = {
1347 	"gpio116",
1348 };
1349 static const char * const adsp_ext_groups[] = {
1350 	"gpio118",
1351 };
1352 static const char * const ddr_bist_groups[] = {
1353 	"gpio121", "gpio122", "gpio123", "gpio124",
1354 };
1355 static const char * const qdss_tracedata_11_groups[] = {
1356 	"gpio123",
1357 };
1358 static const char * const qdss_tracedata_12_groups[] = {
1359 	"gpio124",
1360 };
1361 static const char * const modem_tsync_groups[] = {
1362 	"gpio128",
1363 };
1364 static const char * const nav_dr_groups[] = {
1365 	"gpio128",
1366 };
1367 static const char * const nav_pps_groups[] = {
1368 	"gpio128",
1369 };
1370 static const char * const pci_e1_groups[] = {
1371 	"gpio130", "gpio131", "gpio132",
1372 };
1373 static const char * const gsm_tx_groups[] = {
1374 	"gpio134", "gpio135",
1375 };
1376 static const char * const qspi_cs_groups[] = {
1377 	"gpio138", "gpio141",
1378 };
1379 static const char * const ssbi2_groups[] = {
1380 	"gpio139",
1381 };
1382 static const char * const ssbi1_groups[] = {
1383 	"gpio140",
1384 };
1385 static const char * const mss_lte_groups[] = {
1386 	"gpio144", "gpio145",
1387 };
1388 static const char * const qspi_clk_groups[] = {
1389 	"gpio145",
1390 };
1391 static const char * const qspi0_groups[] = {
1392 	"gpio146",
1393 };
1394 static const char * const qspi1_groups[] = {
1395 	"gpio147",
1396 };
1397 static const char * const qspi2_groups[] = {
1398 	"gpio148",
1399 };
1400 static const char * const qspi3_groups[] = {
1401 	"gpio149",
1402 };
1403 
1404 static const struct pinfunction msm8996_functions[] = {
1405 	MSM_PIN_FUNCTION(adsp_ext),
1406 	MSM_PIN_FUNCTION(atest_bbrx0),
1407 	MSM_PIN_FUNCTION(atest_bbrx1),
1408 	MSM_PIN_FUNCTION(atest_char),
1409 	MSM_PIN_FUNCTION(atest_char0),
1410 	MSM_PIN_FUNCTION(atest_char1),
1411 	MSM_PIN_FUNCTION(atest_char2),
1412 	MSM_PIN_FUNCTION(atest_char3),
1413 	MSM_PIN_FUNCTION(atest_gpsadc0),
1414 	MSM_PIN_FUNCTION(atest_gpsadc1),
1415 	MSM_PIN_FUNCTION(atest_tsens),
1416 	MSM_PIN_FUNCTION(atest_tsens2),
1417 	MSM_PIN_FUNCTION(atest_usb1),
1418 	MSM_PIN_FUNCTION(atest_usb10),
1419 	MSM_PIN_FUNCTION(atest_usb11),
1420 	MSM_PIN_FUNCTION(atest_usb12),
1421 	MSM_PIN_FUNCTION(atest_usb13),
1422 	MSM_PIN_FUNCTION(atest_usb2),
1423 	MSM_PIN_FUNCTION(atest_usb20),
1424 	MSM_PIN_FUNCTION(atest_usb21),
1425 	MSM_PIN_FUNCTION(atest_usb22),
1426 	MSM_PIN_FUNCTION(atest_usb23),
1427 	MSM_PIN_FUNCTION(audio_ref),
1428 	MSM_PIN_FUNCTION(bimc_dte0),
1429 	MSM_PIN_FUNCTION(bimc_dte1),
1430 	MSM_PIN_FUNCTION(blsp10_spi),
1431 	MSM_PIN_FUNCTION(blsp11_i2c_scl_b),
1432 	MSM_PIN_FUNCTION(blsp11_i2c_sda_b),
1433 	MSM_PIN_FUNCTION(blsp11_uart_rx_b),
1434 	MSM_PIN_FUNCTION(blsp11_uart_tx_b),
1435 	MSM_PIN_FUNCTION(blsp1_spi),
1436 	MSM_PIN_FUNCTION(blsp2_spi),
1437 	MSM_PIN_FUNCTION(blsp_i2c1),
1438 	MSM_PIN_FUNCTION(blsp_i2c10),
1439 	MSM_PIN_FUNCTION(blsp_i2c11),
1440 	MSM_PIN_FUNCTION(blsp_i2c12),
1441 	MSM_PIN_FUNCTION(blsp_i2c2),
1442 	MSM_PIN_FUNCTION(blsp_i2c3),
1443 	MSM_PIN_FUNCTION(blsp_i2c4),
1444 	MSM_PIN_FUNCTION(blsp_i2c5),
1445 	MSM_PIN_FUNCTION(blsp_i2c6),
1446 	MSM_PIN_FUNCTION(blsp_i2c7),
1447 	MSM_PIN_FUNCTION(blsp_i2c8),
1448 	MSM_PIN_FUNCTION(blsp_i2c9),
1449 	MSM_PIN_FUNCTION(blsp_spi1),
1450 	MSM_PIN_FUNCTION(blsp_spi10),
1451 	MSM_PIN_FUNCTION(blsp_spi11),
1452 	MSM_PIN_FUNCTION(blsp_spi12),
1453 	MSM_PIN_FUNCTION(blsp_spi2),
1454 	MSM_PIN_FUNCTION(blsp_spi3),
1455 	MSM_PIN_FUNCTION(blsp_spi4),
1456 	MSM_PIN_FUNCTION(blsp_spi5),
1457 	MSM_PIN_FUNCTION(blsp_spi6),
1458 	MSM_PIN_FUNCTION(blsp_spi7),
1459 	MSM_PIN_FUNCTION(blsp_spi8),
1460 	MSM_PIN_FUNCTION(blsp_spi9),
1461 	MSM_PIN_FUNCTION(blsp_uart1),
1462 	MSM_PIN_FUNCTION(blsp_uart10),
1463 	MSM_PIN_FUNCTION(blsp_uart11),
1464 	MSM_PIN_FUNCTION(blsp_uart12),
1465 	MSM_PIN_FUNCTION(blsp_uart2),
1466 	MSM_PIN_FUNCTION(blsp_uart3),
1467 	MSM_PIN_FUNCTION(blsp_uart4),
1468 	MSM_PIN_FUNCTION(blsp_uart5),
1469 	MSM_PIN_FUNCTION(blsp_uart6),
1470 	MSM_PIN_FUNCTION(blsp_uart7),
1471 	MSM_PIN_FUNCTION(blsp_uart8),
1472 	MSM_PIN_FUNCTION(blsp_uart9),
1473 	MSM_PIN_FUNCTION(blsp_uim1),
1474 	MSM_PIN_FUNCTION(blsp_uim10),
1475 	MSM_PIN_FUNCTION(blsp_uim11),
1476 	MSM_PIN_FUNCTION(blsp_uim12),
1477 	MSM_PIN_FUNCTION(blsp_uim2),
1478 	MSM_PIN_FUNCTION(blsp_uim3),
1479 	MSM_PIN_FUNCTION(blsp_uim4),
1480 	MSM_PIN_FUNCTION(blsp_uim5),
1481 	MSM_PIN_FUNCTION(blsp_uim6),
1482 	MSM_PIN_FUNCTION(blsp_uim7),
1483 	MSM_PIN_FUNCTION(blsp_uim8),
1484 	MSM_PIN_FUNCTION(blsp_uim9),
1485 	MSM_PIN_FUNCTION(btfm_slimbus),
1486 	MSM_PIN_FUNCTION(cam_mclk),
1487 	MSM_PIN_FUNCTION(cci_async),
1488 	MSM_PIN_FUNCTION(cci_i2c),
1489 	MSM_PIN_FUNCTION(cci_timer0),
1490 	MSM_PIN_FUNCTION(cci_timer1),
1491 	MSM_PIN_FUNCTION(cci_timer2),
1492 	MSM_PIN_FUNCTION(cci_timer3),
1493 	MSM_PIN_FUNCTION(cci_timer4),
1494 	MSM_PIN_FUNCTION(cri_trng),
1495 	MSM_PIN_FUNCTION(cri_trng0),
1496 	MSM_PIN_FUNCTION(cri_trng1),
1497 	MSM_PIN_FUNCTION(dac_calib0),
1498 	MSM_PIN_FUNCTION(dac_calib1),
1499 	MSM_PIN_FUNCTION(dac_calib10),
1500 	MSM_PIN_FUNCTION(dac_calib11),
1501 	MSM_PIN_FUNCTION(dac_calib12),
1502 	MSM_PIN_FUNCTION(dac_calib13),
1503 	MSM_PIN_FUNCTION(dac_calib14),
1504 	MSM_PIN_FUNCTION(dac_calib15),
1505 	MSM_PIN_FUNCTION(dac_calib16),
1506 	MSM_PIN_FUNCTION(dac_calib17),
1507 	MSM_PIN_FUNCTION(dac_calib18),
1508 	MSM_PIN_FUNCTION(dac_calib19),
1509 	MSM_PIN_FUNCTION(dac_calib2),
1510 	MSM_PIN_FUNCTION(dac_calib20),
1511 	MSM_PIN_FUNCTION(dac_calib21),
1512 	MSM_PIN_FUNCTION(dac_calib22),
1513 	MSM_PIN_FUNCTION(dac_calib23),
1514 	MSM_PIN_FUNCTION(dac_calib24),
1515 	MSM_PIN_FUNCTION(dac_calib25),
1516 	MSM_PIN_FUNCTION(dac_calib26),
1517 	MSM_PIN_FUNCTION(dac_calib3),
1518 	MSM_PIN_FUNCTION(dac_calib4),
1519 	MSM_PIN_FUNCTION(dac_calib5),
1520 	MSM_PIN_FUNCTION(dac_calib6),
1521 	MSM_PIN_FUNCTION(dac_calib7),
1522 	MSM_PIN_FUNCTION(dac_calib8),
1523 	MSM_PIN_FUNCTION(dac_calib9),
1524 	MSM_PIN_FUNCTION(dac_gpio),
1525 	MSM_PIN_FUNCTION(dbg_out),
1526 	MSM_PIN_FUNCTION(ddr_bist),
1527 	MSM_PIN_FUNCTION(edp_hot),
1528 	MSM_PIN_FUNCTION(edp_lcd),
1529 	MSM_PIN_FUNCTION(gcc_gp1_clk_a),
1530 	MSM_PIN_FUNCTION(gcc_gp1_clk_b),
1531 	MSM_PIN_FUNCTION(gcc_gp2_clk_a),
1532 	MSM_PIN_FUNCTION(gcc_gp2_clk_b),
1533 	MSM_PIN_FUNCTION(gcc_gp3_clk_a),
1534 	MSM_PIN_FUNCTION(gcc_gp3_clk_b),
1535 	MSM_PIN_FUNCTION(gpio),
1536 	MSM_PIN_FUNCTION(gsm_tx),
1537 	MSM_PIN_FUNCTION(hdmi_cec),
1538 	MSM_PIN_FUNCTION(hdmi_ddc),
1539 	MSM_PIN_FUNCTION(hdmi_hot),
1540 	MSM_PIN_FUNCTION(hdmi_rcv),
1541 	MSM_PIN_FUNCTION(isense_dbg),
1542 	MSM_PIN_FUNCTION(ldo_en),
1543 	MSM_PIN_FUNCTION(ldo_update),
1544 	MSM_PIN_FUNCTION(lpass_slimbus),
1545 	MSM_PIN_FUNCTION(m_voc),
1546 	MSM_PIN_FUNCTION(mdp_vsync),
1547 	MSM_PIN_FUNCTION(mdp_vsync_p_b),
1548 	MSM_PIN_FUNCTION(mdp_vsync_s_b),
1549 	MSM_PIN_FUNCTION(modem_tsync),
1550 	MSM_PIN_FUNCTION(mss_lte),
1551 	MSM_PIN_FUNCTION(nav_dr),
1552 	MSM_PIN_FUNCTION(nav_pps),
1553 	MSM_PIN_FUNCTION(pa_indicator),
1554 	MSM_PIN_FUNCTION(pci_e0),
1555 	MSM_PIN_FUNCTION(pci_e1),
1556 	MSM_PIN_FUNCTION(pci_e2),
1557 	MSM_PIN_FUNCTION(pll_bypassnl),
1558 	MSM_PIN_FUNCTION(pll_reset),
1559 	MSM_PIN_FUNCTION(pri_mi2s),
1560 	MSM_PIN_FUNCTION(prng_rosc),
1561 	MSM_PIN_FUNCTION(pwr_crypto),
1562 	MSM_PIN_FUNCTION(pwr_modem),
1563 	MSM_PIN_FUNCTION(pwr_nav),
1564 	MSM_PIN_FUNCTION(qdss_cti),
1565 	MSM_PIN_FUNCTION(qdss_cti_trig_in_a),
1566 	MSM_PIN_FUNCTION(qdss_cti_trig_in_b),
1567 	MSM_PIN_FUNCTION(qdss_cti_trig_out_a),
1568 	MSM_PIN_FUNCTION(qdss_cti_trig_out_b),
1569 	MSM_PIN_FUNCTION(qdss_stm0),
1570 	MSM_PIN_FUNCTION(qdss_stm1),
1571 	MSM_PIN_FUNCTION(qdss_stm10),
1572 	MSM_PIN_FUNCTION(qdss_stm11),
1573 	MSM_PIN_FUNCTION(qdss_stm12),
1574 	MSM_PIN_FUNCTION(qdss_stm13),
1575 	MSM_PIN_FUNCTION(qdss_stm14),
1576 	MSM_PIN_FUNCTION(qdss_stm15),
1577 	MSM_PIN_FUNCTION(qdss_stm16),
1578 	MSM_PIN_FUNCTION(qdss_stm17),
1579 	MSM_PIN_FUNCTION(qdss_stm18),
1580 	MSM_PIN_FUNCTION(qdss_stm19),
1581 	MSM_PIN_FUNCTION(qdss_stm2),
1582 	MSM_PIN_FUNCTION(qdss_stm20),
1583 	MSM_PIN_FUNCTION(qdss_stm21),
1584 	MSM_PIN_FUNCTION(qdss_stm22),
1585 	MSM_PIN_FUNCTION(qdss_stm23),
1586 	MSM_PIN_FUNCTION(qdss_stm24),
1587 	MSM_PIN_FUNCTION(qdss_stm25),
1588 	MSM_PIN_FUNCTION(qdss_stm26),
1589 	MSM_PIN_FUNCTION(qdss_stm27),
1590 	MSM_PIN_FUNCTION(qdss_stm28),
1591 	MSM_PIN_FUNCTION(qdss_stm29),
1592 	MSM_PIN_FUNCTION(qdss_stm3),
1593 	MSM_PIN_FUNCTION(qdss_stm30),
1594 	MSM_PIN_FUNCTION(qdss_stm31),
1595 	MSM_PIN_FUNCTION(qdss_stm4),
1596 	MSM_PIN_FUNCTION(qdss_stm5),
1597 	MSM_PIN_FUNCTION(qdss_stm6),
1598 	MSM_PIN_FUNCTION(qdss_stm7),
1599 	MSM_PIN_FUNCTION(qdss_stm8),
1600 	MSM_PIN_FUNCTION(qdss_stm9),
1601 	MSM_PIN_FUNCTION(qdss_traceclk_a),
1602 	MSM_PIN_FUNCTION(qdss_traceclk_b),
1603 	MSM_PIN_FUNCTION(qdss_tracectl_a),
1604 	MSM_PIN_FUNCTION(qdss_tracectl_b),
1605 	MSM_PIN_FUNCTION(qdss_tracedata_11),
1606 	MSM_PIN_FUNCTION(qdss_tracedata_12),
1607 	MSM_PIN_FUNCTION(qdss_tracedata_a),
1608 	MSM_PIN_FUNCTION(qdss_tracedata_b),
1609 	MSM_PIN_FUNCTION(qspi0),
1610 	MSM_PIN_FUNCTION(qspi1),
1611 	MSM_PIN_FUNCTION(qspi2),
1612 	MSM_PIN_FUNCTION(qspi3),
1613 	MSM_PIN_FUNCTION(qspi_clk),
1614 	MSM_PIN_FUNCTION(qspi_cs),
1615 	MSM_PIN_FUNCTION(qua_mi2s),
1616 	MSM_PIN_FUNCTION(sd_card),
1617 	MSM_PIN_FUNCTION(sd_write),
1618 	MSM_PIN_FUNCTION(sdc40),
1619 	MSM_PIN_FUNCTION(sdc41),
1620 	MSM_PIN_FUNCTION(sdc42),
1621 	MSM_PIN_FUNCTION(sdc43),
1622 	MSM_PIN_FUNCTION(sdc4_clk),
1623 	MSM_PIN_FUNCTION(sdc4_cmd),
1624 	MSM_PIN_FUNCTION(sec_mi2s),
1625 	MSM_PIN_FUNCTION(spkr_i2s),
1626 	MSM_PIN_FUNCTION(ssbi1),
1627 	MSM_PIN_FUNCTION(ssbi2),
1628 	MSM_PIN_FUNCTION(ssc_irq),
1629 	MSM_PIN_FUNCTION(ter_mi2s),
1630 	MSM_PIN_FUNCTION(tsense_pwm1),
1631 	MSM_PIN_FUNCTION(tsense_pwm2),
1632 	MSM_PIN_FUNCTION(tsif1_clk),
1633 	MSM_PIN_FUNCTION(tsif1_data),
1634 	MSM_PIN_FUNCTION(tsif1_en),
1635 	MSM_PIN_FUNCTION(tsif1_error),
1636 	MSM_PIN_FUNCTION(tsif1_sync),
1637 	MSM_PIN_FUNCTION(tsif2_clk),
1638 	MSM_PIN_FUNCTION(tsif2_data),
1639 	MSM_PIN_FUNCTION(tsif2_en),
1640 	MSM_PIN_FUNCTION(tsif2_error),
1641 	MSM_PIN_FUNCTION(tsif2_sync),
1642 	MSM_PIN_FUNCTION(uim1),
1643 	MSM_PIN_FUNCTION(uim2),
1644 	MSM_PIN_FUNCTION(uim3),
1645 	MSM_PIN_FUNCTION(uim4),
1646 	MSM_PIN_FUNCTION(uim_batt),
1647 	MSM_PIN_FUNCTION(vfr_1),
1648 };
1649 
1650 static const struct msm_pingroup msm8996_groups[] = {
1651 	PINGROUP(0, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA, NA, NA),
1652 	PINGROUP(1, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA, NA, NA),
1653 	PINGROUP(2, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA, NA, NA),
1654 	PINGROUP(3, blsp_spi1, blsp_uart1, blsp_i2c1, NA, atest_tsens,
1655 		 bimc_dte1, NA, NA, NA),
1656 	PINGROUP(4, blsp_spi8, blsp_uart8, blsp_uim8, NA, qdss_cti_trig_out_b,
1657 		 dac_calib0, bimc_dte0, NA, NA),
1658 	PINGROUP(5, blsp_spi8, blsp_uart8, blsp_uim8, NA, qdss_cti_trig_in_b,
1659 		 dac_calib1, bimc_dte1, NA, NA),
1660 	PINGROUP(6, blsp_spi8, blsp_uart8, blsp_i2c8, NA, dac_calib2,
1661 		 bimc_dte0, NA, NA, NA),
1662 	PINGROUP(7, blsp_spi8, blsp_uart8, blsp_i2c8, NA, atest_tsens2,
1663 		 atest_usb1, NA, NA, NA),
1664 	PINGROUP(8, blsp_spi10, blsp_uart10, blsp_uim10, NA, atest_bbrx1,
1665 		 atest_usb13, NA, NA, NA),
1666 	PINGROUP(9, blsp_spi10, blsp_uart10, blsp_uim10, atest_bbrx0,
1667 		 atest_usb12, NA, NA, NA, NA),
1668 	PINGROUP(10, mdp_vsync, blsp_spi10, blsp_uart10, blsp_i2c10,
1669 		 atest_gpsadc1, atest_usb11, NA, NA, NA),
1670 	PINGROUP(11, mdp_vsync, blsp_spi10, blsp_uart10, blsp_i2c10,
1671 		 atest_gpsadc0, atest_usb10, NA, NA, NA),
1672 	PINGROUP(12, mdp_vsync, m_voc, dac_gpio, atest_char, NA, NA, NA, NA,
1673 		 NA),
1674 	PINGROUP(13, cam_mclk, pll_bypassnl, qdss_stm7, qdss_tracedata_b, NA,
1675 		 NA, NA, NA, NA),
1676 	PINGROUP(14, cam_mclk, pll_reset, qdss_stm6, qdss_tracedata_b, NA, NA,
1677 		 NA, NA, NA),
1678 	PINGROUP(15, cam_mclk, qdss_stm5, qdss_tracedata_b, NA, NA, NA, NA, NA,
1679 		 NA),
1680 	PINGROUP(16, cam_mclk, qdss_stm4, qdss_tracedata_b, NA, atest_usb2, NA,
1681 		 NA, NA, NA),
1682 	PINGROUP(17, cci_i2c, qdss_stm3, qdss_tracedata_b, dac_calib3,
1683 		 atest_usb23, atest_char3, NA, NA, NA),
1684 	PINGROUP(18, cci_i2c, qdss_stm2, qdss_tracedata_b, dac_calib4,
1685 		 atest_usb22, atest_char2, NA, NA, NA),
1686 	PINGROUP(19, cci_i2c, qdss_stm1, qdss_tracedata_b, dac_calib5,
1687 		 atest_usb21, atest_char1, NA, NA, NA),
1688 	PINGROUP(20, cci_i2c, dbg_out, qdss_stm0, dac_calib6, atest_usb20,
1689 		 atest_char0, NA, NA, NA),
1690 	PINGROUP(21, cci_timer0, qdss_stm13, qdss_tracedata_b, dac_calib7, NA,
1691 		 NA, NA, NA, NA),
1692 	PINGROUP(22, cci_timer1, qdss_stm12, qdss_tracedata_b, dac_calib8, NA,
1693 		 NA, NA, NA, NA),
1694 	PINGROUP(23, cci_timer2, blsp1_spi, qdss_stm11, qdss_tracedata_b,
1695 		 dac_calib9, NA, NA, NA, NA),
1696 	PINGROUP(24, cci_timer3, cci_async, blsp1_spi, qdss_stm10,
1697 		 qdss_cti_trig_in_a, dac_calib10, NA, NA, NA),
1698 	PINGROUP(25, cci_timer4, cci_async, blsp_spi6, blsp_uart6, blsp_uim6,
1699 		 blsp2_spi, qdss_stm9, qdss_cti_trig_out_a, dac_calib11),
1700 	PINGROUP(26, cci_async, blsp_spi6, blsp_uart6, blsp_uim6, qdss_stm8,
1701 		 qdss_tracedata_b, dac_calib12, NA, NA),
1702 	PINGROUP(27, blsp_spi6, blsp_uart6, blsp_i2c6, blsp1_spi,
1703 		 qdss_tracectl_a, dac_calib13, NA, NA, NA),
1704 	PINGROUP(28, blsp_spi6, blsp_uart6, blsp_i2c6, blsp1_spi,
1705 		 qdss_traceclk_a, dac_calib14, NA, NA, NA),
1706 	PINGROUP(29, blsp2_spi, NA, qdss_tracedata_b, dac_calib15, NA, NA, NA,
1707 		 NA, NA),
1708 	PINGROUP(30, hdmi_rcv, blsp2_spi, dac_calib16, NA, NA, NA, NA, NA, NA),
1709 	PINGROUP(31, hdmi_cec, pwr_modem, dac_calib17, NA, NA, NA, NA, NA, NA),
1710 	PINGROUP(32, hdmi_ddc, pwr_nav, NA, dac_calib18, NA, NA, NA, NA, NA),
1711 	PINGROUP(33, hdmi_ddc, pwr_crypto, NA, dac_calib19, NA, NA, NA, NA, NA),
1712 	PINGROUP(34, hdmi_hot, NA, dac_calib20, NA, NA, NA, NA, NA, NA),
1713 	PINGROUP(35, pci_e0, NA, dac_calib21, NA, NA, NA, NA, NA, NA),
1714 	PINGROUP(36, pci_e0, NA, dac_calib22, NA, NA, NA, NA, NA, NA),
1715 	PINGROUP(37, NA, dac_calib23, NA, NA, NA, NA, NA, NA, NA),
1716 	PINGROUP(38, NA, dac_calib24, NA, NA, NA, NA, NA, NA, NA),
1717 	PINGROUP(39, tsif1_sync, NA, dac_calib25, NA, NA, NA, NA, NA, NA),
1718 	PINGROUP(40, sd_write, tsif1_error, NA, NA, NA, NA, NA, NA, NA),
1719 	PINGROUP(41, blsp_spi2, blsp_uart2, blsp_uim2, NA, qdss_cti,
1720 		 dac_calib0, NA, NA, NA),
1721 	PINGROUP(42, blsp_spi2, blsp_uart2, blsp_uim2, NA, qdss_cti,
1722 		 dac_calib1, NA, NA, NA),
1723 	PINGROUP(43, blsp_spi2, blsp_uart2, blsp_i2c2, NA, dac_calib2, NA, NA,
1724 		 NA, NA),
1725 	PINGROUP(44, blsp_spi2, blsp_uart2, blsp_i2c2, NA, dac_calib3, NA, NA,
1726 		 NA, NA),
1727 	PINGROUP(45, blsp_spi3, blsp_uart3, blsp_uim3, NA, dac_calib4, NA, NA,
1728 		 NA, NA),
1729 	PINGROUP(46, blsp_spi3, blsp_uart3, blsp_uim3, NA, dac_calib5, NA, NA,
1730 		 NA, NA),
1731 	PINGROUP(47, blsp_spi3, blsp_uart3, blsp_i2c3, dac_calib6, NA, NA, NA,
1732 		 NA, NA),
1733 	PINGROUP(48, blsp_spi3, blsp_uart3, blsp_i2c3, dac_calib7, NA, NA, NA,
1734 		 NA, NA),
1735 	PINGROUP(49, uim3, blsp_spi9, blsp_uart9, blsp_uim9, blsp10_spi,
1736 		 dac_calib8, NA, NA, NA),
1737 	PINGROUP(50, uim3, blsp_spi9, blsp_uart9, blsp_uim9, blsp10_spi,
1738 		 dac_calib9, NA, NA, NA),
1739 	PINGROUP(51, uim3, blsp_spi9, blsp_uart9, blsp_i2c9, blsp10_spi,
1740 		 dac_calib10, NA, NA, NA),
1741 	PINGROUP(52, uim3, blsp_spi9, blsp_uart9, blsp_i2c9,
1742 		 blsp10_spi, dac_calib11, NA, NA, NA),
1743 	PINGROUP(53, blsp_spi7, blsp_uart7, blsp_uim7, NA, qdss_tracedata_a,
1744 		 dac_calib12, NA, NA, NA),
1745 	PINGROUP(54, blsp_spi7, blsp_uart7, blsp_uim7, NA, NA,
1746 		 qdss_tracedata_a, dac_calib13, NA, NA),
1747 	PINGROUP(55, blsp_spi7, blsp_uart7, blsp_i2c7, NA, dac_calib14, NA, NA,
1748 		 NA, NA),
1749 	PINGROUP(56, blsp_spi7, blsp_uart7, blsp_i2c7, NA, dac_calib15, NA, NA,
1750 		 NA, NA),
1751 	PINGROUP(57, qua_mi2s, gcc_gp1_clk_a, NA, qdss_tracedata_b,
1752 		 dac_calib16, NA, NA, NA, NA),
1753 	PINGROUP(58, qua_mi2s, uim4, blsp_spi11, blsp_uart11, blsp_uim11,
1754 		 gcc_gp2_clk_a, NA, qdss_tracedata_b, dac_calib17),
1755 	PINGROUP(59, qua_mi2s, uim4, blsp_spi11, blsp_uart11, blsp_uim11,
1756 		 gcc_gp3_clk_a, NA, dac_calib18, NA),
1757 	PINGROUP(60, qua_mi2s, uim4, blsp_spi11, blsp_uart11, blsp_i2c11,
1758 		 cri_trng0, NA, dac_calib19, NA),
1759 	PINGROUP(61, qua_mi2s, uim4, blsp_spi11, blsp_uart11,
1760 		 blsp_i2c11, cri_trng1, NA, dac_calib20, NA),
1761 	PINGROUP(62, qua_mi2s, cri_trng, NA, dac_calib21, NA, NA, NA, NA, NA),
1762 	PINGROUP(63, qua_mi2s, NA, NA, qdss_stm18, qdss_tracedata_a,
1763 		 dac_calib22, NA, NA, NA),
1764 	PINGROUP(64, pri_mi2s, NA, qdss_stm17, qdss_tracedata_a, dac_calib23,
1765 		 NA, NA, NA, NA),
1766 	PINGROUP(65, pri_mi2s, blsp_spi4, blsp_uart4, blsp_uim4, NA,
1767 		 qdss_stm16, qdss_tracedata_a, dac_calib24, NA),
1768 	PINGROUP(66, pri_mi2s, blsp_spi4, blsp_uart4, blsp_uim4, NA,
1769 		 qdss_stm15, qdss_tracedata_a, dac_calib25, NA),
1770 	PINGROUP(67, pri_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, qdss_stm14,
1771 		 qdss_tracedata_a, dac_calib26, NA, NA),
1772 	PINGROUP(68, pri_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA,
1773 		 NA, NA),
1774 	PINGROUP(69, spkr_i2s, audio_ref, NA, NA, NA, NA, NA, NA, NA),
1775 	PINGROUP(70, lpass_slimbus, spkr_i2s, isense_dbg, NA, NA, NA, NA, NA,
1776 		 NA),
1777 	PINGROUP(71, lpass_slimbus, spkr_i2s, tsense_pwm1, tsense_pwm2, NA, NA,
1778 		 NA, NA, NA),
1779 	PINGROUP(72, lpass_slimbus, spkr_i2s, NA, NA, NA, NA, NA, NA, NA),
1780 	PINGROUP(73, btfm_slimbus, NA, NA, NA, NA, NA, NA, NA, NA),
1781 	PINGROUP(74, btfm_slimbus, ter_mi2s, qdss_stm22, qdss_tracedata_a, NA,
1782 		 NA, NA, NA, NA),
1783 	PINGROUP(75, ter_mi2s, qdss_stm21, qdss_tracedata_a, NA, NA, NA, NA,
1784 		 NA, NA),
1785 	PINGROUP(76, ter_mi2s, qdss_stm20, qdss_tracedata_a, NA, NA, NA, NA,
1786 		 NA, NA),
1787 	PINGROUP(77, ter_mi2s, qdss_stm19, qdss_tracedata_a, NA, NA, NA, NA,
1788 		 NA, NA),
1789 	PINGROUP(78, ter_mi2s, gcc_gp1_clk_b, NA, NA, NA, NA, NA, NA, NA),
1790 	PINGROUP(79, sec_mi2s, NA, NA, NA, NA, NA, NA, NA, NA),
1791 	PINGROUP(80, sec_mi2s, NA, NA, NA, NA, NA, NA, NA, NA),
1792 	PINGROUP(81, sec_mi2s, blsp_spi5, blsp_uart5, blsp_uim5, gcc_gp2_clk_b,
1793 		 NA, NA, NA, NA),
1794 	PINGROUP(82, sec_mi2s, blsp_spi5, blsp_uart5, blsp_uim5, gcc_gp3_clk_b,
1795 		 NA, NA, NA, NA),
1796 	PINGROUP(83, sec_mi2s, blsp_spi5, blsp_uart5, blsp_i2c5, NA, NA, NA,
1797 		 NA, NA),
1798 	PINGROUP(84, blsp_spi5, blsp_uart5, blsp_i2c5, NA, NA, NA, NA, NA, NA),
1799 	PINGROUP(85, blsp_spi12, blsp_uart12, blsp_uim12, NA, qdss_stm25,
1800 		 qdss_tracedata_a, NA, NA, NA),
1801 	PINGROUP(86, blsp_spi12, blsp_uart12, blsp_uim12, NA, NA, qdss_stm31,
1802 		 qdss_tracedata_a, NA, NA),
1803 	PINGROUP(87, blsp_spi12, blsp_uart12, blsp_i2c12, NA, qdss_stm30,
1804 		 qdss_tracedata_a, NA, NA, NA),
1805 	PINGROUP(88, blsp_spi12, blsp_uart12, blsp_i2c12, blsp10_spi, NA,
1806 		 qdss_stm29, NA, NA, NA),
1807 	PINGROUP(89, tsif1_clk, qdss_stm28, qdss_tracedata_a, NA, NA, NA, NA,
1808 		 NA, NA),
1809 	PINGROUP(90, tsif1_en, blsp1_spi, qdss_tracedata_a, NA, NA, NA, NA, NA,
1810 		 NA),
1811 	PINGROUP(91, tsif1_data, sdc4_cmd, qdss_stm27, qdss_traceclk_b, NA, NA,
1812 		 NA, NA, NA),
1813 	PINGROUP(92, tsif2_error, sdc43, vfr_1, qdss_stm26, qdss_tracedata_b,
1814 		 NA, NA, NA, NA),
1815 	PINGROUP(93, tsif2_clk, sdc4_clk, NA, qdss_stm24, qdss_tracedata_b, NA,
1816 		 NA, NA, NA),
1817 	PINGROUP(94, tsif2_en, sdc42, NA, qdss_stm23, qdss_tracectl_b, NA, NA,
1818 		 NA, NA),
1819 	PINGROUP(95, tsif2_data, sdc41, NA, NA, NA, NA, NA, NA, NA),
1820 	PINGROUP(96, tsif2_sync, sdc40, NA, NA, NA, NA, NA, NA, NA),
1821 	PINGROUP(97, NA, NA, mdp_vsync_p_b, ldo_en, NA, NA, NA, NA, NA),
1822 	PINGROUP(98, NA, NA, mdp_vsync_s_b, ldo_update, NA, NA, NA, NA, NA),
1823 	PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1824 	PINGROUP(100, NA, NA, blsp11_uart_tx_b, qdss_cti, NA, NA, NA, NA, NA),
1825 	PINGROUP(101, NA, blsp11_uart_rx_b, qdss_cti, NA, NA, NA, NA, NA, NA),
1826 	PINGROUP(102, NA, blsp11_i2c_sda_b, prng_rosc, NA, NA, NA, NA, NA, NA),
1827 	PINGROUP(103, NA, blsp11_i2c_scl_b, NA, NA, NA, NA, NA, NA, NA),
1828 	PINGROUP(104, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1829 	PINGROUP(105, uim2, NA, NA, NA, NA, NA, NA, NA, NA),
1830 	PINGROUP(106, uim2, NA, NA, NA, NA, NA, NA, NA, NA),
1831 	PINGROUP(107, uim2, NA, NA, NA, NA, NA, NA, NA, NA),
1832 	PINGROUP(108, uim2, NA, NA, NA, NA, NA, NA, NA, NA),
1833 	PINGROUP(109, uim1, NA, NA, NA, NA, NA, NA, NA, NA),
1834 	PINGROUP(110, uim1, NA, NA, NA, NA, NA, NA, NA, NA),
1835 	PINGROUP(111, uim1, NA, NA, NA, NA, NA, NA, NA, NA),
1836 	PINGROUP(112, uim1, NA, NA, NA, NA, NA, NA, NA, NA),
1837 	PINGROUP(113, uim_batt, NA, NA, NA, NA, NA, NA, NA, NA),
1838 	PINGROUP(114, NA, pci_e2, NA, NA, NA, NA, NA, NA, NA),
1839 	PINGROUP(115, NA, pci_e2, NA, NA, NA, NA, NA, NA, NA),
1840 	PINGROUP(116, NA, pa_indicator, NA, NA, NA, NA, NA, NA, NA),
1841 	PINGROUP(117, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1842 	PINGROUP(118, adsp_ext, NA, NA, NA, NA, NA, NA, NA, NA),
1843 	PINGROUP(119, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1844 	PINGROUP(120, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1845 	PINGROUP(121, ddr_bist, NA, NA, NA, NA, NA, NA, NA, NA),
1846 	PINGROUP(122, ddr_bist, NA, NA, NA, NA, NA, NA, NA, NA),
1847 	PINGROUP(123, ddr_bist, qdss_tracedata_11, NA, NA, NA, NA, NA, NA, NA),
1848 	PINGROUP(124, ddr_bist, qdss_tracedata_12, NA, NA, NA, NA, NA, NA, NA),
1849 	PINGROUP(125, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1850 	PINGROUP(126, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1851 	PINGROUP(127, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1852 	PINGROUP(128, NA, modem_tsync, nav_dr, nav_pps, NA, NA, NA, NA, NA),
1853 	PINGROUP(129, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1854 	PINGROUP(130, pci_e1, NA, NA, NA, NA, NA, NA, NA, NA),
1855 	PINGROUP(131, pci_e1, NA, NA, NA, NA, NA, NA, NA, NA),
1856 	PINGROUP(132, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1857 	PINGROUP(133, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1858 	PINGROUP(134, gsm_tx, NA, NA, NA, NA, NA, NA, NA, NA),
1859 	PINGROUP(135, gsm_tx, NA, NA, NA, NA, NA, NA, NA, NA),
1860 	PINGROUP(136, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1861 	PINGROUP(137, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1862 	PINGROUP(138, NA, qspi_cs, NA, NA, NA, NA, NA, NA, NA),
1863 	PINGROUP(139, NA, ssbi2, NA, NA, NA, NA, NA, NA, NA),
1864 	PINGROUP(140, NA, ssbi1, NA, NA, NA, NA, NA, NA, NA),
1865 	PINGROUP(141, NA, qspi_cs, NA, NA, NA, NA, NA, NA, NA),
1866 	PINGROUP(142, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1867 	PINGROUP(143, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1868 	PINGROUP(144, mss_lte, NA, NA, NA, NA, NA, NA, NA, NA),
1869 	PINGROUP(145, mss_lte, qspi_clk, NA, NA, NA, NA, NA, NA, NA),
1870 	PINGROUP(146, NA, qspi0, NA, NA, NA, NA, NA, NA, NA),
1871 	PINGROUP(147, NA, qspi1, NA, NA, NA, NA, NA, NA, NA),
1872 	PINGROUP(148, NA, qspi2, NA, NA, NA, NA, NA, NA, NA),
1873 	PINGROUP(149, NA, qspi3, NA, NA, NA, NA, NA, NA, NA),
1874 	SDC_QDSD_PINGROUP(sdc1_clk, 0x12c000, 13, 6),
1875 	SDC_QDSD_PINGROUP(sdc1_cmd, 0x12c000, 11, 3),
1876 	SDC_QDSD_PINGROUP(sdc1_data, 0x12c000, 9, 0),
1877 	SDC_QDSD_PINGROUP(sdc2_clk, 0x12d000, 14, 6),
1878 	SDC_QDSD_PINGROUP(sdc2_cmd, 0x12d000, 11, 3),
1879 	SDC_QDSD_PINGROUP(sdc2_data, 0x12d000, 9, 0),
1880 	SDC_QDSD_PINGROUP(sdc1_rclk, 0x12c000, 15, 0),
1881 };
1882 
1883 static const struct msm_gpio_wakeirq_map msm8996_mpm_map[] = {
1884 	{ 1, 3 }, { 5, 4 }, { 9, 5 }, { 11, 6 }, { 66, 7 }, { 22, 8 }, { 24, 9 }, { 26, 10 },
1885 	{ 34, 11 }, { 36, 12 }, { 37, 13 }, { 38, 14 }, { 40, 15 }, { 42, 16 }, { 46, 17 },
1886 	{ 50, 18 }, { 53, 19 }, { 54, 20 }, { 56, 21 }, { 57, 22 }, { 58, 23 }, { 59, 24 },
1887 	{ 60, 25 }, { 61, 26 }, { 62, 27 }, { 63, 28 }, { 64, 29 }, { 71, 30 }, { 73, 31 },
1888 	{ 77, 32 }, { 78, 33 }, { 79, 34 }, { 80, 35 }, { 82, 36 }, { 86, 37 }, { 91, 38 },
1889 	{ 92, 39 }, { 95, 40 }, { 97, 41 }, { 101, 42 }, { 104, 43 }, { 106, 44 }, { 108, 45 },
1890 	{ 112, 46 }, { 113, 47 }, { 110, 48 }, { 127, 50 }, { 115, 51 }, { 116, 54 }, { 117, 55 },
1891 	{ 118, 56 }, { 119, 57 }, { 120, 58 }, { 121, 59 }, { 122, 60 }, { 123, 61 }, { 124, 62 },
1892 	{ 125, 63 }, { 126, 64 }, { 129, 65 }, { 131, 66 }, { 132, 67 }, { 133, 68 }, { 145, 69 },
1893 };
1894 
1895 static const struct msm_pinctrl_soc_data msm8996_pinctrl = {
1896 	.pins = msm8996_pins,
1897 	.npins = ARRAY_SIZE(msm8996_pins),
1898 	.functions = msm8996_functions,
1899 	.nfunctions = ARRAY_SIZE(msm8996_functions),
1900 	.groups = msm8996_groups,
1901 	.ngroups = ARRAY_SIZE(msm8996_groups),
1902 	.ngpios = 150,
1903 	.wakeirq_map = msm8996_mpm_map,
1904 	.nwakeirq_map = ARRAY_SIZE(msm8996_mpm_map),
1905 };
1906 
1907 static int msm8996_pinctrl_probe(struct platform_device *pdev)
1908 {
1909 	return msm_pinctrl_probe(pdev, &msm8996_pinctrl);
1910 }
1911 
1912 static const struct of_device_id msm8996_pinctrl_of_match[] = {
1913 	{ .compatible = "qcom,msm8996-pinctrl", },
1914 	{ }
1915 };
1916 
1917 static struct platform_driver msm8996_pinctrl_driver = {
1918 	.driver = {
1919 		.name = "msm8996-pinctrl",
1920 		.of_match_table = msm8996_pinctrl_of_match,
1921 	},
1922 	.probe = msm8996_pinctrl_probe,
1923 	.remove = msm_pinctrl_remove,
1924 };
1925 
1926 static int __init msm8996_pinctrl_init(void)
1927 {
1928 	return platform_driver_register(&msm8996_pinctrl_driver);
1929 }
1930 arch_initcall(msm8996_pinctrl_init);
1931 
1932 static void __exit msm8996_pinctrl_exit(void)
1933 {
1934 	platform_driver_unregister(&msm8996_pinctrl_driver);
1935 }
1936 module_exit(msm8996_pinctrl_exit);
1937 
1938 MODULE_DESCRIPTION("Qualcomm msm8996 pinctrl driver");
1939 MODULE_LICENSE("GPL v2");
1940 MODULE_DEVICE_TABLE(of, msm8996_pinctrl_of_match);
1941