xref: /linux/drivers/pinctrl/qcom/pinctrl-qcs404.c (revision 22ee670a)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2018, 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 static const char * const qcs404_tiles[] = {
13 	"north",
14 	"south",
15 	"east"
16 };
17 
18 enum {
19 	NORTH,
20 	SOUTH,
21 	EAST
22 };
23 
24 #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9)	\
25 	{						\
26 		.grp = PINCTRL_PINGROUP("gpio" #id, 	\
27 			gpio##id##_pins, 		\
28 			ARRAY_SIZE(gpio##id##_pins)),	\
29 		.funcs = (int[]){			\
30 			msm_mux_gpio, /* gpio mode */	\
31 			msm_mux_##f1,			\
32 			msm_mux_##f2,			\
33 			msm_mux_##f3,			\
34 			msm_mux_##f4,			\
35 			msm_mux_##f5,			\
36 			msm_mux_##f6,			\
37 			msm_mux_##f7,			\
38 			msm_mux_##f8,			\
39 			msm_mux_##f9			\
40 		},					\
41 		.nfuncs = 10,				\
42 		.ctl_reg = 0x1000 * id,		\
43 		.io_reg = 0x1000 * id + 0x4,		\
44 		.intr_cfg_reg = 0x1000 * id + 0x8,	\
45 		.intr_status_reg = 0x1000 * id + 0xc,	\
46 		.intr_target_reg = 0x1000 * id + 0x8,	\
47 		.tile = _tile,			\
48 		.mux_bit = 2,			\
49 		.pull_bit = 0,			\
50 		.drv_bit = 6,			\
51 		.oe_bit = 9,			\
52 		.in_bit = 0,			\
53 		.out_bit = 1,			\
54 		.intr_enable_bit = 0,		\
55 		.intr_status_bit = 0,		\
56 		.intr_target_bit = 5,		\
57 		.intr_target_kpss_val = 4,	\
58 		.intr_raw_status_bit = 4,	\
59 		.intr_polarity_bit = 1,		\
60 		.intr_detection_bit = 2,	\
61 		.intr_detection_width = 2,	\
62 	}
63 
64 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)	\
65 	{						\
66 		.grp = PINCTRL_PINGROUP(#pg_name, 	\
67 			pg_name##_pins, 		\
68 			ARRAY_SIZE(pg_name##_pins)),	\
69 		.ctl_reg = ctl,				\
70 		.io_reg = 0,				\
71 		.intr_cfg_reg = 0,			\
72 		.intr_status_reg = 0,			\
73 		.intr_target_reg = 0,			\
74 		.tile = SOUTH,				\
75 		.mux_bit = -1,				\
76 		.pull_bit = pull,			\
77 		.drv_bit = drv,				\
78 		.oe_bit = -1,				\
79 		.in_bit = -1,				\
80 		.out_bit = -1,				\
81 		.intr_enable_bit = -1,			\
82 		.intr_status_bit = -1,			\
83 		.intr_target_bit = -1,			\
84 		.intr_raw_status_bit = -1,		\
85 		.intr_polarity_bit = -1,		\
86 		.intr_detection_bit = -1,		\
87 		.intr_detection_width = -1,		\
88 	}
89 
90 static const struct pinctrl_pin_desc qcs404_pins[] = {
91 	PINCTRL_PIN(0, "GPIO_0"),
92 	PINCTRL_PIN(1, "GPIO_1"),
93 	PINCTRL_PIN(2, "GPIO_2"),
94 	PINCTRL_PIN(3, "GPIO_3"),
95 	PINCTRL_PIN(4, "GPIO_4"),
96 	PINCTRL_PIN(5, "GPIO_5"),
97 	PINCTRL_PIN(6, "GPIO_6"),
98 	PINCTRL_PIN(7, "GPIO_7"),
99 	PINCTRL_PIN(8, "GPIO_8"),
100 	PINCTRL_PIN(9, "GPIO_9"),
101 	PINCTRL_PIN(10, "GPIO_10"),
102 	PINCTRL_PIN(11, "GPIO_11"),
103 	PINCTRL_PIN(12, "GPIO_12"),
104 	PINCTRL_PIN(13, "GPIO_13"),
105 	PINCTRL_PIN(14, "GPIO_14"),
106 	PINCTRL_PIN(15, "GPIO_15"),
107 	PINCTRL_PIN(16, "GPIO_16"),
108 	PINCTRL_PIN(17, "GPIO_17"),
109 	PINCTRL_PIN(18, "GPIO_18"),
110 	PINCTRL_PIN(19, "GPIO_19"),
111 	PINCTRL_PIN(20, "GPIO_20"),
112 	PINCTRL_PIN(21, "GPIO_21"),
113 	PINCTRL_PIN(22, "GPIO_22"),
114 	PINCTRL_PIN(23, "GPIO_23"),
115 	PINCTRL_PIN(24, "GPIO_24"),
116 	PINCTRL_PIN(25, "GPIO_25"),
117 	PINCTRL_PIN(26, "GPIO_26"),
118 	PINCTRL_PIN(27, "GPIO_27"),
119 	PINCTRL_PIN(28, "GPIO_28"),
120 	PINCTRL_PIN(29, "GPIO_29"),
121 	PINCTRL_PIN(30, "GPIO_30"),
122 	PINCTRL_PIN(31, "GPIO_31"),
123 	PINCTRL_PIN(32, "GPIO_32"),
124 	PINCTRL_PIN(33, "GPIO_33"),
125 	PINCTRL_PIN(34, "GPIO_34"),
126 	PINCTRL_PIN(35, "GPIO_35"),
127 	PINCTRL_PIN(36, "GPIO_36"),
128 	PINCTRL_PIN(37, "GPIO_37"),
129 	PINCTRL_PIN(38, "GPIO_38"),
130 	PINCTRL_PIN(39, "GPIO_39"),
131 	PINCTRL_PIN(40, "GPIO_40"),
132 	PINCTRL_PIN(41, "GPIO_41"),
133 	PINCTRL_PIN(42, "GPIO_42"),
134 	PINCTRL_PIN(43, "GPIO_43"),
135 	PINCTRL_PIN(44, "GPIO_44"),
136 	PINCTRL_PIN(45, "GPIO_45"),
137 	PINCTRL_PIN(46, "GPIO_46"),
138 	PINCTRL_PIN(47, "GPIO_47"),
139 	PINCTRL_PIN(48, "GPIO_48"),
140 	PINCTRL_PIN(49, "GPIO_49"),
141 	PINCTRL_PIN(50, "GPIO_50"),
142 	PINCTRL_PIN(51, "GPIO_51"),
143 	PINCTRL_PIN(52, "GPIO_52"),
144 	PINCTRL_PIN(53, "GPIO_53"),
145 	PINCTRL_PIN(54, "GPIO_54"),
146 	PINCTRL_PIN(55, "GPIO_55"),
147 	PINCTRL_PIN(56, "GPIO_56"),
148 	PINCTRL_PIN(57, "GPIO_57"),
149 	PINCTRL_PIN(58, "GPIO_58"),
150 	PINCTRL_PIN(59, "GPIO_59"),
151 	PINCTRL_PIN(60, "GPIO_60"),
152 	PINCTRL_PIN(61, "GPIO_61"),
153 	PINCTRL_PIN(62, "GPIO_62"),
154 	PINCTRL_PIN(63, "GPIO_63"),
155 	PINCTRL_PIN(64, "GPIO_64"),
156 	PINCTRL_PIN(65, "GPIO_65"),
157 	PINCTRL_PIN(66, "GPIO_66"),
158 	PINCTRL_PIN(67, "GPIO_67"),
159 	PINCTRL_PIN(68, "GPIO_68"),
160 	PINCTRL_PIN(69, "GPIO_69"),
161 	PINCTRL_PIN(70, "GPIO_70"),
162 	PINCTRL_PIN(71, "GPIO_71"),
163 	PINCTRL_PIN(72, "GPIO_72"),
164 	PINCTRL_PIN(73, "GPIO_73"),
165 	PINCTRL_PIN(74, "GPIO_74"),
166 	PINCTRL_PIN(75, "GPIO_75"),
167 	PINCTRL_PIN(76, "GPIO_76"),
168 	PINCTRL_PIN(77, "GPIO_77"),
169 	PINCTRL_PIN(78, "GPIO_78"),
170 	PINCTRL_PIN(79, "GPIO_79"),
171 	PINCTRL_PIN(80, "GPIO_80"),
172 	PINCTRL_PIN(81, "GPIO_81"),
173 	PINCTRL_PIN(82, "GPIO_82"),
174 	PINCTRL_PIN(83, "GPIO_83"),
175 	PINCTRL_PIN(84, "GPIO_84"),
176 	PINCTRL_PIN(85, "GPIO_85"),
177 	PINCTRL_PIN(86, "GPIO_86"),
178 	PINCTRL_PIN(87, "GPIO_87"),
179 	PINCTRL_PIN(88, "GPIO_88"),
180 	PINCTRL_PIN(89, "GPIO_89"),
181 	PINCTRL_PIN(90, "GPIO_90"),
182 	PINCTRL_PIN(91, "GPIO_91"),
183 	PINCTRL_PIN(92, "GPIO_92"),
184 	PINCTRL_PIN(93, "GPIO_93"),
185 	PINCTRL_PIN(94, "GPIO_94"),
186 	PINCTRL_PIN(95, "GPIO_95"),
187 	PINCTRL_PIN(96, "GPIO_96"),
188 	PINCTRL_PIN(97, "GPIO_97"),
189 	PINCTRL_PIN(98, "GPIO_98"),
190 	PINCTRL_PIN(99, "GPIO_99"),
191 	PINCTRL_PIN(100, "GPIO_100"),
192 	PINCTRL_PIN(101, "GPIO_101"),
193 	PINCTRL_PIN(102, "GPIO_102"),
194 	PINCTRL_PIN(103, "GPIO_103"),
195 	PINCTRL_PIN(104, "GPIO_104"),
196 	PINCTRL_PIN(105, "GPIO_105"),
197 	PINCTRL_PIN(106, "GPIO_106"),
198 	PINCTRL_PIN(107, "GPIO_107"),
199 	PINCTRL_PIN(108, "GPIO_108"),
200 	PINCTRL_PIN(109, "GPIO_109"),
201 	PINCTRL_PIN(110, "GPIO_110"),
202 	PINCTRL_PIN(111, "GPIO_111"),
203 	PINCTRL_PIN(112, "GPIO_112"),
204 	PINCTRL_PIN(113, "GPIO_113"),
205 	PINCTRL_PIN(114, "GPIO_114"),
206 	PINCTRL_PIN(115, "GPIO_115"),
207 	PINCTRL_PIN(116, "GPIO_116"),
208 	PINCTRL_PIN(117, "GPIO_117"),
209 	PINCTRL_PIN(118, "GPIO_118"),
210 	PINCTRL_PIN(119, "GPIO_119"),
211 	PINCTRL_PIN(120, "SDC1_RCLK"),
212 	PINCTRL_PIN(121, "SDC1_CLK"),
213 	PINCTRL_PIN(122, "SDC1_CMD"),
214 	PINCTRL_PIN(123, "SDC1_DATA"),
215 	PINCTRL_PIN(124, "SDC2_CLK"),
216 	PINCTRL_PIN(125, "SDC2_CMD"),
217 	PINCTRL_PIN(126, "SDC2_DATA"),
218 };
219 
220 #define DECLARE_MSM_GPIO_PINS(pin) \
221 	static const unsigned int gpio##pin##_pins[] = { pin }
222 DECLARE_MSM_GPIO_PINS(0);
223 DECLARE_MSM_GPIO_PINS(1);
224 DECLARE_MSM_GPIO_PINS(2);
225 DECLARE_MSM_GPIO_PINS(3);
226 DECLARE_MSM_GPIO_PINS(4);
227 DECLARE_MSM_GPIO_PINS(5);
228 DECLARE_MSM_GPIO_PINS(6);
229 DECLARE_MSM_GPIO_PINS(7);
230 DECLARE_MSM_GPIO_PINS(8);
231 DECLARE_MSM_GPIO_PINS(9);
232 DECLARE_MSM_GPIO_PINS(10);
233 DECLARE_MSM_GPIO_PINS(11);
234 DECLARE_MSM_GPIO_PINS(12);
235 DECLARE_MSM_GPIO_PINS(13);
236 DECLARE_MSM_GPIO_PINS(14);
237 DECLARE_MSM_GPIO_PINS(15);
238 DECLARE_MSM_GPIO_PINS(16);
239 DECLARE_MSM_GPIO_PINS(17);
240 DECLARE_MSM_GPIO_PINS(18);
241 DECLARE_MSM_GPIO_PINS(19);
242 DECLARE_MSM_GPIO_PINS(20);
243 DECLARE_MSM_GPIO_PINS(21);
244 DECLARE_MSM_GPIO_PINS(22);
245 DECLARE_MSM_GPIO_PINS(23);
246 DECLARE_MSM_GPIO_PINS(24);
247 DECLARE_MSM_GPIO_PINS(25);
248 DECLARE_MSM_GPIO_PINS(26);
249 DECLARE_MSM_GPIO_PINS(27);
250 DECLARE_MSM_GPIO_PINS(28);
251 DECLARE_MSM_GPIO_PINS(29);
252 DECLARE_MSM_GPIO_PINS(30);
253 DECLARE_MSM_GPIO_PINS(31);
254 DECLARE_MSM_GPIO_PINS(32);
255 DECLARE_MSM_GPIO_PINS(33);
256 DECLARE_MSM_GPIO_PINS(34);
257 DECLARE_MSM_GPIO_PINS(35);
258 DECLARE_MSM_GPIO_PINS(36);
259 DECLARE_MSM_GPIO_PINS(37);
260 DECLARE_MSM_GPIO_PINS(38);
261 DECLARE_MSM_GPIO_PINS(39);
262 DECLARE_MSM_GPIO_PINS(40);
263 DECLARE_MSM_GPIO_PINS(41);
264 DECLARE_MSM_GPIO_PINS(42);
265 DECLARE_MSM_GPIO_PINS(43);
266 DECLARE_MSM_GPIO_PINS(44);
267 DECLARE_MSM_GPIO_PINS(45);
268 DECLARE_MSM_GPIO_PINS(46);
269 DECLARE_MSM_GPIO_PINS(47);
270 DECLARE_MSM_GPIO_PINS(48);
271 DECLARE_MSM_GPIO_PINS(49);
272 DECLARE_MSM_GPIO_PINS(50);
273 DECLARE_MSM_GPIO_PINS(51);
274 DECLARE_MSM_GPIO_PINS(52);
275 DECLARE_MSM_GPIO_PINS(53);
276 DECLARE_MSM_GPIO_PINS(54);
277 DECLARE_MSM_GPIO_PINS(55);
278 DECLARE_MSM_GPIO_PINS(56);
279 DECLARE_MSM_GPIO_PINS(57);
280 DECLARE_MSM_GPIO_PINS(58);
281 DECLARE_MSM_GPIO_PINS(59);
282 DECLARE_MSM_GPIO_PINS(60);
283 DECLARE_MSM_GPIO_PINS(61);
284 DECLARE_MSM_GPIO_PINS(62);
285 DECLARE_MSM_GPIO_PINS(63);
286 DECLARE_MSM_GPIO_PINS(64);
287 DECLARE_MSM_GPIO_PINS(65);
288 DECLARE_MSM_GPIO_PINS(66);
289 DECLARE_MSM_GPIO_PINS(67);
290 DECLARE_MSM_GPIO_PINS(68);
291 DECLARE_MSM_GPIO_PINS(69);
292 DECLARE_MSM_GPIO_PINS(70);
293 DECLARE_MSM_GPIO_PINS(71);
294 DECLARE_MSM_GPIO_PINS(72);
295 DECLARE_MSM_GPIO_PINS(73);
296 DECLARE_MSM_GPIO_PINS(74);
297 DECLARE_MSM_GPIO_PINS(75);
298 DECLARE_MSM_GPIO_PINS(76);
299 DECLARE_MSM_GPIO_PINS(77);
300 DECLARE_MSM_GPIO_PINS(78);
301 DECLARE_MSM_GPIO_PINS(79);
302 DECLARE_MSM_GPIO_PINS(80);
303 DECLARE_MSM_GPIO_PINS(81);
304 DECLARE_MSM_GPIO_PINS(82);
305 DECLARE_MSM_GPIO_PINS(83);
306 DECLARE_MSM_GPIO_PINS(84);
307 DECLARE_MSM_GPIO_PINS(85);
308 DECLARE_MSM_GPIO_PINS(86);
309 DECLARE_MSM_GPIO_PINS(87);
310 DECLARE_MSM_GPIO_PINS(88);
311 DECLARE_MSM_GPIO_PINS(89);
312 DECLARE_MSM_GPIO_PINS(90);
313 DECLARE_MSM_GPIO_PINS(91);
314 DECLARE_MSM_GPIO_PINS(92);
315 DECLARE_MSM_GPIO_PINS(93);
316 DECLARE_MSM_GPIO_PINS(94);
317 DECLARE_MSM_GPIO_PINS(95);
318 DECLARE_MSM_GPIO_PINS(96);
319 DECLARE_MSM_GPIO_PINS(97);
320 DECLARE_MSM_GPIO_PINS(98);
321 DECLARE_MSM_GPIO_PINS(99);
322 DECLARE_MSM_GPIO_PINS(100);
323 DECLARE_MSM_GPIO_PINS(101);
324 DECLARE_MSM_GPIO_PINS(102);
325 DECLARE_MSM_GPIO_PINS(103);
326 DECLARE_MSM_GPIO_PINS(104);
327 DECLARE_MSM_GPIO_PINS(105);
328 DECLARE_MSM_GPIO_PINS(106);
329 DECLARE_MSM_GPIO_PINS(107);
330 DECLARE_MSM_GPIO_PINS(108);
331 DECLARE_MSM_GPIO_PINS(109);
332 DECLARE_MSM_GPIO_PINS(110);
333 DECLARE_MSM_GPIO_PINS(111);
334 DECLARE_MSM_GPIO_PINS(112);
335 DECLARE_MSM_GPIO_PINS(113);
336 DECLARE_MSM_GPIO_PINS(114);
337 DECLARE_MSM_GPIO_PINS(115);
338 DECLARE_MSM_GPIO_PINS(116);
339 DECLARE_MSM_GPIO_PINS(117);
340 DECLARE_MSM_GPIO_PINS(118);
341 DECLARE_MSM_GPIO_PINS(119);
342 
343 static const unsigned int sdc1_rclk_pins[] = { 120 };
344 static const unsigned int sdc1_clk_pins[] = { 121 };
345 static const unsigned int sdc1_cmd_pins[] = { 122 };
346 static const unsigned int sdc1_data_pins[] = { 123 };
347 static const unsigned int sdc2_clk_pins[] = { 124 };
348 static const unsigned int sdc2_cmd_pins[] = { 125 };
349 static const unsigned int sdc2_data_pins[] = { 126 };
350 
351 enum qcs404_functions {
352 	msm_mux_gpio,
353 	msm_mux_hdmi_tx,
354 	msm_mux_hdmi_ddc,
355 	msm_mux_blsp_uart_tx_a2,
356 	msm_mux_blsp_spi2,
357 	msm_mux_m_voc,
358 	msm_mux_qdss_cti_trig_in_a0,
359 	msm_mux_blsp_uart_rx_a2,
360 	msm_mux_qdss_tracectl_a,
361 	msm_mux_blsp_uart2,
362 	msm_mux_aud_cdc,
363 	msm_mux_blsp_i2c_sda_a2,
364 	msm_mux_qdss_tracedata_a,
365 	msm_mux_blsp_i2c_scl_a2,
366 	msm_mux_qdss_tracectl_b,
367 	msm_mux_qdss_cti_trig_in_b0,
368 	msm_mux_blsp_uart1,
369 	msm_mux_blsp_spi_mosi_a1,
370 	msm_mux_blsp_spi_miso_a1,
371 	msm_mux_qdss_tracedata_b,
372 	msm_mux_blsp_i2c1,
373 	msm_mux_blsp_spi_cs_n_a1,
374 	msm_mux_gcc_plltest,
375 	msm_mux_blsp_spi_clk_a1,
376 	msm_mux_rgb_data0,
377 	msm_mux_blsp_uart5,
378 	msm_mux_blsp_spi5,
379 	msm_mux_adsp_ext,
380 	msm_mux_rgb_data1,
381 	msm_mux_prng_rosc,
382 	msm_mux_rgb_data2,
383 	msm_mux_blsp_i2c5,
384 	msm_mux_gcc_gp1_clk_b,
385 	msm_mux_rgb_data3,
386 	msm_mux_gcc_gp2_clk_b,
387 	msm_mux_blsp_spi0,
388 	msm_mux_blsp_uart0,
389 	msm_mux_gcc_gp3_clk_b,
390 	msm_mux_blsp_i2c0,
391 	msm_mux_qdss_traceclk_b,
392 	msm_mux_pcie_clk,
393 	msm_mux_nfc_irq,
394 	msm_mux_blsp_spi4,
395 	msm_mux_nfc_dwl,
396 	msm_mux_audio_ts,
397 	msm_mux_rgb_data4,
398 	msm_mux_spi_lcd,
399 	msm_mux_blsp_uart_tx_b2,
400 	msm_mux_gcc_gp3_clk_a,
401 	msm_mux_rgb_data5,
402 	msm_mux_blsp_uart_rx_b2,
403 	msm_mux_blsp_i2c_sda_b2,
404 	msm_mux_blsp_i2c_scl_b2,
405 	msm_mux_pwm_led11,
406 	msm_mux_i2s_3_data0_a,
407 	msm_mux_ebi2_lcd,
408 	msm_mux_i2s_3_data1_a,
409 	msm_mux_i2s_3_data2_a,
410 	msm_mux_atest_char,
411 	msm_mux_pwm_led3,
412 	msm_mux_i2s_3_data3_a,
413 	msm_mux_pwm_led4,
414 	msm_mux_i2s_4,
415 	msm_mux_ebi2_a,
416 	msm_mux_dsd_clk_b,
417 	msm_mux_pwm_led5,
418 	msm_mux_pwm_led6,
419 	msm_mux_pwm_led7,
420 	msm_mux_pwm_led8,
421 	msm_mux_pwm_led24,
422 	msm_mux_spkr_dac0,
423 	msm_mux_blsp_i2c4,
424 	msm_mux_pwm_led9,
425 	msm_mux_pwm_led10,
426 	msm_mux_spdifrx_opt,
427 	msm_mux_pwm_led12,
428 	msm_mux_pwm_led13,
429 	msm_mux_pwm_led14,
430 	msm_mux_wlan1_adc1,
431 	msm_mux_rgb_data_b0,
432 	msm_mux_pwm_led15,
433 	msm_mux_blsp_spi_mosi_b1,
434 	msm_mux_wlan1_adc0,
435 	msm_mux_rgb_data_b1,
436 	msm_mux_pwm_led16,
437 	msm_mux_blsp_spi_miso_b1,
438 	msm_mux_qdss_cti_trig_out_b0,
439 	msm_mux_wlan2_adc1,
440 	msm_mux_rgb_data_b2,
441 	msm_mux_pwm_led17,
442 	msm_mux_blsp_spi_cs_n_b1,
443 	msm_mux_wlan2_adc0,
444 	msm_mux_rgb_data_b3,
445 	msm_mux_pwm_led18,
446 	msm_mux_blsp_spi_clk_b1,
447 	msm_mux_rgb_data_b4,
448 	msm_mux_pwm_led19,
449 	msm_mux_ext_mclk1_b,
450 	msm_mux_qdss_traceclk_a,
451 	msm_mux_rgb_data_b5,
452 	msm_mux_pwm_led20,
453 	msm_mux_atest_char3,
454 	msm_mux_i2s_3_sck_b,
455 	msm_mux_ldo_update,
456 	msm_mux_bimc_dte0,
457 	msm_mux_rgb_hsync,
458 	msm_mux_pwm_led21,
459 	msm_mux_i2s_3_ws_b,
460 	msm_mux_dbg_out,
461 	msm_mux_rgb_vsync,
462 	msm_mux_i2s_3_data0_b,
463 	msm_mux_ldo_en,
464 	msm_mux_hdmi_dtest,
465 	msm_mux_rgb_de,
466 	msm_mux_i2s_3_data1_b,
467 	msm_mux_hdmi_lbk9,
468 	msm_mux_rgb_clk,
469 	msm_mux_atest_char1,
470 	msm_mux_i2s_3_data2_b,
471 	msm_mux_ebi_cdc,
472 	msm_mux_hdmi_lbk8,
473 	msm_mux_rgb_mdp,
474 	msm_mux_atest_char0,
475 	msm_mux_i2s_3_data3_b,
476 	msm_mux_hdmi_lbk7,
477 	msm_mux_rgb_data_b6,
478 	msm_mux_rgb_data_b7,
479 	msm_mux_hdmi_lbk6,
480 	msm_mux_rgmii_int,
481 	msm_mux_cri_trng1,
482 	msm_mux_rgmii_wol,
483 	msm_mux_cri_trng0,
484 	msm_mux_gcc_tlmm,
485 	msm_mux_rgmii_ck,
486 	msm_mux_rgmii_tx,
487 	msm_mux_hdmi_lbk5,
488 	msm_mux_hdmi_pixel,
489 	msm_mux_hdmi_rcv,
490 	msm_mux_hdmi_lbk4,
491 	msm_mux_rgmii_ctl,
492 	msm_mux_ext_lpass,
493 	msm_mux_rgmii_rx,
494 	msm_mux_cri_trng,
495 	msm_mux_hdmi_lbk3,
496 	msm_mux_hdmi_lbk2,
497 	msm_mux_qdss_cti_trig_out_b1,
498 	msm_mux_rgmii_mdio,
499 	msm_mux_hdmi_lbk1,
500 	msm_mux_rgmii_mdc,
501 	msm_mux_hdmi_lbk0,
502 	msm_mux_ir_in,
503 	msm_mux_wsa_en,
504 	msm_mux_rgb_data6,
505 	msm_mux_rgb_data7,
506 	msm_mux_atest_char2,
507 	msm_mux_ebi_ch0,
508 	msm_mux_blsp_uart3,
509 	msm_mux_blsp_spi3,
510 	msm_mux_sd_write,
511 	msm_mux_blsp_i2c3,
512 	msm_mux_gcc_gp1_clk_a,
513 	msm_mux_qdss_cti_trig_in_b1,
514 	msm_mux_gcc_gp2_clk_a,
515 	msm_mux_ext_mclk0,
516 	msm_mux_mclk_in1,
517 	msm_mux_i2s_1,
518 	msm_mux_dsd_clk_a,
519 	msm_mux_qdss_cti_trig_in_a1,
520 	msm_mux_rgmi_dll1,
521 	msm_mux_pwm_led22,
522 	msm_mux_pwm_led23,
523 	msm_mux_qdss_cti_trig_out_a0,
524 	msm_mux_rgmi_dll2,
525 	msm_mux_pwm_led1,
526 	msm_mux_qdss_cti_trig_out_a1,
527 	msm_mux_pwm_led2,
528 	msm_mux_i2s_2,
529 	msm_mux_pll_bist,
530 	msm_mux_ext_mclk1_a,
531 	msm_mux_mclk_in2,
532 	msm_mux_bimc_dte1,
533 	msm_mux_i2s_3_sck_a,
534 	msm_mux_i2s_3_ws_a,
535 	msm_mux__,
536 };
537 
538 static const char * const gpio_groups[] = {
539 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
540 	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
541 	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
542 	"gpio21", "gpio21", "gpio22", "gpio22", "gpio23", "gpio23", "gpio24",
543 	"gpio25", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31",
544 	"gpio32", "gpio33", "gpio34", "gpio35", "gpio36", "gpio36", "gpio36",
545 	"gpio36", "gpio37", "gpio37", "gpio37", "gpio38", "gpio38", "gpio38",
546 	"gpio39", "gpio39", "gpio40", "gpio40", "gpio41", "gpio41", "gpio41",
547 	"gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48",
548 	"gpio49", "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55",
549 	"gpio56", "gpio57", "gpio58", "gpio59", "gpio59", "gpio60", "gpio61",
550 	"gpio62", "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68",
551 	"gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75",
552 	"gpio76", "gpio77", "gpio77", "gpio78", "gpio78", "gpio78", "gpio79",
553 	"gpio79", "gpio79", "gpio80", "gpio81", "gpio81", "gpio82", "gpio83",
554 	"gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
555 	"gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97",
556 	"gpio98", "gpio99", "gpio100", "gpio101", "gpio102", "gpio103",
557 	"gpio104", "gpio105", "gpio106", "gpio107", "gpio108", "gpio108",
558 	"gpio108", "gpio109", "gpio109", "gpio110", "gpio111", "gpio112",
559 	"gpio113", "gpio114", "gpio115", "gpio116", "gpio117", "gpio118",
560 	"gpio119",
561 };
562 
563 static const char * const hdmi_tx_groups[] = {
564 	"gpio14",
565 };
566 
567 static const char * const hdmi_ddc_groups[] = {
568 	"gpio15", "gpio16",
569 };
570 
571 static const char * const blsp_uart_tx_a2_groups[] = {
572 	"gpio17",
573 };
574 
575 static const char * const blsp_spi2_groups[] = {
576 	"gpio17", "gpio18", "gpio19", "gpio20",
577 };
578 
579 static const char * const m_voc_groups[] = {
580 	"gpio17", "gpio21",
581 };
582 
583 static const char * const qdss_cti_trig_in_a0_groups[] = {
584 	"gpio17",
585 };
586 
587 static const char * const blsp_uart_rx_a2_groups[] = {
588 	"gpio18",
589 };
590 
591 static const char * const qdss_tracectl_a_groups[] = {
592 	"gpio18",
593 };
594 
595 static const char * const blsp_uart2_groups[] = {
596 	"gpio19", "gpio20",
597 };
598 
599 static const char * const aud_cdc_groups[] = {
600 	"gpio19", "gpio20",
601 };
602 
603 static const char * const blsp_i2c_sda_a2_groups[] = {
604 	"gpio19",
605 };
606 
607 static const char * const qdss_tracedata_a_groups[] = {
608 	"gpio19", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio30",
609 	"gpio31", "gpio32", "gpio36", "gpio38", "gpio39", "gpio42", "gpio43",
610 	"gpio82", "gpio83",
611 };
612 
613 static const char * const blsp_i2c_scl_a2_groups[] = {
614 	"gpio20",
615 };
616 
617 static const char * const qdss_tracectl_b_groups[] = {
618 	"gpio20",
619 };
620 
621 static const char * const qdss_cti_trig_in_b0_groups[] = {
622 	"gpio21",
623 };
624 
625 static const char * const blsp_uart1_groups[] = {
626 	"gpio22", "gpio23", "gpio24", "gpio25",
627 };
628 
629 static const char * const blsp_spi_mosi_a1_groups[] = {
630 	"gpio22",
631 };
632 
633 static const char * const blsp_spi_miso_a1_groups[] = {
634 	"gpio23",
635 };
636 
637 static const char * const qdss_tracedata_b_groups[] = {
638 	"gpio23", "gpio35", "gpio40", "gpio41", "gpio44", "gpio45", "gpio46",
639 	"gpio47", "gpio49", "gpio50", "gpio55", "gpio61", "gpio62", "gpio85",
640 	"gpio89", "gpio93",
641 };
642 
643 static const char * const blsp_i2c1_groups[] = {
644 	"gpio24", "gpio25",
645 };
646 
647 static const char * const blsp_spi_cs_n_a1_groups[] = {
648 	"gpio24",
649 };
650 
651 static const char * const gcc_plltest_groups[] = {
652 	"gpio24", "gpio25",
653 };
654 
655 static const char * const blsp_spi_clk_a1_groups[] = {
656 	"gpio25",
657 };
658 
659 static const char * const rgb_data0_groups[] = {
660 	"gpio26", "gpio41",
661 };
662 
663 static const char * const blsp_uart5_groups[] = {
664 	"gpio26", "gpio27", "gpio28", "gpio29",
665 };
666 
667 static const char * const blsp_spi5_groups[] = {
668 	"gpio26", "gpio27", "gpio28", "gpio29", "gpio44", "gpio45", "gpio46",
669 };
670 
671 static const char * const adsp_ext_groups[] = {
672 	"gpio26",
673 };
674 
675 static const char * const rgb_data1_groups[] = {
676 	"gpio27", "gpio42",
677 };
678 
679 static const char * const prng_rosc_groups[] = {
680 	"gpio27",
681 };
682 
683 static const char * const rgb_data2_groups[] = {
684 	"gpio28", "gpio43",
685 };
686 
687 static const char * const blsp_i2c5_groups[] = {
688 	"gpio28", "gpio29",
689 };
690 
691 static const char * const gcc_gp1_clk_b_groups[] = {
692 	"gpio28",
693 };
694 
695 static const char * const rgb_data3_groups[] = {
696 	"gpio29", "gpio44",
697 };
698 
699 static const char * const gcc_gp2_clk_b_groups[] = {
700 	"gpio29",
701 };
702 
703 static const char * const blsp_spi0_groups[] = {
704 	"gpio30", "gpio31", "gpio32", "gpio33",
705 };
706 
707 static const char * const blsp_uart0_groups[] = {
708 	"gpio30", "gpio31", "gpio32", "gpio33",
709 };
710 
711 static const char * const gcc_gp3_clk_b_groups[] = {
712 	"gpio30",
713 };
714 
715 static const char * const blsp_i2c0_groups[] = {
716 	"gpio32", "gpio33",
717 };
718 
719 static const char * const qdss_traceclk_b_groups[] = {
720 	"gpio34",
721 };
722 
723 static const char * const pcie_clk_groups[] = {
724 	"gpio35",
725 };
726 
727 static const char * const nfc_irq_groups[] = {
728 	"gpio37",
729 };
730 
731 static const char * const blsp_spi4_groups[] = {
732 	"gpio37", "gpio38", "gpio117", "gpio118",
733 };
734 
735 static const char * const nfc_dwl_groups[] = {
736 	"gpio38",
737 };
738 
739 static const char * const audio_ts_groups[] = {
740 	"gpio38",
741 };
742 
743 static const char * const rgb_data4_groups[] = {
744 	"gpio39", "gpio45",
745 };
746 
747 static const char * const spi_lcd_groups[] = {
748 	"gpio39", "gpio40",
749 };
750 
751 static const char * const blsp_uart_tx_b2_groups[] = {
752 	"gpio39",
753 };
754 
755 static const char * const gcc_gp3_clk_a_groups[] = {
756 	"gpio39",
757 };
758 
759 static const char * const rgb_data5_groups[] = {
760 	"gpio40", "gpio46",
761 };
762 
763 static const char * const blsp_uart_rx_b2_groups[] = {
764 	"gpio40",
765 };
766 
767 static const char * const blsp_i2c_sda_b2_groups[] = {
768 	"gpio41",
769 };
770 
771 static const char * const blsp_i2c_scl_b2_groups[] = {
772 	"gpio42",
773 };
774 
775 static const char * const pwm_led11_groups[] = {
776 	"gpio43",
777 };
778 
779 static const char * const i2s_3_data0_a_groups[] = {
780 	"gpio106",
781 };
782 
783 static const char * const ebi2_lcd_groups[] = {
784 	"gpio106", "gpio107", "gpio108", "gpio109",
785 };
786 
787 static const char * const i2s_3_data1_a_groups[] = {
788 	"gpio107",
789 };
790 
791 static const char * const i2s_3_data2_a_groups[] = {
792 	"gpio108",
793 };
794 
795 static const char * const atest_char_groups[] = {
796 	"gpio108",
797 };
798 
799 static const char * const pwm_led3_groups[] = {
800 	"gpio108",
801 };
802 
803 static const char * const i2s_3_data3_a_groups[] = {
804 	"gpio109",
805 };
806 
807 static const char * const pwm_led4_groups[] = {
808 	"gpio109",
809 };
810 
811 static const char * const i2s_4_groups[] = {
812 	"gpio110", "gpio111", "gpio111", "gpio112", "gpio112", "gpio113",
813 	"gpio113", "gpio114", "gpio114", "gpio115", "gpio115", "gpio116",
814 };
815 
816 static const char * const ebi2_a_groups[] = {
817 	"gpio110",
818 };
819 
820 static const char * const dsd_clk_b_groups[] = {
821 	"gpio110",
822 };
823 
824 static const char * const pwm_led5_groups[] = {
825 	"gpio110",
826 };
827 
828 static const char * const pwm_led6_groups[] = {
829 	"gpio111",
830 };
831 
832 static const char * const pwm_led7_groups[] = {
833 	"gpio112",
834 };
835 
836 static const char * const pwm_led8_groups[] = {
837 	"gpio113",
838 };
839 
840 static const char * const pwm_led24_groups[] = {
841 	"gpio114",
842 };
843 
844 static const char * const spkr_dac0_groups[] = {
845 	"gpio116",
846 };
847 
848 static const char * const blsp_i2c4_groups[] = {
849 	"gpio117", "gpio118",
850 };
851 
852 static const char * const pwm_led9_groups[] = {
853 	"gpio117",
854 };
855 
856 static const char * const pwm_led10_groups[] = {
857 	"gpio118",
858 };
859 
860 static const char * const spdifrx_opt_groups[] = {
861 	"gpio119",
862 };
863 
864 static const char * const pwm_led12_groups[] = {
865 	"gpio44",
866 };
867 
868 static const char * const pwm_led13_groups[] = {
869 	"gpio45",
870 };
871 
872 static const char * const pwm_led14_groups[] = {
873 	"gpio46",
874 };
875 
876 static const char * const wlan1_adc1_groups[] = {
877 	"gpio46",
878 };
879 
880 static const char * const rgb_data_b0_groups[] = {
881 	"gpio47",
882 };
883 
884 static const char * const pwm_led15_groups[] = {
885 	"gpio47",
886 };
887 
888 static const char * const blsp_spi_mosi_b1_groups[] = {
889 	"gpio47",
890 };
891 
892 static const char * const wlan1_adc0_groups[] = {
893 	"gpio47",
894 };
895 
896 static const char * const rgb_data_b1_groups[] = {
897 	"gpio48",
898 };
899 
900 static const char * const pwm_led16_groups[] = {
901 	"gpio48",
902 };
903 
904 static const char * const blsp_spi_miso_b1_groups[] = {
905 	"gpio48",
906 };
907 
908 static const char * const qdss_cti_trig_out_b0_groups[] = {
909 	"gpio48",
910 };
911 
912 static const char * const wlan2_adc1_groups[] = {
913 	"gpio48",
914 };
915 
916 static const char * const rgb_data_b2_groups[] = {
917 	"gpio49",
918 };
919 
920 static const char * const pwm_led17_groups[] = {
921 	"gpio49",
922 };
923 
924 static const char * const blsp_spi_cs_n_b1_groups[] = {
925 	"gpio49",
926 };
927 
928 static const char * const wlan2_adc0_groups[] = {
929 	"gpio49",
930 };
931 
932 static const char * const rgb_data_b3_groups[] = {
933 	"gpio50",
934 };
935 
936 static const char * const pwm_led18_groups[] = {
937 	"gpio50",
938 };
939 
940 static const char * const blsp_spi_clk_b1_groups[] = {
941 	"gpio50",
942 };
943 
944 static const char * const rgb_data_b4_groups[] = {
945 	"gpio51",
946 };
947 
948 static const char * const pwm_led19_groups[] = {
949 	"gpio51",
950 };
951 
952 static const char * const ext_mclk1_b_groups[] = {
953 	"gpio51",
954 };
955 
956 static const char * const qdss_traceclk_a_groups[] = {
957 	"gpio51",
958 };
959 
960 static const char * const rgb_data_b5_groups[] = {
961 	"gpio52",
962 };
963 
964 static const char * const pwm_led20_groups[] = {
965 	"gpio52",
966 };
967 
968 static const char * const atest_char3_groups[] = {
969 	"gpio52",
970 };
971 
972 static const char * const i2s_3_sck_b_groups[] = {
973 	"gpio52",
974 };
975 
976 static const char * const ldo_update_groups[] = {
977 	"gpio52",
978 };
979 
980 static const char * const bimc_dte0_groups[] = {
981 	"gpio52", "gpio54",
982 };
983 
984 static const char * const rgb_hsync_groups[] = {
985 	"gpio53",
986 };
987 
988 static const char * const pwm_led21_groups[] = {
989 	"gpio53",
990 };
991 
992 static const char * const i2s_3_ws_b_groups[] = {
993 	"gpio53",
994 };
995 
996 static const char * const dbg_out_groups[] = {
997 	"gpio53",
998 };
999 
1000 static const char * const rgb_vsync_groups[] = {
1001 	"gpio54",
1002 };
1003 
1004 static const char * const i2s_3_data0_b_groups[] = {
1005 	"gpio54",
1006 };
1007 
1008 static const char * const ldo_en_groups[] = {
1009 	"gpio54",
1010 };
1011 
1012 static const char * const hdmi_dtest_groups[] = {
1013 	"gpio54",
1014 };
1015 
1016 static const char * const rgb_de_groups[] = {
1017 	"gpio55",
1018 };
1019 
1020 static const char * const i2s_3_data1_b_groups[] = {
1021 	"gpio55",
1022 };
1023 
1024 static const char * const hdmi_lbk9_groups[] = {
1025 	"gpio55",
1026 };
1027 
1028 static const char * const rgb_clk_groups[] = {
1029 	"gpio56",
1030 };
1031 
1032 static const char * const atest_char1_groups[] = {
1033 	"gpio56",
1034 };
1035 
1036 static const char * const i2s_3_data2_b_groups[] = {
1037 	"gpio56",
1038 };
1039 
1040 static const char * const ebi_cdc_groups[] = {
1041 	"gpio56", "gpio58", "gpio106", "gpio107", "gpio108", "gpio111",
1042 };
1043 
1044 static const char * const hdmi_lbk8_groups[] = {
1045 	"gpio56",
1046 };
1047 
1048 static const char * const rgb_mdp_groups[] = {
1049 	"gpio57",
1050 };
1051 
1052 static const char * const atest_char0_groups[] = {
1053 	"gpio57",
1054 };
1055 
1056 static const char * const i2s_3_data3_b_groups[] = {
1057 	"gpio57",
1058 };
1059 
1060 static const char * const hdmi_lbk7_groups[] = {
1061 	"gpio57",
1062 };
1063 
1064 static const char * const rgb_data_b6_groups[] = {
1065 	"gpio58",
1066 };
1067 
1068 static const char * const rgb_data_b7_groups[] = {
1069 	"gpio59",
1070 };
1071 
1072 static const char * const hdmi_lbk6_groups[] = {
1073 	"gpio59",
1074 };
1075 
1076 static const char * const rgmii_int_groups[] = {
1077 	"gpio61",
1078 };
1079 
1080 static const char * const cri_trng1_groups[] = {
1081 	"gpio61",
1082 };
1083 
1084 static const char * const rgmii_wol_groups[] = {
1085 	"gpio62",
1086 };
1087 
1088 static const char * const cri_trng0_groups[] = {
1089 	"gpio62",
1090 };
1091 
1092 static const char * const gcc_tlmm_groups[] = {
1093 	"gpio62",
1094 };
1095 
1096 static const char * const rgmii_ck_groups[] = {
1097 	"gpio63", "gpio69",
1098 };
1099 
1100 static const char * const rgmii_tx_groups[] = {
1101 	"gpio64", "gpio65", "gpio66", "gpio67",
1102 };
1103 
1104 static const char * const hdmi_lbk5_groups[] = {
1105 	"gpio64",
1106 };
1107 
1108 static const char * const hdmi_pixel_groups[] = {
1109 	"gpio65",
1110 };
1111 
1112 static const char * const hdmi_rcv_groups[] = {
1113 	"gpio66",
1114 };
1115 
1116 static const char * const hdmi_lbk4_groups[] = {
1117 	"gpio67",
1118 };
1119 
1120 static const char * const rgmii_ctl_groups[] = {
1121 	"gpio68", "gpio74",
1122 };
1123 
1124 static const char * const ext_lpass_groups[] = {
1125 	"gpio69",
1126 };
1127 
1128 static const char * const rgmii_rx_groups[] = {
1129 	"gpio70", "gpio71", "gpio72", "gpio73",
1130 };
1131 
1132 static const char * const cri_trng_groups[] = {
1133 	"gpio70",
1134 };
1135 
1136 static const char * const hdmi_lbk3_groups[] = {
1137 	"gpio71",
1138 };
1139 
1140 static const char * const hdmi_lbk2_groups[] = {
1141 	"gpio72",
1142 };
1143 
1144 static const char * const qdss_cti_trig_out_b1_groups[] = {
1145 	"gpio73",
1146 };
1147 
1148 static const char * const rgmii_mdio_groups[] = {
1149 	"gpio75",
1150 };
1151 
1152 static const char * const hdmi_lbk1_groups[] = {
1153 	"gpio75",
1154 };
1155 
1156 static const char * const rgmii_mdc_groups[] = {
1157 	"gpio76",
1158 };
1159 
1160 static const char * const hdmi_lbk0_groups[] = {
1161 	"gpio76",
1162 };
1163 
1164 static const char * const ir_in_groups[] = {
1165 	"gpio77",
1166 };
1167 
1168 static const char * const wsa_en_groups[] = {
1169 	"gpio77",
1170 };
1171 
1172 static const char * const rgb_data6_groups[] = {
1173 	"gpio78", "gpio80",
1174 };
1175 
1176 static const char * const rgb_data7_groups[] = {
1177 	"gpio79", "gpio81",
1178 };
1179 
1180 static const char * const atest_char2_groups[] = {
1181 	"gpio80",
1182 };
1183 
1184 static const char * const ebi_ch0_groups[] = {
1185 	"gpio81",
1186 };
1187 
1188 static const char * const blsp_uart3_groups[] = {
1189 	"gpio82", "gpio83", "gpio84", "gpio85",
1190 };
1191 
1192 static const char * const blsp_spi3_groups[] = {
1193 	"gpio82", "gpio83", "gpio84", "gpio85",
1194 };
1195 
1196 static const char * const sd_write_groups[] = {
1197 	"gpio82",
1198 };
1199 
1200 static const char * const blsp_i2c3_groups[] = {
1201 	"gpio84", "gpio85",
1202 };
1203 
1204 static const char * const gcc_gp1_clk_a_groups[] = {
1205 	"gpio84",
1206 };
1207 
1208 static const char * const qdss_cti_trig_in_b1_groups[] = {
1209 	"gpio84",
1210 };
1211 
1212 static const char * const gcc_gp2_clk_a_groups[] = {
1213 	"gpio85",
1214 };
1215 
1216 static const char * const ext_mclk0_groups[] = {
1217 	"gpio86",
1218 };
1219 
1220 static const char * const mclk_in1_groups[] = {
1221 	"gpio86",
1222 };
1223 
1224 static const char * const i2s_1_groups[] = {
1225 	"gpio87", "gpio88", "gpio88", "gpio89", "gpio89", "gpio90", "gpio90",
1226 	"gpio91", "gpio91", "gpio92", "gpio92", "gpio93", "gpio93", "gpio94",
1227 	"gpio94", "gpio95", "gpio95", "gpio96",
1228 };
1229 
1230 static const char * const dsd_clk_a_groups[] = {
1231 	"gpio87",
1232 };
1233 
1234 static const char * const qdss_cti_trig_in_a1_groups[] = {
1235 	"gpio92",
1236 };
1237 
1238 static const char * const rgmi_dll1_groups[] = {
1239 	"gpio92",
1240 };
1241 
1242 static const char * const pwm_led22_groups[] = {
1243 	"gpio93",
1244 };
1245 
1246 static const char * const pwm_led23_groups[] = {
1247 	"gpio94",
1248 };
1249 
1250 static const char * const qdss_cti_trig_out_a0_groups[] = {
1251 	"gpio94",
1252 };
1253 
1254 static const char * const rgmi_dll2_groups[] = {
1255 	"gpio94",
1256 };
1257 
1258 static const char * const pwm_led1_groups[] = {
1259 	"gpio95",
1260 };
1261 
1262 static const char * const qdss_cti_trig_out_a1_groups[] = {
1263 	"gpio95",
1264 };
1265 
1266 static const char * const pwm_led2_groups[] = {
1267 	"gpio96",
1268 };
1269 
1270 static const char * const i2s_2_groups[] = {
1271 	"gpio97", "gpio98", "gpio99", "gpio100", "gpio101", "gpio102",
1272 };
1273 
1274 static const char * const pll_bist_groups[] = {
1275 	"gpio100",
1276 };
1277 
1278 static const char * const ext_mclk1_a_groups[] = {
1279 	"gpio103",
1280 };
1281 
1282 static const char * const mclk_in2_groups[] = {
1283 	"gpio103",
1284 };
1285 
1286 static const char * const bimc_dte1_groups[] = {
1287 	"gpio103", "gpio109",
1288 };
1289 
1290 static const char * const i2s_3_sck_a_groups[] = {
1291 	"gpio104",
1292 };
1293 
1294 static const char * const i2s_3_ws_a_groups[] = {
1295 	"gpio105",
1296 };
1297 
1298 static const struct pinfunction qcs404_functions[] = {
1299 	MSM_PIN_FUNCTION(gpio),
1300 	MSM_PIN_FUNCTION(hdmi_tx),
1301 	MSM_PIN_FUNCTION(hdmi_ddc),
1302 	MSM_PIN_FUNCTION(blsp_uart_tx_a2),
1303 	MSM_PIN_FUNCTION(blsp_spi2),
1304 	MSM_PIN_FUNCTION(m_voc),
1305 	MSM_PIN_FUNCTION(qdss_cti_trig_in_a0),
1306 	MSM_PIN_FUNCTION(blsp_uart_rx_a2),
1307 	MSM_PIN_FUNCTION(qdss_tracectl_a),
1308 	MSM_PIN_FUNCTION(blsp_uart2),
1309 	MSM_PIN_FUNCTION(aud_cdc),
1310 	MSM_PIN_FUNCTION(blsp_i2c_sda_a2),
1311 	MSM_PIN_FUNCTION(qdss_tracedata_a),
1312 	MSM_PIN_FUNCTION(blsp_i2c_scl_a2),
1313 	MSM_PIN_FUNCTION(qdss_tracectl_b),
1314 	MSM_PIN_FUNCTION(qdss_cti_trig_in_b0),
1315 	MSM_PIN_FUNCTION(blsp_uart1),
1316 	MSM_PIN_FUNCTION(blsp_spi_mosi_a1),
1317 	MSM_PIN_FUNCTION(blsp_spi_miso_a1),
1318 	MSM_PIN_FUNCTION(qdss_tracedata_b),
1319 	MSM_PIN_FUNCTION(blsp_i2c1),
1320 	MSM_PIN_FUNCTION(blsp_spi_cs_n_a1),
1321 	MSM_PIN_FUNCTION(gcc_plltest),
1322 	MSM_PIN_FUNCTION(blsp_spi_clk_a1),
1323 	MSM_PIN_FUNCTION(rgb_data0),
1324 	MSM_PIN_FUNCTION(blsp_uart5),
1325 	MSM_PIN_FUNCTION(blsp_spi5),
1326 	MSM_PIN_FUNCTION(adsp_ext),
1327 	MSM_PIN_FUNCTION(rgb_data1),
1328 	MSM_PIN_FUNCTION(prng_rosc),
1329 	MSM_PIN_FUNCTION(rgb_data2),
1330 	MSM_PIN_FUNCTION(blsp_i2c5),
1331 	MSM_PIN_FUNCTION(gcc_gp1_clk_b),
1332 	MSM_PIN_FUNCTION(rgb_data3),
1333 	MSM_PIN_FUNCTION(gcc_gp2_clk_b),
1334 	MSM_PIN_FUNCTION(blsp_spi0),
1335 	MSM_PIN_FUNCTION(blsp_uart0),
1336 	MSM_PIN_FUNCTION(gcc_gp3_clk_b),
1337 	MSM_PIN_FUNCTION(blsp_i2c0),
1338 	MSM_PIN_FUNCTION(qdss_traceclk_b),
1339 	MSM_PIN_FUNCTION(pcie_clk),
1340 	MSM_PIN_FUNCTION(nfc_irq),
1341 	MSM_PIN_FUNCTION(blsp_spi4),
1342 	MSM_PIN_FUNCTION(nfc_dwl),
1343 	MSM_PIN_FUNCTION(audio_ts),
1344 	MSM_PIN_FUNCTION(rgb_data4),
1345 	MSM_PIN_FUNCTION(spi_lcd),
1346 	MSM_PIN_FUNCTION(blsp_uart_tx_b2),
1347 	MSM_PIN_FUNCTION(gcc_gp3_clk_a),
1348 	MSM_PIN_FUNCTION(rgb_data5),
1349 	MSM_PIN_FUNCTION(blsp_uart_rx_b2),
1350 	MSM_PIN_FUNCTION(blsp_i2c_sda_b2),
1351 	MSM_PIN_FUNCTION(blsp_i2c_scl_b2),
1352 	MSM_PIN_FUNCTION(pwm_led11),
1353 	MSM_PIN_FUNCTION(i2s_3_data0_a),
1354 	MSM_PIN_FUNCTION(ebi2_lcd),
1355 	MSM_PIN_FUNCTION(i2s_3_data1_a),
1356 	MSM_PIN_FUNCTION(i2s_3_data2_a),
1357 	MSM_PIN_FUNCTION(atest_char),
1358 	MSM_PIN_FUNCTION(pwm_led3),
1359 	MSM_PIN_FUNCTION(i2s_3_data3_a),
1360 	MSM_PIN_FUNCTION(pwm_led4),
1361 	MSM_PIN_FUNCTION(i2s_4),
1362 	MSM_PIN_FUNCTION(ebi2_a),
1363 	MSM_PIN_FUNCTION(dsd_clk_b),
1364 	MSM_PIN_FUNCTION(pwm_led5),
1365 	MSM_PIN_FUNCTION(pwm_led6),
1366 	MSM_PIN_FUNCTION(pwm_led7),
1367 	MSM_PIN_FUNCTION(pwm_led8),
1368 	MSM_PIN_FUNCTION(pwm_led24),
1369 	MSM_PIN_FUNCTION(spkr_dac0),
1370 	MSM_PIN_FUNCTION(blsp_i2c4),
1371 	MSM_PIN_FUNCTION(pwm_led9),
1372 	MSM_PIN_FUNCTION(pwm_led10),
1373 	MSM_PIN_FUNCTION(spdifrx_opt),
1374 	MSM_PIN_FUNCTION(pwm_led12),
1375 	MSM_PIN_FUNCTION(pwm_led13),
1376 	MSM_PIN_FUNCTION(pwm_led14),
1377 	MSM_PIN_FUNCTION(wlan1_adc1),
1378 	MSM_PIN_FUNCTION(rgb_data_b0),
1379 	MSM_PIN_FUNCTION(pwm_led15),
1380 	MSM_PIN_FUNCTION(blsp_spi_mosi_b1),
1381 	MSM_PIN_FUNCTION(wlan1_adc0),
1382 	MSM_PIN_FUNCTION(rgb_data_b1),
1383 	MSM_PIN_FUNCTION(pwm_led16),
1384 	MSM_PIN_FUNCTION(blsp_spi_miso_b1),
1385 	MSM_PIN_FUNCTION(qdss_cti_trig_out_b0),
1386 	MSM_PIN_FUNCTION(wlan2_adc1),
1387 	MSM_PIN_FUNCTION(rgb_data_b2),
1388 	MSM_PIN_FUNCTION(pwm_led17),
1389 	MSM_PIN_FUNCTION(blsp_spi_cs_n_b1),
1390 	MSM_PIN_FUNCTION(wlan2_adc0),
1391 	MSM_PIN_FUNCTION(rgb_data_b3),
1392 	MSM_PIN_FUNCTION(pwm_led18),
1393 	MSM_PIN_FUNCTION(blsp_spi_clk_b1),
1394 	MSM_PIN_FUNCTION(rgb_data_b4),
1395 	MSM_PIN_FUNCTION(pwm_led19),
1396 	MSM_PIN_FUNCTION(ext_mclk1_b),
1397 	MSM_PIN_FUNCTION(qdss_traceclk_a),
1398 	MSM_PIN_FUNCTION(rgb_data_b5),
1399 	MSM_PIN_FUNCTION(pwm_led20),
1400 	MSM_PIN_FUNCTION(atest_char3),
1401 	MSM_PIN_FUNCTION(i2s_3_sck_b),
1402 	MSM_PIN_FUNCTION(ldo_update),
1403 	MSM_PIN_FUNCTION(bimc_dte0),
1404 	MSM_PIN_FUNCTION(rgb_hsync),
1405 	MSM_PIN_FUNCTION(pwm_led21),
1406 	MSM_PIN_FUNCTION(i2s_3_ws_b),
1407 	MSM_PIN_FUNCTION(dbg_out),
1408 	MSM_PIN_FUNCTION(rgb_vsync),
1409 	MSM_PIN_FUNCTION(i2s_3_data0_b),
1410 	MSM_PIN_FUNCTION(ldo_en),
1411 	MSM_PIN_FUNCTION(hdmi_dtest),
1412 	MSM_PIN_FUNCTION(rgb_de),
1413 	MSM_PIN_FUNCTION(i2s_3_data1_b),
1414 	MSM_PIN_FUNCTION(hdmi_lbk9),
1415 	MSM_PIN_FUNCTION(rgb_clk),
1416 	MSM_PIN_FUNCTION(atest_char1),
1417 	MSM_PIN_FUNCTION(i2s_3_data2_b),
1418 	MSM_PIN_FUNCTION(ebi_cdc),
1419 	MSM_PIN_FUNCTION(hdmi_lbk8),
1420 	MSM_PIN_FUNCTION(rgb_mdp),
1421 	MSM_PIN_FUNCTION(atest_char0),
1422 	MSM_PIN_FUNCTION(i2s_3_data3_b),
1423 	MSM_PIN_FUNCTION(hdmi_lbk7),
1424 	MSM_PIN_FUNCTION(rgb_data_b6),
1425 	MSM_PIN_FUNCTION(rgb_data_b7),
1426 	MSM_PIN_FUNCTION(hdmi_lbk6),
1427 	MSM_PIN_FUNCTION(rgmii_int),
1428 	MSM_PIN_FUNCTION(cri_trng1),
1429 	MSM_PIN_FUNCTION(rgmii_wol),
1430 	MSM_PIN_FUNCTION(cri_trng0),
1431 	MSM_PIN_FUNCTION(gcc_tlmm),
1432 	MSM_PIN_FUNCTION(rgmii_ck),
1433 	MSM_PIN_FUNCTION(rgmii_tx),
1434 	MSM_PIN_FUNCTION(hdmi_lbk5),
1435 	MSM_PIN_FUNCTION(hdmi_pixel),
1436 	MSM_PIN_FUNCTION(hdmi_rcv),
1437 	MSM_PIN_FUNCTION(hdmi_lbk4),
1438 	MSM_PIN_FUNCTION(rgmii_ctl),
1439 	MSM_PIN_FUNCTION(ext_lpass),
1440 	MSM_PIN_FUNCTION(rgmii_rx),
1441 	MSM_PIN_FUNCTION(cri_trng),
1442 	MSM_PIN_FUNCTION(hdmi_lbk3),
1443 	MSM_PIN_FUNCTION(hdmi_lbk2),
1444 	MSM_PIN_FUNCTION(qdss_cti_trig_out_b1),
1445 	MSM_PIN_FUNCTION(rgmii_mdio),
1446 	MSM_PIN_FUNCTION(hdmi_lbk1),
1447 	MSM_PIN_FUNCTION(rgmii_mdc),
1448 	MSM_PIN_FUNCTION(hdmi_lbk0),
1449 	MSM_PIN_FUNCTION(ir_in),
1450 	MSM_PIN_FUNCTION(wsa_en),
1451 	MSM_PIN_FUNCTION(rgb_data6),
1452 	MSM_PIN_FUNCTION(rgb_data7),
1453 	MSM_PIN_FUNCTION(atest_char2),
1454 	MSM_PIN_FUNCTION(ebi_ch0),
1455 	MSM_PIN_FUNCTION(blsp_uart3),
1456 	MSM_PIN_FUNCTION(blsp_spi3),
1457 	MSM_PIN_FUNCTION(sd_write),
1458 	MSM_PIN_FUNCTION(blsp_i2c3),
1459 	MSM_PIN_FUNCTION(gcc_gp1_clk_a),
1460 	MSM_PIN_FUNCTION(qdss_cti_trig_in_b1),
1461 	MSM_PIN_FUNCTION(gcc_gp2_clk_a),
1462 	MSM_PIN_FUNCTION(ext_mclk0),
1463 	MSM_PIN_FUNCTION(mclk_in1),
1464 	MSM_PIN_FUNCTION(i2s_1),
1465 	MSM_PIN_FUNCTION(dsd_clk_a),
1466 	MSM_PIN_FUNCTION(qdss_cti_trig_in_a1),
1467 	MSM_PIN_FUNCTION(rgmi_dll1),
1468 	MSM_PIN_FUNCTION(pwm_led22),
1469 	MSM_PIN_FUNCTION(pwm_led23),
1470 	MSM_PIN_FUNCTION(qdss_cti_trig_out_a0),
1471 	MSM_PIN_FUNCTION(rgmi_dll2),
1472 	MSM_PIN_FUNCTION(pwm_led1),
1473 	MSM_PIN_FUNCTION(qdss_cti_trig_out_a1),
1474 	MSM_PIN_FUNCTION(pwm_led2),
1475 	MSM_PIN_FUNCTION(i2s_2),
1476 	MSM_PIN_FUNCTION(pll_bist),
1477 	MSM_PIN_FUNCTION(ext_mclk1_a),
1478 	MSM_PIN_FUNCTION(mclk_in2),
1479 	MSM_PIN_FUNCTION(bimc_dte1),
1480 	MSM_PIN_FUNCTION(i2s_3_sck_a),
1481 	MSM_PIN_FUNCTION(i2s_3_ws_a),
1482 };
1483 
1484 /* Every pin is maintained as a single group, and missing or non-existing pin
1485  * would be maintained as dummy group to synchronize pin group index with
1486  * pin descriptor registered with pinctrl core.
1487  * Clients would not be able to request these dummy pin groups.
1488  */
1489 static const struct msm_pingroup qcs404_groups[] = {
1490 	[0] = PINGROUP(0, SOUTH, _, _, _, _, _, _, _, _, _),
1491 	[1] = PINGROUP(1, SOUTH, _, _, _, _, _, _, _, _, _),
1492 	[2] = PINGROUP(2, SOUTH, _, _, _, _, _, _, _, _, _),
1493 	[3] = PINGROUP(3, SOUTH, _, _, _, _, _, _, _, _, _),
1494 	[4] = PINGROUP(4, SOUTH, _, _, _, _, _, _, _, _, _),
1495 	[5] = PINGROUP(5, SOUTH, _, _, _, _, _, _, _, _, _),
1496 	[6] = PINGROUP(6, SOUTH, _, _, _, _, _, _, _, _, _),
1497 	[7] = PINGROUP(7, SOUTH, _, _, _, _, _, _, _, _, _),
1498 	[8] = PINGROUP(8, SOUTH, _, _, _, _, _, _, _, _, _),
1499 	[9] = PINGROUP(9, SOUTH, _, _, _, _, _, _, _, _, _),
1500 	[10] = PINGROUP(10, SOUTH, _, _, _, _, _, _, _, _, _),
1501 	[11] = PINGROUP(11, SOUTH, _, _, _, _, _, _, _, _, _),
1502 	[12] = PINGROUP(12, SOUTH, _, _, _, _, _, _, _, _, _),
1503 	[13] = PINGROUP(13, SOUTH, _, _, _, _, _, _, _, _, _),
1504 	[14] = PINGROUP(14, SOUTH, hdmi_tx, _, _, _, _, _, _, _, _),
1505 	[15] = PINGROUP(15, SOUTH, hdmi_ddc, _, _, _, _, _, _, _, _),
1506 	[16] = PINGROUP(16, SOUTH, hdmi_ddc, _, _, _, _, _, _, _, _),
1507 	[17] = PINGROUP(17, NORTH, blsp_uart_tx_a2, blsp_spi2, m_voc, _, _, _, _, _, _),
1508 	[18] = PINGROUP(18, NORTH, blsp_uart_rx_a2, blsp_spi2, _, _, _, _, _, qdss_tracectl_a, _),
1509 	[19] = PINGROUP(19, NORTH, blsp_uart2, aud_cdc, blsp_i2c_sda_a2, blsp_spi2, _, qdss_tracedata_a, _, _, _),
1510 	[20] = PINGROUP(20, NORTH, blsp_uart2, aud_cdc, blsp_i2c_scl_a2, blsp_spi2, _, _, _, _, _),
1511 	[21] = PINGROUP(21, SOUTH, m_voc, _, _, _, _, _, _, _, qdss_cti_trig_in_b0),
1512 	[22] = PINGROUP(22, NORTH, blsp_uart1, blsp_spi_mosi_a1, _, _, _, _, _, _, _),
1513 	[23] = PINGROUP(23, NORTH, blsp_uart1, blsp_spi_miso_a1, _, _, _, _, _, qdss_tracedata_b, _),
1514 	[24] = PINGROUP(24, NORTH, blsp_uart1, blsp_i2c1, blsp_spi_cs_n_a1, gcc_plltest, _, _, _, _, _),
1515 	[25] = PINGROUP(25, NORTH, blsp_uart1, blsp_i2c1, blsp_spi_clk_a1, gcc_plltest, _, _, _, _, _),
1516 	[26] = PINGROUP(26, EAST, rgb_data0, blsp_uart5, blsp_spi5, adsp_ext, _, _, _, _, _),
1517 	[27] = PINGROUP(27, EAST, rgb_data1, blsp_uart5, blsp_spi5, prng_rosc, _, _, _, _, _),
1518 	[28] = PINGROUP(28, EAST, rgb_data2, blsp_uart5, blsp_i2c5, blsp_spi5, gcc_gp1_clk_b, _, _, _, _),
1519 	[29] = PINGROUP(29, EAST, rgb_data3, blsp_uart5, blsp_i2c5, blsp_spi5, gcc_gp2_clk_b, _, _, _, _),
1520 	[30] = PINGROUP(30, NORTH, blsp_spi0, blsp_uart0, gcc_gp3_clk_b, _, _, _, _, _, _),
1521 	[31] = PINGROUP(31, NORTH, blsp_spi0, blsp_uart0, _, _, _, _, _, _, _),
1522 	[32] = PINGROUP(32, NORTH, blsp_spi0, blsp_uart0, blsp_i2c0, _, _, _, _, _, _),
1523 	[33] = PINGROUP(33, NORTH, blsp_spi0, blsp_uart0, blsp_i2c0, _, _, _, _, _, _),
1524 	[34] = PINGROUP(34, SOUTH, _, qdss_traceclk_b, _, _, _, _, _, _, _),
1525 	[35] = PINGROUP(35, SOUTH, pcie_clk, _, qdss_tracedata_b, _, _, _, _, _, _),
1526 	[36] = PINGROUP(36, NORTH, _, _, _, _, _, _, qdss_tracedata_a, _, _),
1527 	[37] = PINGROUP(37, NORTH, nfc_irq, blsp_spi4, _, _, _, _, _, _, _),
1528 	[38] = PINGROUP(38, NORTH, nfc_dwl, blsp_spi4, audio_ts, _, _, _, _, _, _),
1529 	[39] = PINGROUP(39, EAST, rgb_data4, spi_lcd, blsp_uart_tx_b2, gcc_gp3_clk_a, qdss_tracedata_a, _, _, _, _),
1530 	[40] = PINGROUP(40, EAST, rgb_data5, spi_lcd, blsp_uart_rx_b2, _, qdss_tracedata_b, _, _, _, _),
1531 	[41] = PINGROUP(41, EAST, rgb_data0, blsp_i2c_sda_b2, _, qdss_tracedata_b, _, _, _, _, _),
1532 	[42] = PINGROUP(42, EAST, rgb_data1, blsp_i2c_scl_b2, _, _, _, _, _, qdss_tracedata_a, _),
1533 	[43] = PINGROUP(43, EAST, rgb_data2, pwm_led11, _, _, _, _, _, _, _),
1534 	[44] = PINGROUP(44, EAST, rgb_data3, pwm_led12, blsp_spi5, _, _, _, _, _, _),
1535 	[45] = PINGROUP(45, EAST, rgb_data4, pwm_led13, blsp_spi5, qdss_tracedata_b, _, _, _, _, _),
1536 	[46] = PINGROUP(46, EAST, rgb_data5, pwm_led14, blsp_spi5, qdss_tracedata_b, _, wlan1_adc1, _, _, _),
1537 	[47] = PINGROUP(47, EAST, rgb_data_b0, pwm_led15, blsp_spi_mosi_b1, qdss_tracedata_b, _, wlan1_adc0, _, _, _),
1538 	[48] = PINGROUP(48, EAST, rgb_data_b1, pwm_led16, blsp_spi_miso_b1, _, qdss_cti_trig_out_b0, _, wlan2_adc1, _, _),
1539 	[49] = PINGROUP(49, EAST, rgb_data_b2, pwm_led17, blsp_spi_cs_n_b1, _, qdss_tracedata_b, _, wlan2_adc0, _, _),
1540 	[50] = PINGROUP(50, EAST, rgb_data_b3, pwm_led18, blsp_spi_clk_b1, qdss_tracedata_b, _, _, _, _, _),
1541 	[51] = PINGROUP(51, EAST, rgb_data_b4, pwm_led19, ext_mclk1_b, qdss_traceclk_a, _, _, _, _, _),
1542 	[52] = PINGROUP(52, EAST, rgb_data_b5, pwm_led20, atest_char3, i2s_3_sck_b, ldo_update, bimc_dte0, _, _, _),
1543 	[53] = PINGROUP(53, EAST, rgb_hsync, pwm_led21, i2s_3_ws_b, dbg_out, _, _, _, _, _),
1544 	[54] = PINGROUP(54, EAST, rgb_vsync, i2s_3_data0_b, ldo_en, bimc_dte0, _, hdmi_dtest, _, _, _),
1545 	[55] = PINGROUP(55, EAST, rgb_de, i2s_3_data1_b, _, qdss_tracedata_b, _, hdmi_lbk9, _, _, _),
1546 	[56] = PINGROUP(56, EAST, rgb_clk, atest_char1, i2s_3_data2_b, ebi_cdc, _, hdmi_lbk8, _, _, _),
1547 	[57] = PINGROUP(57, EAST, rgb_mdp, atest_char0, i2s_3_data3_b, _, hdmi_lbk7, _, _, _, _),
1548 	[58] = PINGROUP(58, EAST, rgb_data_b6, _, ebi_cdc, _, _, _, _, _, _),
1549 	[59] = PINGROUP(59, EAST, rgb_data_b7, _, hdmi_lbk6, _, _, _, _, _, _),
1550 	[60] = PINGROUP(60, NORTH, _, _, _, _, _, _, _, _, _),
1551 	[61] = PINGROUP(61, NORTH, rgmii_int, cri_trng1, qdss_tracedata_b, _, _, _, _, _, _),
1552 	[62] = PINGROUP(62, NORTH, rgmii_wol, cri_trng0, qdss_tracedata_b, gcc_tlmm, _, _, _, _, _),
1553 	[63] = PINGROUP(63, NORTH, rgmii_ck, _, _, _, _, _, _, _, _),
1554 	[64] = PINGROUP(64, NORTH, rgmii_tx, _, hdmi_lbk5, _, _, _, _, _, _),
1555 	[65] = PINGROUP(65, NORTH, rgmii_tx, _, hdmi_pixel, _, _, _, _, _, _),
1556 	[66] = PINGROUP(66, NORTH, rgmii_tx, _, hdmi_rcv, _, _, _, _, _, _),
1557 	[67] = PINGROUP(67, NORTH, rgmii_tx, _, hdmi_lbk4, _, _, _, _, _, _),
1558 	[68] = PINGROUP(68, NORTH, rgmii_ctl, _, _, _, _, _, _, _, _),
1559 	[69] = PINGROUP(69, NORTH, rgmii_ck, ext_lpass, _, _, _, _, _, _, _),
1560 	[70] = PINGROUP(70, NORTH, rgmii_rx, cri_trng, _, _, _, _, _, _, _),
1561 	[71] = PINGROUP(71, NORTH, rgmii_rx, _, hdmi_lbk3, _, _, _, _, _, _),
1562 	[72] = PINGROUP(72, NORTH, rgmii_rx, _, hdmi_lbk2, _, _, _, _, _, _),
1563 	[73] = PINGROUP(73, NORTH, rgmii_rx, _, _, _, _, qdss_cti_trig_out_b1, _, _, _),
1564 	[74] = PINGROUP(74, NORTH, rgmii_ctl, _, _, _, _, _, _, _, _),
1565 	[75] = PINGROUP(75, NORTH, rgmii_mdio, _, hdmi_lbk1, _, _, _, _, _, _),
1566 	[76] = PINGROUP(76, NORTH, rgmii_mdc, _, _, _, _, _, hdmi_lbk0, _, _),
1567 	[77] = PINGROUP(77, NORTH, ir_in, wsa_en, _, _, _, _, _, _, _),
1568 	[78] = PINGROUP(78, EAST, rgb_data6, _, _, _, _, _, _, _, _),
1569 	[79] = PINGROUP(79, EAST, rgb_data7, _, _, _, _, _, _, _, _),
1570 	[80] = PINGROUP(80, EAST, rgb_data6, atest_char2, _, _, _, _, _, _, _),
1571 	[81] = PINGROUP(81, EAST, rgb_data7, ebi_ch0, _, _, _, _, _, _, _),
1572 	[82] = PINGROUP(82, NORTH, blsp_uart3, blsp_spi3, sd_write, _, _, _, _, _, qdss_tracedata_a),
1573 	[83] = PINGROUP(83, NORTH, blsp_uart3, blsp_spi3, _, _, _, _, qdss_tracedata_a, _, _),
1574 	[84] = PINGROUP(84, NORTH, blsp_uart3, blsp_i2c3, blsp_spi3, gcc_gp1_clk_a, qdss_cti_trig_in_b1, _, _, _, _),
1575 	[85] = PINGROUP(85, NORTH, blsp_uart3, blsp_i2c3, blsp_spi3, gcc_gp2_clk_a, qdss_tracedata_b, _, _, _, _),
1576 	[86] = PINGROUP(86, EAST, ext_mclk0, mclk_in1, _, _, _, _, _, _, _),
1577 	[87] = PINGROUP(87, EAST, i2s_1, dsd_clk_a, _, _, _, _, _, _, _),
1578 	[88] = PINGROUP(88, EAST, i2s_1, i2s_1, _, _, _, _, _, _, _),
1579 	[89] = PINGROUP(89, EAST, i2s_1, i2s_1, _, _, _, _, _, _, qdss_tracedata_b),
1580 	[90] = PINGROUP(90, EAST, i2s_1, i2s_1, _, _, _, _, _, _, _),
1581 	[91] = PINGROUP(91, EAST, i2s_1, i2s_1, _, _, _, _, _, _, _),
1582 	[92] = PINGROUP(92, EAST, i2s_1, i2s_1, _, _, _, _, _, qdss_cti_trig_in_a1, _),
1583 	[93] = PINGROUP(93, EAST, i2s_1, pwm_led22, i2s_1, _, _, _, _, _, qdss_tracedata_b),
1584 	[94] = PINGROUP(94, EAST, i2s_1, pwm_led23, i2s_1, _, qdss_cti_trig_out_a0, _, rgmi_dll2, _, _),
1585 	[95] = PINGROUP(95, EAST, i2s_1, pwm_led1, i2s_1, _, qdss_cti_trig_out_a1, _, _, _, _),
1586 	[96] = PINGROUP(96, EAST, i2s_1, pwm_led2, _, _, _, _, _, _, _),
1587 	[97] = PINGROUP(97, EAST, i2s_2, _, _, _, _, _, _, _, _),
1588 	[98] = PINGROUP(98, EAST, i2s_2, _, _, _, _, _, _, _, _),
1589 	[99] = PINGROUP(99, EAST, i2s_2, _, _, _, _, _, _, _, _),
1590 	[100] = PINGROUP(100, EAST, i2s_2, pll_bist, _, _, _, _, _, _, _),
1591 	[101] = PINGROUP(101, EAST, i2s_2, _, _, _, _, _, _, _, _),
1592 	[102] = PINGROUP(102, EAST, i2s_2, _, _, _, _, _, _, _, _),
1593 	[103] = PINGROUP(103, EAST, ext_mclk1_a, mclk_in2, bimc_dte1, _, _, _, _, _, _),
1594 	[104] = PINGROUP(104, EAST, i2s_3_sck_a, _, _, _, _, _, _, _, _),
1595 	[105] = PINGROUP(105, EAST, i2s_3_ws_a, _, _, _, _, _, _, _, _),
1596 	[106] = PINGROUP(106, EAST, i2s_3_data0_a, ebi2_lcd, _, _, ebi_cdc, _, _, _, _),
1597 	[107] = PINGROUP(107, EAST, i2s_3_data1_a, ebi2_lcd, _, _, ebi_cdc, _, _, _, _),
1598 	[108] = PINGROUP(108, EAST, i2s_3_data2_a, ebi2_lcd, atest_char, pwm_led3, ebi_cdc, _, _, _, _),
1599 	[109] = PINGROUP(109, EAST, i2s_3_data3_a, ebi2_lcd, pwm_led4, bimc_dte1, _, _, _, _, _),
1600 	[110] = PINGROUP(110, EAST, i2s_4, ebi2_a, dsd_clk_b, pwm_led5, _, _, _, _, _),
1601 	[111] = PINGROUP(111, EAST, i2s_4, i2s_4, pwm_led6, ebi_cdc, _, _, _, _, _),
1602 	[112] = PINGROUP(112, EAST, i2s_4, i2s_4, pwm_led7, _, _, _, _, _, _),
1603 	[113] = PINGROUP(113, EAST, i2s_4, i2s_4, pwm_led8, _, _, _, _, _, _),
1604 	[114] = PINGROUP(114, EAST, i2s_4, i2s_4, pwm_led24, _, _, _, _, _, _),
1605 	[115] = PINGROUP(115, EAST, i2s_4, i2s_4, _, _, _, _, _, _, _),
1606 	[116] = PINGROUP(116, EAST, i2s_4, spkr_dac0, _, _, _, _, _, _, _),
1607 	[117] = PINGROUP(117, NORTH, blsp_i2c4, blsp_spi4, pwm_led9, _, _, _, _, _, _),
1608 	[118] = PINGROUP(118, NORTH, blsp_i2c4, blsp_spi4, pwm_led10, _, _, _, _, _, _),
1609 	[119] = PINGROUP(119, EAST, spdifrx_opt, _, _, _, _, _, _, _, _),
1610 	[120] = SDC_QDSD_PINGROUP(sdc1_rclk, 0xc2000, 15, 0),
1611 	[121] = SDC_QDSD_PINGROUP(sdc1_clk, 0xc2000, 13, 6),
1612 	[122] = SDC_QDSD_PINGROUP(sdc1_cmd, 0xc2000, 11, 3),
1613 	[123] = SDC_QDSD_PINGROUP(sdc1_data, 0xc2000, 9, 0),
1614 	[124] = SDC_QDSD_PINGROUP(sdc2_clk, 0xc3000, 14, 6),
1615 	[125] = SDC_QDSD_PINGROUP(sdc2_cmd, 0xc3000, 11, 3),
1616 	[126] = SDC_QDSD_PINGROUP(sdc2_data, 0xc3000, 9, 0),
1617 };
1618 
1619 static const struct msm_pinctrl_soc_data qcs404_pinctrl = {
1620 	.pins = qcs404_pins,
1621 	.npins = ARRAY_SIZE(qcs404_pins),
1622 	.functions = qcs404_functions,
1623 	.nfunctions = ARRAY_SIZE(qcs404_functions),
1624 	.groups = qcs404_groups,
1625 	.ngroups = ARRAY_SIZE(qcs404_groups),
1626 	.ngpios = 120,
1627 	.tiles = qcs404_tiles,
1628 	.ntiles = ARRAY_SIZE(qcs404_tiles),
1629 };
1630 
qcs404_pinctrl_probe(struct platform_device * pdev)1631 static int qcs404_pinctrl_probe(struct platform_device *pdev)
1632 {
1633 	return msm_pinctrl_probe(pdev, &qcs404_pinctrl);
1634 }
1635 
1636 static const struct of_device_id qcs404_pinctrl_of_match[] = {
1637 	{ .compatible = "qcom,qcs404-pinctrl", },
1638 	{ },
1639 };
1640 
1641 static struct platform_driver qcs404_pinctrl_driver = {
1642 	.driver = {
1643 		.name = "qcs404-pinctrl",
1644 		.of_match_table = qcs404_pinctrl_of_match,
1645 	},
1646 	.probe = qcs404_pinctrl_probe,
1647 	.remove_new = msm_pinctrl_remove,
1648 };
1649 
qcs404_pinctrl_init(void)1650 static int __init qcs404_pinctrl_init(void)
1651 {
1652 	return platform_driver_register(&qcs404_pinctrl_driver);
1653 }
1654 arch_initcall(qcs404_pinctrl_init);
1655 
qcs404_pinctrl_exit(void)1656 static void __exit qcs404_pinctrl_exit(void)
1657 {
1658 	platform_driver_unregister(&qcs404_pinctrl_driver);
1659 }
1660 module_exit(qcs404_pinctrl_exit);
1661 
1662 MODULE_DESCRIPTION("Qualcomm QCS404 pinctrl driver");
1663 MODULE_LICENSE("GPL v2");
1664 MODULE_DEVICE_TABLE(of, qcs404_pinctrl_of_match);
1665